Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Notify when windows are open
- automation:
- - alias: AC on with open window - Living Room
- trigger:
- platform: state
- entity_id: input_boolean.ac_damper_living_room
- from: 'off'
- to: 'on'
- for:
- seconds: '60'
- condition:
- condition: or
- conditions:
- - condition: state
- entity_id: binary_sensor.balcony_window
- state: 'on'
- - condition: state
- entity_id: binary_sensor.bathroom_door
- state: 'on'
- action:
- - service: tts.google_translate_say
- data_template:
- entity_id: media_player.all_speakers
- message: >
- {% set balcony_window = is_state("binary_sensor.balcony_window", "on") -%}
- {% set bathroom_door = is_state("binary_sensor.bathroom_door", "on") -%}
- {% set both = (balcony_window and bathroom_door) %}
- You turned on the Living Room AC, but the {{ 'balcony window' if balcony_window }}{{ ' and ' if both }}{{ 'bathroom door' if bathroom_door }} {{'are' if both else 'is'}} open. You might want to close {{ 'them' if both else 'it' }} :)
Add Comment
Please, Sign In to add comment