substitutions: device_name: nightstandtkm #device_ip: 192.168.87.45 esphome: name: ${device_name} esp8266: board: esp8285 # Enable logging logger: # Enable Home Assistant API api: encryption: key: "EgFzta0ZRgjSLEAfkzFDFlzs2ZDcs+2sD5LL7vSHSmE=" ota: - platform: esphome wifi: ssid: "Meneely" password: "punxsutawney1" # Enable fallback hotspot (captive portal) in case wifi connection fails ap: ssid: "Nightstand TKM Fallback Hotspot" password: "punxsutawney1" captive_portal: ####################################### # Device specific Config Begins Below # ####################################### binary_sensor: - platform: gpio pin: GPIO00 # The built-in switch id: reset internal: true filters: - invert: - delayed_off: 10ms on_press: - switch.toggle: id: relay_1 - platform: gpio name: ${device_name}_status pin: GPIO04 # The external terminals id: switch_1 filters: - delayed_on: 100ms on_press: then: - switch.toggle: id: relay_1 # on_release: # then: # - switch.toggle: # id: relay_1 switch: - platform: gpio name: ${device_name}_switch icon: "mdi:lightbulb_outline" pin: GPIO12 id: relay_1 restore_mode: restore_default_off #status_led: # pin: # number: GPIO13 # inverted: true output: - platform: esp8266_pwm id: blue_led pin: GPIO13 inverted: True light: # the 4 lines below define the Blue LED light on Sonoff Mini, to expose in HomeAssistant remove line "internal: true" - platform: monochromatic name: ${device_name}_blueled output: blue_led internal: true # hides the Blue LED from HomeAssistant