I'm just never gonna be finished with E's bedroom automation...

Might even move it to Node-RED eventually. Who knows?
This commit is contained in:
2023-02-05 14:55:51 -05:00
parent 9d397c9f2b
commit a8a587bd28
2 changed files with 121 additions and 82 deletions

View File

@ -203,63 +203,3 @@ input_number:
step: 1 step: 1
unit_of_measurement: °F unit_of_measurement: °F
icon: mdi:thermometer icon: mdi:thermometer
automation:
- id: '1655415573165'
alias: Emma Bedroom Handling
description: "For scheduled operations in Emma's bedroom"
trigger:
- platform: time
at: input_datetime.emma_wakeup
id: emma-wakeup
- platform: time
at: input_datetime.emma_bedtime
id: emma-bedtime
condition:
- condition: state
entity_id: input_boolean.vacation_mode
state: 'off'
action:
- if:
- condition: trigger
id: emma-wakeup
then:
- service: script.emma_wakeup
- if:
- condition: trigger
id: emma-bedtime
then:
- choose:
- conditions:
- condition: state
entity_id: input_select.scheduled_climate_mode_emma_aircon
state: AC
sequence:
- service: fan.turn_on
target:
entity_id: fan.emma_air_conditioner
- service: script.text_notify
data:
who: "parents"
title: "Emma Climate Schedule"
message: "The air conditioner in Emma's Bedroom has been activated."
- conditions:
- condition: state
entity_id: input_select.scheduled_climate_mode_emma_aircon
state: White Noise
sequence:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.white_noise_emma_bedroom
- service: script.text_notify
data:
who: "parents"
title: "Emma Climate Schedule"
message: "White noise has been activated in Emma's Bedroom."
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."
mode: restart

View File

@ -31,16 +31,48 @@ automation:
- condition: trigger - condition: trigger
id: sleep-on id: sleep-on
sequence: sequence:
- service: script.emma_naptime - service: script.emma_sleep
- conditions: - conditions:
- condition: trigger - condition: trigger
id: sleep-off id: sleep-off
sequence: sequence:
- service: script.emma_wakeup - service: script.emma_wakeup
- id: '1655415573165'
alias: Emma Bedroom Handling
description: "For scheduled operations in Emma's bedroom"
trigger:
- platform: time
at: input_datetime.emma_wakeup
id: emma-wakeup
- platform: time
at: input_datetime.emma_bedtime
id: emma-bedtime
condition:
- condition: state
entity_id: input_boolean.vacation_mode
state: 'off'
action:
- choose:
- conditions:
- condition: trigger
id: emma-wakeup
sequence:
- service: input_boolean.turn_off
target:
entity_id: input_boolean.emma_sleeping
- conditions:
- condition: trigger
id: emma-bedtime
sequence:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.emma_sleeping
mode: restart
script: script:
emma_naptime: emma_sleep:
alias: 'Emma Naptime' alias: 'Emma Sleep'
icon: mdi:lightbulb-night icon: mdi:lightbulb-night
mode: restart mode: restart
sequence: sequence:
@ -50,29 +82,96 @@ script:
entity_id: binary_sensor.early_night_mode entity_id: binary_sensor.early_night_mode
state: 'on' state: 'on'
sequence: sequence:
- service: light.turn_on - if:
target: - condition: state
entity_id: entity_id: input_boolean.give_me_darkness
- light.emma_bedroom_light state: 'on'
- light.hallway_overhead then:
- service: input_boolean.turn_on - service: light.turn_on
target: target:
entity_id: input_boolean.white_noise_emma_bedroom entity_id:
- service: input_select.select_option - light.emma_bedroom_light
target: - delay:
entity_id: seconds: 1
- input_select.emma_bedroom_scenes - service: input_select.select_option
- input_select.upstairs_hallway_scenes target:
data: entity_id:
option: Adaptive - input_select.emma_bedroom_scenes
data:
option: Adaptive
else:
- service: light.turn_on
target:
entity_id:
- light.emma_bedroom_light
- light.hallway_overhead
- delay:
seconds: 1
- service: input_select.select_option
target:
entity_id:
- input_select.emma_bedroom_scenes
- input_select.upstairs_hallway_scenes
data:
option: Adaptive
- choose:
- conditions:
- condition: state
entity_id: input_select.scheduled_climate_mode_emma_aircon
state: AC
sequence:
- service: fan.turn_on
target:
entity_id: fan.emma_air_conditioner
- service: script.text_notify
data:
who: "parents"
title: "Emma Climate Schedule"
message: "The air conditioner in Emma's Bedroom has been activated."
- conditions:
- condition: state
entity_id: input_select.scheduled_climate_mode_emma_aircon
state: White Noise
sequence:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.white_noise_emma_bedroom
- service: script.text_notify
data:
who: "parents"
title: "Emma Climate Schedule"
message: "White noise has been activated in Emma's Bedroom."
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."
- conditions: - conditions:
- condition: state - condition: state
entity_id: binary_sensor.early_night_mode entity_id: binary_sensor.early_night_mode
state: 'off' state: 'off'
sequence: sequence:
- service: input_boolean.turn_on - if:
target: - condition: template
entity_id: input_boolean.white_noise_emma_bedroom value_template: >
{% if is_state('input_boolean.emma_bedroom_aircon_installed','on') %}
{% if (states('sensor.pirateweather_temperature') | int) > (states('input_number.emma_aircon_threshold') | int) %}
true
{% else %}
false
{% endif %}
{% else %}
false
{% endif %}
then:
- service: fan.turn_on
target:
entity_id: fan.emma_air_conditioner
else:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.white_noise_emma_bedroom
emma_wakeup: emma_wakeup:
alias: 'Emma Wakeup' alias: 'Emma Wakeup'