# Basic Config esphome: name: lounge_light_1 platform: ESP8266 board: esp8285 wifi: ssid: !secret wifi-ssid password: !secret wifi-password logger: api: ota: # Device Specific Config light: - platform: binary id: lamp name: "Desk Lamp" output: gpio_12 output: - platform: gpio pin: GPIO12 id: gpio_12 binary_sensor: - platform: gpio id: push_button pin: number: GPIO0 mode: INPUT_PULLUP inverted: True internal: true on_press: # Prevents unintended LED lit states. if: condition: - light.is_off: lamp then: #- light.turn_on: blue_led - light.turn_on: lamp else: - light.turn_off: lamp