Added warning if windows are open when it starts raining
This commit is contained in:
@ -1540,6 +1540,31 @@ automation:
|
|||||||
- service: input_boolean.turn_on
|
- service: input_boolean.turn_on
|
||||||
entity_id: input_boolean.freeze_warning
|
entity_id: input_boolean.freeze_warning
|
||||||
|
|
||||||
|
- alias: Rain Window Warning
|
||||||
|
trigger:
|
||||||
|
- platform: state
|
||||||
|
entity_id: binary_sensor.precipitation
|
||||||
|
to: 'on'
|
||||||
|
condition:
|
||||||
|
- condition: state
|
||||||
|
entity_id: binary_sensor.people_present
|
||||||
|
state: 'on'
|
||||||
|
- condition: state
|
||||||
|
entity_id: binary_sensor.windows
|
||||||
|
state: 'on'
|
||||||
|
action:
|
||||||
|
- service: script.text_notify_all
|
||||||
|
data:
|
||||||
|
title: "WINDOWS ARE OPEN!"
|
||||||
|
message: "It is raining and there are windows open in the house. Please close them!"
|
||||||
|
- service: notify.alexa_media
|
||||||
|
data:
|
||||||
|
data:
|
||||||
|
method: all
|
||||||
|
type: announce
|
||||||
|
message: "It is raining and there are windows open in the house. Please close them!"
|
||||||
|
target: Living Room Echo Dot, Basement Echo Dot, Master Bedroom Echo Dot
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
@ -2,4 +2,13 @@ binary_sensor:
|
|||||||
- name: People Present
|
- name: People Present
|
||||||
state: >
|
state: >
|
||||||
{{ is_state('person.tony_stork', 'home')
|
{{ is_state('person.tony_stork', 'home')
|
||||||
or is_state('person.christina_stork', 'home') }}
|
or is_state('person.christina_stork', 'home') }}
|
||||||
|
|
||||||
|
- name: Precipitation
|
||||||
|
state: >-
|
||||||
|
{% if states.weather.iron_nerd_weather_station.state in ['rainy','thunderstorm','lightning','sleet','snow','snowy','hail'] %}
|
||||||
|
true
|
||||||
|
{% else %}
|
||||||
|
false
|
||||||
|
{% endif %}
|
||||||
|
icon: mdi:water
|
Reference in New Issue
Block a user