Separate E's bedtime and cooling schedules

This commit is contained in:
2024-05-01 20:30:46 -04:00
parent fae9129712
commit c3239ddec7
5 changed files with 227 additions and 151 deletions

View File

@ -3137,3 +3137,169 @@ rabbit_hutch_cleaning:
tag: rabbit-hutch-cleaning
mode: restart
icon: mdi:rabbit
emma_sleep:
alias: Emma Sleep
sequence:
- if:
- condition: time
after: 04:00:00
before: '17:00:00'
then:
- service: script.emma_bedroom_scheduling_evening
data: {}
alias: Run scheduling if it hasn't already been run
- service: script.turn_off
target:
entity_id:
- script.emma_ibuprofen
- script.emma_tylenol
- script.emma_cough_meds
data: {}
alias: Reset med trackers
- service: light.turn_on
target:
entity_id:
- light.emma_bedroom_light
data: {}
alias: Turn on light
- delay:
seconds: 1
- service: input_select.select_option
target:
entity_id:
- input_select.emma_bedroom_scenes
data:
option: Adaptive
alias: Set lights to adaptive
- alias: Climate Controls
choose:
- conditions:
- alias: If Emma has napped or it is clearly bedtime
condition: or
conditions:
- condition: state
entity_id: input_boolean.emma_has_napped
state: 'on'
alias: Emma has napped
- condition: time
after: '23:00:00'
before: 04:00:00
alias: It is definitely bedtime
sequence:
- alias: Select climate mode
choose:
- conditions:
- alias: AC
condition: and
conditions:
- condition: state
entity_id: input_select.scheduled_climate_mode_emma_aircon
state: AC
alias: Scheduled mode is AC
- condition: state
entity_id: fan.emma_air_conditioner
state: 'off'
alias: Air conditioner is not already on
sequence:
- service: fan.turn_on
target:
entity_id: fan.emma_air_conditioner
data: {}
alias: Turn on air conditioner
- service: script.text_notify
data:
who: parents
title: Emma Climate Schedule
message: The air conditioner in Emma's Bedroom has been activated.
type: normal
tag: emma-climate
alias: Send AC notification
- conditions:
- alias: White Noise
condition: and
conditions:
- condition: state
entity_id: input_select.scheduled_climate_mode_emma_aircon
state: White Noise
alias: Scheduled mode is White Noise
- condition: state
entity_id: input_boolean.white_noise_emma_bedroom
state: 'off'
alias: White Noise is not already on
sequence:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.white_noise_emma_bedroom
data: {}
alias: Turn on white noise
- service: script.text_notify
data:
who: parents
title: Emma Climate Schedule
message: White noise has been activated in Emma's Bedroom.
type: normal
tag: emma-climate
alias: Send white noise notification
default:
- service: script.text_notify
data:
who: parents
title: Emma Climate Schedule
message: No option selected for Emma's climate mode. No devices will be
activated.
type: normal
tag: emma-climate
alias: Send notification that no climate mode is selected
- conditions:
- alias: If Emma has NOT napped and the time is appropriate
condition: and
conditions:
- condition: state
entity_id: input_boolean.emma_has_napped
state: 'off'
alias: Emma has not napped
- condition: time
before: '23:00:00'
after: 04:00:00
alias: It is not bedtime
sequence:
- alias: Select naptime climate mode
choose:
- conditions:
- alias: AC
condition: and
conditions:
- condition: state
entity_id: input_select.naptime_climate_mode_emma_aircon
state: AC
alias: Scheduled naptime mode is AC
- condition: state
entity_id: fan.emma_air_conditioner
state: 'off'
alias: Air conditioner is not already on
sequence:
- service: fan.turn_on
target:
entity_id: fan.emma_air_conditioner
data: {}
alias: Turn on AC
- conditions:
- alias: White Noise
condition: and
conditions:
- condition: state
entity_id: input_select.naptime_climate_mode_emma_aircon
state: White Noise
alias: Scheduled naptime mode is White Noise
- condition: state
entity_id: input_boolean.white_noise_emma_bedroom
state: 'off'
alias: White Noise is not already on
sequence:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.white_noise_emma_bedroom
data: {}
alias: Turn on white noise
icon: mdi:lightbulb-night
mode: restart