Naming according to convention. Refactor routines

This commit is contained in:
2020-03-05 14:08:01 +02:00
parent 05274b33d7
commit a502308176
15 changed files with 144 additions and 113 deletions
+22
View File
@@ -0,0 +1,22 @@
script:
routine_bedtime:
alias: Routine - Bedtime
sequence:
- service: media_player.media_stop
entity_id: media_player.master_bedroom
- service: fan.turn_on
entity_id: fan.philips_airpurifier
- service: media_player.turn_off
entity_id:
- media_player.living_room_tv
- media_player.living_room_tv_2
- service: light.turn_off
entity_id: light.living_room_all_lights
- delay: "00:00:02"
- service: media_player.volume_set
entity_id: media_player.master_bedroom
data:
volume_level: 0.1
- service: script.say_discretely
data:
message: "Entering sleep mode. Good night!"
+44
View File
@@ -0,0 +1,44 @@
input_boolean:
routine_welcome_home:
name: Coming home - Say welcome
initial: on
icon: mdi:account-plus-outline
script:
routine_coming_home:
alias: Routine - Coming home
sequence:
- service: script.security_camera_off
- service: script.coming_home_say_welcome
- service: light.turn_on
entity_id: light.living_room_all_lights
- service: input_boolean.turn_on
entity_id: input_boolean.speech_notifications
- condition: state
entity_id: input_boolean.routine_welcome_home
state: "on"
- service: media_player.shuffle_set
entity_id: media_player.master_bedroom
data:
shuffle: true
- service: media_player.select_source
entity_id: media_player.master_bedroom
data:
source: Evening Chill
# - service: media_player.turn_on
# entity_id: media_player.living_room_tv_2
# - delay: "00:00:10"
# - service: spotcast.start
# data:
# device_name: "Living Room TV"
# uri: "spotify:playlist:1dstTefWFQaBFTC6CjcEHd"
# random_song: true
coming_home_say_welcome:
alias: Routine - Coming home - Say welcome
sequence:
- condition: state
entity_id: input_boolean.routine_welcome_home
state: "on"
- service: script.sonos_blast
data:
message: "Welcome home, George!"
+17
View File
@@ -0,0 +1,17 @@
script:
routine_leaving_home:
alias: Routine - Leaving home
sequence:
- service: input_boolean.turn_off
entity_id: input_boolean.georgi_home
- service: script.security_camera_on
- service: media_player.turn_off
entity_id:
- media_player.living_room_tv
- media_player.living_room_tv_2
- service: media_player.media_stop
entity_id: media_player.master_bedroom
- service: light.turn_off
entity_id: light.living_room_all_lights
- service: input_boolean.turn_off
entity_id: input_boolean.speech_notifications
+20
View File
@@ -0,0 +1,20 @@
script:
routine_waking_up:
alias: Routine - Waking up
sequence:
- service: media_player.volume_set
entity_id: media_player.master_bedroom
data:
volume_level: 0.3
- service: script.sarah_briefing
- delay: "00:00:25"
- service: script.talk
data:
message: "Here's some music to start the day!"
- delay: "00:00:02"
- service: media_player.select_source
entity_id: media_player.master_bedroom
data:
source: "Evening Chill"
- service: fan.turn_off
entity_id: fan.philips_airpurifier