Shower mode window alert, close #204

This commit is contained in:
2024-07-22 21:56:53 -04:00
parent 74588ed2c9
commit 2c559ec2c4
2 changed files with 89 additions and 1 deletions

View File

@ -4952,3 +4952,78 @@
data: {}
alias: Run evening scheduling
mode: restart
- id: '1721699562332'
alias: Shower Mode Window Alert
description: Reminder to close the upstairs bathroom window after a shower
trigger:
- platform: state
entity_id:
- input_boolean.shower_mode
from: 'on'
to: 'off'
id: shower-off
alias: Shower Mode Off
- platform: state
entity_id:
- input_boolean.shower_mode
from: 'off'
to: 'on'
id: shower-on
alias: Shower Mode On
condition:
- condition: state
entity_id: binary_sensor.upstairs_bathroom_window
state: 'on'
alias: Upstairs bathroom window is open
action:
- if:
- condition: trigger
id:
- shower-on
then:
- stop: Shower mode turned back on
alias: If shower mode is turned back on
- alias: Repeat notifications
repeat:
sequence:
- alias: Wait for window to close, limit 5 minutes
wait_for_trigger:
- platform: state
entity_id:
- binary_sensor.upstairs_bathroom_window
from: 'on'
to: 'off'
id: window_closed
alias: Window is closed
timeout:
hours: 0
minutes: 5
seconds: 0
milliseconds: 0
- alias: Run the appropriate notification actions
choose:
- conditions:
- condition: template
value_template: '{{ is_state(''binary_sensor.upstairs_bathroom_window'',''on'')
or wait.trigger == ''none'' }}'
alias: Window is still open
sequence:
- service: script.status_annc
metadata: {}
data:
who: common
call_interruption: 1
call_snark_shower_mode_window: 1
- conditions:
- condition: template
value_template: '{{ wait.trigger.id == ''window_closed'' or is_state(''binary_sensor.upstairs_bathroom_window'',''off'')
}}'
alias: Window is closed
sequence:
- stop: Window was closed
until:
- alias: Window is closed
condition: state
entity_id: binary_sensor.upstairs_bathroom_window
state: 'off'
mode: restart

View File

@ -1786,6 +1786,15 @@ script:
] | random }}
{%- endmacro -%}
{%- macro snark_shower_mode_window() -%}
{{ [
'Now that you have finished showering, you may want to consider shutting the upstairs bathroom window.',
'As there is no screen in the upstairs bathroom window, you should shut it to prevent bugs and other unwanted creatures from getting into the house.',
'Hey, you left the upstairs bathroom window open after your shower. Do something about that ASAP.',
'The second floor already has enough trouble maintaining temperature, please close the upstairs bathroom window after your shower.'
] | random }}
{%- endmacro -%}
{%- macro school_pickup_reminder() -%}
{{ [
'It is almost time to head to school ',
@ -1943,7 +1952,11 @@ script:
{% endif %}
{% if call_snark_door_closed == 1 %}
{{ snark_door_closed () }}
{{ snark_door_closed() }}
{% endif %}
{% if call_snark_shower_mode_window == 1 %}
{{ snark_shower_mode_window() }}
{% endif %}
{% if call_school_pickup_reminder == 1 %}