Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- binary_sensor:
- # Кнопка
- - platform: gpio
- pin:
- number: 5
- mode:
- input: true
- pullup: true
- filters:
- - delayed_on: 10ms
- name: "button"
- id: button
- # Нажатие кнопки переключает реле
- on_click:
- min_length: 30ms
- max_length: 250ms
- then:
- - switch.toggle: relay
- switch:
- # Реле
- - platform: gpio
- name: "relay"
- pin: GPIO12
- id: relay
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement