06-02-2023, 07:22 PM
can give me example contain one click , double , holed click for automation esphome for kc868-a16s
please write the code to use it
please write the code to use it
how to use one click , double , holed click for automation esphome
|
06-02-2023, 07:22 PM
can give me example contain one click , double , holed click for automation esphome for kc868-a16s
please write the code to use it
06-03-2023, 12:36 AM
just use AUTOMATION by different mode:
on_click (Optional, Automation): An automation to perform when the button is held down for a specified period of time. See on_click. on_double_click (Optional, Automation): An automation to perform when the button is pressed twice for specified periods of time. See on_double_click. on_multi_click (Optional, Automation): An automation to perform when the button is pressed in a specific sequence. See on_multi_click. here have details: https://esphome.io/components/binary_sensor/index.html
06-03-2023, 07:28 PM
can write code example contains ( on_click - on_double_click - on_multi_click ) ?
i tryed but not work Code: binary_sensor: Code: - platform: gpio Code: binary_sensor: Code: on_multi_click:
06-03-2023, 11:20 PM
next week when i have free time, write a demo config for you.
06-04-2023, 05:49 AM
this is 3 mode for KC868-A16S controller set by ESPHome:
1-click: toggle relay1 2-click: toggle relay2 3-click: toggle relay3 actually you can add 4-click, 5-click, 6-click, ........ tested with KC868-A16S mainin use these code: binary_sensor: - platform: gpio name: "a16s-input1" on_multi_click: - timing: - ON for at most 0.5s - OFF for at most 0.5s - ON for at most 0.5s - OFF for at most 0.5s - ON for at most 0.5s - OFF for at least 0.5s then: - switch.toggle: a16s_output3 - timing: - ON for at most 0.5s - OFF for at most 0.5s - ON for at most 0.5s - OFF for at least 0.5s then: - switch.toggle: a16s_output2 - timing: - ON for at most 0.5s - OFF for at least 0.5s then: - switch.toggle: a16s_output1 pin: pcf8574: pcf8574_hub_in_1 number: 0 mode: INPUT inverted: true Made_for_ESPHome_KC868-A16S - multi-click.txt (Size: 6.28 KB / Downloads: 188) sample config code from ESPHome github: https://github.com/jesserockz/esphome-co...utton.yaml |
« Next Oldest | Next Newest »
|
Users browsing this thread: |
1 Guest(s) |