Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- binary_sensor:
- - platform: gpio
- pin:
- number: GPIOXX
- mode: INPUT_PULLUP
- inverted: true
- name: "Przycisk"
- on_press:
- - binary_sensor.template.publish:
- id: btn_short
- state: ON
- - delay: 50ms
- - binary_sensor.template.publish:
- id: btn_short
- state: OFF
- on_double_click:
- - binary_sensor.template.publish:
- id: btn_double
- state: ON
- - delay: 50ms
- - binary_sensor.template.publish:
- id: btn_double
- state: OFF
- on_long_press:
- - binary_sensor.template.publish:
- id: btn_long
- state: ON
- - delay: 50ms
- - binary_sensor.template.publish:
- id: btn_long
- state: OFF
- binary_sensor:
- - platform: template
- id: btn_short
- name: "Przycisk Short"
- device_class: moving
- - platform: template
- id: btn_double
- name: "Przycisk Double"
- device_class: moving
- - platform: template
- id: btn_long
- name: "Przycisk Long"
- device_class: moving
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement