Open IanAdd opened 8 months ago
+1 That would be an awesome feature!
I think you can do that in two ways:
on_press in
tx_ultimate_touch:
id: tx_touch
uart: my_uart
on_press:
- logger.log: "press left"
or on_press in the binary sensor. But that required lots of code changes on my part and using multi click. Hopefully this will help going in the right direction:
on_multi_click:
- timing:
- ON for at most $long_press_time
- OFF for at least $double_click_max_interval
then:
- logger.log: "press left"
- timing:
- ON for at most $long_press_time
- OFF for at least $double_click_max_interval
then:
- logger.log: "Release left"
- timing:
- ON for at least $long_press_time
then:
- logger.log: "long press left"
on_click:
min_length: $long_press_time
max_length: $long_press_discard_time
then:
- logger.log: "long press release left"
on_double_click:
then:
- logger.log: "Double Click left"
on_press:
- logger.log: "on press left"
I can't yet work out how to detect the start of a button press, I think I just see the binary sensor you've created toggle on release.
Am I missing some understanding ?
I am hoping that if I can see the start of a button press I can cycle through brightness levels until the button is released.