Advertisement
Guest User

Untitled

a guest
Feb 25th, 2020
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. switch:
  2. - platform: gpio
  3. pin: GPIO33
  4. id: led
  5. - platform: template
  6. id: switch1
  7. optimistic: true
  8. turn_on_action:
  9. - while:
  10. condition:
  11. switch.is_on: switch1
  12. then:
  13. - switch.turn_on: led
  14. - delay: 250ms
  15. - switch.turn_on: led
  16. - delay: 250ms
  17. turn_off_action:
  18. - switch.turn_off: led
  19.  
  20.  
  21. sensor:
  22. - platform: adc
  23. pin: GPIO35
  24. name: "Pressure 1"
  25. update_interval: 60s
  26. attenuation: 11db
  27. on_value_range:
  28. - above: 0.5
  29. #interval: 1s
  30. then:
  31. switch.turn_on: switch1
  32. - below: 0.49999
  33. then:
  34. switch.turn_off: switch1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement