Smart Home Automation Forum
KC868-A32 Question - Printable Version

+- Smart Home Automation Forum (https://www.kincony.com/forum)
+-- Forum: Technical Support (https://www.kincony.com/forum/forumdisplay.php?fid=1)
+--- Forum: KC868-A series and Uair Smart Controller (https://www.kincony.com/forum/forumdisplay.php?fid=6)
+--- Thread: KC868-A32 Question (/showthread.php?tid=2782)



KC868-A32 Question - miguelflpp - 04-12-2023

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.


RE: KC868-A32 Question - admin - 04-12-2023

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