Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- switch:
- - platform: gpio
- pin: GPIO33
- id: led
- - platform: template
- id: switch1
- optimistic: true
- turn_on_action:
- - while:
- condition:
- switch.is_on: switch1
- then:
- - switch.turn_on: led
- - delay: 250ms
- - switch.turn_on: led
- - delay: 250ms
- turn_off_action:
- - switch.turn_off: led
- sensor:
- - platform: adc
- pin: GPIO35
- name: "Pressure 1"
- update_interval: 60s
- attenuation: 11db
- on_value_range:
- - above: 0.5
- #interval: 1s
- then:
- switch.turn_on: switch1
- - below: 0.49999
- then:
- switch.turn_off: switch1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement