Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### added in configurations.yaml
- - platform: template
- sensors:
- shower_status:
- friendly_name: "Shower Status"
- value_template: ""
- ### 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
- - alias: Shower - Running python
- trigger:
- - platform: numeric_state
- entity_id: sensor.shower_relative_humidity_measurement
- above: 70
- for:
- minutes: 0
- action:
- service: python_script.set_state
- data_template:
- entity_id: binary_sensor.shower_status
- state: true
- id: 123ab
- - alias: Shower - Idle python
- trigger:
- - platform: numeric_state
- entity_id: sensor.shower_relative_humidity_measurement
- below: 82
- for:
- minutes: 0
- action:
- service: python_script.set_state
- data_template:
- entity_id: binary_sensor.shower_status
- state: false
- id: 123abc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement