hi
i wander how to code the action after pressing K1 or K2
could you confirm the pin number to use for 'on press event' ?
regards
Google Chat: zj734465502@gmail.com
+86-0755-88291180
sales@spotpear.com
dragon_manager@163.com
tech-support@spotpear.com
zhoujie@spotpear.com
WhatsApp:13246739196
hi
i wander how to code the action after pressing K1 or K2
could you confirm the pin number to use for 'on press event' ?
regards
Use on_click:
<
# key 1:
- platform: gpio
pin:
number: GPIO8
mode:
input: true
pullup: true
inverted: true
id: key1
internal: True
on_click:
- min_length: 0 s
max_length: 500 ms
then:
>
< # key 2:
- platform: gpio
pin:
number: GPIO10
mode:
input: true
pullup: true
inverted: true
id: key2
internal: True
on_click:
- min_length: 0 s
max_length: 500 ms
report