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
#1
1. latch mode: Button1

    on_press:
      then:
      - switch.toggle: e16s_output1


2. inching mode: Button2

    on_press:
      then:
      - switch.turn_on: e16s_output2
    on_release:
      then:
      - switch.turn_off: e16s_output2 


3. momentary mode: Button3

    on_turn_on:
    - delay: 1000ms
    - switch.turn_off: e16s_output3


4. interlocking mode: Button4-Button5

interlock: [e16s_output5]

interlock: [e16s_output4]


.txt   KC868-E16S-ESPHome-Config-buttons-work-mode.txt (Size: 6.36 KB / Downloads: 307)
Reply
#2
thank you

how i use double click , Long Clicked  and  Multi click input switch for scine mode ?
Reply
#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


Forum Jump:


Users browsing this thread:
1 Guest(s)