Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
lesson32 - set button work for latch,inching,momentary, Interlocking work mode by ESP
#3
1. on_double_click (Optional, Automation): An automation to perform when the button is pressed twice for specified periods of time. See on_double_click.

2. on_multi_click (Optional, Automation): An automation to perform when the button is pressed in a specific sequence. See on_multi_click.

here is esphome webpage details have showed: https://esphome.io/components/binary_sensor/index.html

3. about "hold on" , here is demo code for "hold on" change brightness.

on_press:
then:
- if:
condition:
light.is_off: light_1
then:
- delay: 2.5s
- while:
condition:
binary_sensor.is_on: light_1_touch
then:
- light.dim_relative:
id: light_1
relative_brightness: 5%
transition_length: 0.1s
- delay: 0.1s
Reply


Messages In This Thread
RE: lesson32 - set button work for latch,inching,momentary, Interlocking work mode by ESP - by admin - 05-09-2023, 12:44 AM

Forum Jump:


Users browsing this thread:
1 Guest(s)