Smart Home Automation Forum

Full Version: KC868-A32 Question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi.
Can anyone help me with a code for ESPHome? I would like it for 1 digital input to turn off multiple relay outputs (lights) physically, without network.

Thanks.
for example:
button:
  - platform: ...
    name: button
    on_press:
      then:
        - switch.toggle: relay_1
        - switch.toggle: relay_2
        - switch.turn_on: relay_3
        - switch.turn_on: relay_4
        - switch.turn_off: relay_5
        - switch.turn_off: relay_6

here is details: https://esphome.io/components/button/index.html