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: entities:
- automation.bedroom_mode_set_to_day - automation.bedroom_mode_set_to_day
- automation.bedroom_mode_set_to_bed - automation.bedroom_mode_set_to_bed
- automation.bedroom_mode_set_to_night
- automation.guest_bedroom_mode_set_to_night - automation.guest_bedroom_mode_set_to_night
- automation.house_mode_set_to_day - automation.house_mode_set_to_day
- automation.house_mode_set_to_night - automation.house_mode_set_to_night
+8
View File
@@ -77,6 +77,14 @@ automation:
action: action:
- service: script.routine_bedroom_bedtime - 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 - alias: Guest Bedroom mode · Set to night
trigger: trigger:
platform: state platform: state
+15 -5
View File
@@ -1,11 +1,12 @@
script: script:
routine_good_night: bedroom_good_night:
alias: Routine · Going to sleep alias: Routine · Bedroom · Going to sleep
sequence: sequence:
- service: sonos.unjoin
entity_id: media_player.master_bedroom
- service: media_player.media_stop - service: media_player.media_stop
entity_id: group.all_sonos entity_id: media_player.master_bedroom
# Use say_discretely instead of talk, because night mode is already on.
# Use say_discretely instead of talk, because night mode is already on.
- service: script.say_discretely - service: script.say_discretely
data: data:
message: "Entering night mode. Good night!" message: "Entering night mode. Good night!"
@@ -23,6 +24,15 @@ script:
data: data:
option: "sleep" 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 # Turn off everything else
- service: homeassistant.turn_off - service: homeassistant.turn_off
entity_id: entity_id:
+3 -4
View File
@@ -23,13 +23,15 @@ script:
- condition: state - condition: state
entity_id: input_boolean.guest_bedroom entity_id: input_boolean.guest_bedroom
state: "off" state: "off"
- wait_template: "{{ is_state('input_boolean.sarah_talking', 'off') }}"
timeout: 00:02:00
- delay: 00:00:0
- service: script.say - service: script.say
data: data:
message: "Here's some music to start the day!" message: "Here's some music to start the day!"
- delay: 00:00:02 - delay: 00:00:02
- service: script.music_play - service: script.music_play
routine_bedroom_morning: routine_bedroom_morning:
alias: Routine · Bedroom · Morning alias: Routine · Bedroom · Morning
sequence: sequence:
@@ -43,9 +45,6 @@ script:
- light.bed_led - light.bed_led
- light.bedside - light.bedside
- service: script.routine_morning_briefing - 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: routine_morning_briefing:
alias: Routine · Morning Briefing alias: Routine · Morning Briefing