Another rebuild of E's wakeup script. One day I'll be happy...

This commit is contained in:
2023-01-16 14:04:09 -05:00
parent 7f662ab8d6
commit 6492edee5e
2 changed files with 46 additions and 31 deletions

View File

@ -23,6 +23,11 @@
after: '07:30' after: '07:30'
before: '09:00' before: '09:00'
- platform: tod
name: Late Morning
after: '09:00'
before: '12:00'
- platform: tod - platform: tod
name: Midday name: Midday
after: '09:00' after: '09:00'

View File

@ -242,37 +242,47 @@ script:
alias: "Emma Wakeup" alias: "Emma Wakeup"
mode: restart mode: restart
sequence: sequence:
- if: - choose:
- condition: state - conditions:
entity_id: input_boolean.early_night_mode - condition: state
state: 'on' entity_id: input_boolean.early_night_mode
then: state: 'on'
- service: input_select.select_option sequence:
target: - service: input_select.select_option
entity_id: input_select.emma_bedroom_scenes target:
data: entity_id: input_select.emma_bedroom_scenes
option: Nightlight data:
- service: light.turn_on option: Nightlight
target: - service: light.turn_on
entity_id: light.hallway_overhead target:
- delay: entity_id: light.hallway_overhead
seconds: 2 - delay:
- service: input_select.select_option seconds: 2
target: - service: input_select.select_option
entity_id: target:
- input_select.upstairs_hallway_scenes entity_id:
- input_select.master_bedroom_scenes - input_select.upstairs_hallway_scenes
data: - input_select.master_bedroom_scenes
option: Adaptive data:
else: option: Adaptive
- service: light.turn_on - conditions:
target: - condition: or
entity_id: light.emma_bedroom_light conditions:
- service: input_select.select_option - condition: state
target: entity_id: binary_sensor.morning
entity_id: input_select.emma_bedroom_scenes state: 'on'
data: - condition: state
option: Adaptive entity_id: binary_sensor.late_morning
state: 'on'
sequence:
- service: light.turn_on
target:
entity_id: light.emma_bedroom_light
- service: input_select.select_option
target:
entity_id: input_select.emma_bedroom_scenes
data:
option: Adaptive
- delay: - delay:
minutes: 5 minutes: 5
- service: input_boolean.turn_off - service: input_boolean.turn_off