diff --git a/config/lovelace/advanced_dashboard/08_automations.yaml b/config/lovelace/advanced_dashboard/08_automations.yaml index 1f025fb..4c844d2 100644 --- a/config/lovelace/advanced_dashboard/08_automations.yaml +++ b/config/lovelace/advanced_dashboard/08_automations.yaml @@ -136,6 +136,7 @@ cards: entities: - automation.bedroom_mode_set_to_day - automation.bedroom_mode_set_to_bed + - automation.bedroom_mode_set_to_night - automation.guest_bedroom_mode_set_to_night - automation.house_mode_set_to_day - automation.house_mode_set_to_night diff --git a/config/packages/modes/house_mode.yaml b/config/packages/modes/house_mode.yaml index a28fa18..79b51fb 100644 --- a/config/packages/modes/house_mode.yaml +++ b/config/packages/modes/house_mode.yaml @@ -77,6 +77,14 @@ automation: action: - service: script.routine_bedroom_bedtime + - alias: Bedroom mode · Set to night + trigger: + platform: state + entity_id: input_select.bedroom_mode + to: "night" + action: + - service: script.bedroom_good_night + - alias: Guest Bedroom mode · Set to night trigger: platform: state diff --git a/config/packages/routines/good_night.yaml b/config/packages/routines/good_night.yaml index a8f4807..ac332fb 100644 --- a/config/packages/routines/good_night.yaml +++ b/config/packages/routines/good_night.yaml @@ -1,11 +1,12 @@ script: - routine_good_night: - alias: Routine · Going to sleep + bedroom_good_night: + alias: Routine · Bedroom · Going to sleep sequence: + - service: sonos.unjoin + entity_id: media_player.master_bedroom - service: media_player.media_stop - entity_id: group.all_sonos - - # Use say_discretely instead of talk, because night mode is already on. + entity_id: media_player.master_bedroom + # Use say_discretely instead of talk, because night mode is already on. - service: script.say_discretely data: message: "Entering night mode. Good night!" @@ -23,6 +24,15 @@ script: data: option: "sleep" + - service: light.turn_off + entity_id: light.master_bedroom + + routine_good_night: + alias: Routine · Going to sleep + sequence: + - service: media_player.media_stop + entity_id: group.all_sonos + # Turn off everything else - service: homeassistant.turn_off entity_id: diff --git a/config/packages/routines/waking_up.yaml b/config/packages/routines/waking_up.yaml index e94017c..1c9757b 100644 --- a/config/packages/routines/waking_up.yaml +++ b/config/packages/routines/waking_up.yaml @@ -23,13 +23,15 @@ script: - condition: state entity_id: input_boolean.guest_bedroom state: "off" + - wait_template: "{{ is_state('input_boolean.sarah_talking', 'off') }}" + timeout: 00:02:00 + - delay: 00:00:0 - service: script.say data: message: "Here's some music to start the day!" - delay: 00:00:02 - service: script.music_play - routine_bedroom_morning: alias: Routine · Bedroom · Morning sequence: @@ -43,9 +45,6 @@ script: - light.bed_led - light.bedside - service: script.routine_morning_briefing - - wait_template: "{{ is_state('input_boolean.sarah_talking', 'off') }}" - timeout: 00:02:00 - - delay: 00:00:01 routine_morning_briefing: alias: Routine · Morning Briefing