@ -1589,85 +1589,6 @@ automation:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.freeze_warning
|
||||
|
||||
- id: 288de6e1-ec3d-43fa-9be8-1b2e27e4ad85
|
||||
alias: Rain Window Warning
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.raining
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.windows
|
||||
state: 'on'
|
||||
action:
|
||||
- service: script.text_notify
|
||||
data:
|
||||
type: alert
|
||||
who: 'all'
|
||||
title: "WINDOWS ARE OPEN!"
|
||||
message: "It is raining and there are windows open in the house. Please close them!"
|
||||
tag: rain-window-warning
|
||||
- service: script.living_room_lights_alert
|
||||
data:
|
||||
type: blue
|
||||
duration: 10
|
||||
- if:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.basement_occupied
|
||||
state: 'on'
|
||||
then:
|
||||
- service: script.basement_lights_alert
|
||||
data:
|
||||
type: blue
|
||||
duration: 10
|
||||
- service: script.speech_engine
|
||||
data:
|
||||
who: everywhere
|
||||
type: weather
|
||||
message: "It is raining and there are windows open in the house. Please close them!"
|
||||
- wait_template: "{{ is_state('binary_sensor.windows','off') or is_state('binary_sensor.raining','off') }}"
|
||||
timeout: "00:15:00"
|
||||
continue_on_timeout: true
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: template
|
||||
value_template: "{{ is_state('binary_sensor.windows','off') and is_state('binary_sensor.raining','on') }}"
|
||||
sequence:
|
||||
- service: script.text_notify
|
||||
data:
|
||||
type: alert
|
||||
who: all
|
||||
message: clear_notification
|
||||
tag: rain-window-warning
|
||||
- service: script.speech_engine
|
||||
data:
|
||||
who: common
|
||||
type: weather
|
||||
message: "Windows are now closed. Thank you, and enjoy your dry house."
|
||||
- conditions:
|
||||
- condition: template
|
||||
value_template: "{{ is_state('binary_sensor.raining','off') }}"
|
||||
sequence:
|
||||
- service: script.text_notify
|
||||
data:
|
||||
type: alert
|
||||
who: all
|
||||
message: clear_notification
|
||||
tag: rain-window-warning
|
||||
- service: script.speech_engine
|
||||
data:
|
||||
who: common
|
||||
type: weather
|
||||
message: "Nevermind, it has stopped raining. Feel free to do whatever you'd like with the windows."
|
||||
default:
|
||||
- service: script.speech_engine
|
||||
data:
|
||||
who: common
|
||||
type: weather
|
||||
message: "Well, I guess no one cares if the house floods. Suit yourself, but do not say I didn't warn you."
|
||||
|
||||
|
||||
|
||||
################################################################################
|
||||
## script ##
|
||||
|
Reference in New Issue
Block a user