Advertisement
matthewmarra

Shower Sensor

Jan 24th, 2022
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. ### added in configurations.yaml
  2.  
  3. - platform: template
  4. sensors:
  5. shower_status:
  6. friendly_name: "Shower Status"
  7. value_template: ""
  8.  
  9. ### added in automations.yaml. requires set_state script described here https://community.home-assistant.io/t/how-to-manually-set-state-value-of-sensor/43975/3
  10.  
  11. - alias: Shower - Running python
  12. trigger:
  13. - platform: numeric_state
  14. entity_id: sensor.shower_relative_humidity_measurement
  15. above: 70
  16. for:
  17. minutes: 0
  18. action:
  19. service: python_script.set_state
  20. data_template:
  21. entity_id: binary_sensor.shower_status
  22. state: true
  23. id: 123ab
  24. - alias: Shower - Idle python
  25. trigger:
  26. - platform: numeric_state
  27. entity_id: sensor.shower_relative_humidity_measurement
  28. below: 82
  29. for:
  30. minutes: 0
  31. action:
  32. service: python_script.set_state
  33. data_template:
  34. entity_id: binary_sensor.shower_status
  35. state: false
  36. id: 123abc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement