Improve automations for 2 bedrooms

This commit is contained in:
2021-11-21 10:05:03 +02:00
parent 444b226023
commit 0f9e17c6e4
4 changed files with 27 additions and 9 deletions
@@ -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
+8
View File
@@ -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
+15 -5
View File
@@ -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:
+3 -4
View File
@@ -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