Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - alias: 'Turn off HVAC if window/door is opened'
- trigger:
- - platform: state
- entity_id:
- - binary_sensor.zone_01_front_door_garage_entry_42
- - binary_sensor.zone_3_window_next_to_front_door_30
- - binary_sensor.zone_11_laundry_window_38
- - binary_sensor.zone_12_living_room_patio_door_39
- - binary_sensor.zone_2_both_kitchen_window_29
- - binary_sensor.zone_10_window_next_to_front_door_37
- - binary_sensor.zone_4_living_room_laundry_window_31
- - binary_sensor.zone_8_3_windows_family_room_35
- - binary_sensor.zone_9_kitchen_window_36
- to: 'on'
- from: 'off'
- for:
- minutes: 5
- condition:
- condition: or
- conditions:
- - condition: template
- value_template: "{{ states('climate.downstairs_2') != 'off' }}"
- - condition: template
- value_template: "{{ states('climate.hallway_upstairs_2') != 'off' }}"
- action:
- - service: climate.set_hvac_mode
- data:
- entity_id: climate.downstairs_2
- hvac_mode: 'off'
- - service: climate.set_hvac_mode
- data:
- entity_id: climate.hallway_upstairs_2
- hvac_mode: 'off'
- - service: notify.slack_notify
- data_template:
- message: 'The {{ trigger.to_state.attributes.friendly_name }} has been opened for about 5 minutes. I will shut down the Air Conditioner so you can enjoy the fresh air.'
- - service: tts.google_say
- entity_id: group.allspeaktome
- data_template:
- message: 'The {{ trigger.to_state.attributes.friendly_name }} has been opened for about 5 minutes. I will shut down the Air Conditioner so you can enjoy the fresh air.'
- - service: notify.alexa_media_everywhere
- data_template:
- message: 'The {{ trigger.to_state.attributes.friendly_name }} has been opened for about 5 minutes. I will shut down the Air Conditioner so you can enjoy the fresh air.'
- data:
- type: 'announce'
- #-------------------------------------------#-------------------------------------------
- - alias: 'Turn HVAC back on when all doors/windows are closed.'
- trigger:
- - platform: state
- entity_id:
- - group.ext_entry
- to: 'off'
- from: 'on'
- for:
- minutes: 5
- condition:
- - condition: template
- value_template: "{{ states('climate.downstairs_2') == 'off' }}"
- action:
- - service: climate.set_hvac_mode
- data:
- entity_id: climate.downstairs_2
- hvac_mode: 'cool'
- - service: climate.set_hvac_mode
- data:
- entity_id: climate.hallway_upstairs_2
- hvac_mode: 'cool'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement