mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-06-15 17:12:59 +00:00
Improve automations for 2 bedrooms
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
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
|
||||
|
||||
entity_id: media_player.master_bedroom
|
||||
# Use say_discretely instead of talk, because night mode is already on.
|
||||
- service: script.say_discretely
|
||||
data:
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user