Smart Home Automation Forum

Full Version: KC868-A4 digital input1 trigger relay1 output by ESPHome config demo
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
switch:
  - platform: gpio
    pin: GPIO2
    name: "room lamp"
    id: lamp

binary_sensor:
  - platform: gpio
    pin: GPIO36
    name: "room lamp Toggle Button"
    on_press:
      then:
        - switch.toggle: lamp