mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-06-15 17:12:59 +00:00
Music improvements
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
input_number:
|
||||
bathroom_high_volume:
|
||||
name: Bathroom high volume
|
||||
mode: box
|
||||
min: 0
|
||||
max: 1
|
||||
step: 0.05
|
||||
|
||||
@@ -35,8 +35,8 @@ automation:
|
||||
# brightness_pct: "{{ is_state('input_select.bedroom_mode', 'night') | iif(40, 100)}}"
|
||||
|
||||
double_click:
|
||||
- service: media_player.media_play_pause
|
||||
entity_id: media_player.master_bedroom
|
||||
- service: light.toggle
|
||||
entity_id: light.bedside
|
||||
|
||||
hold:
|
||||
- service: script.toggle_bedroom_mode
|
||||
|
||||
@@ -46,7 +46,11 @@ automation:
|
||||
- service: light.turn_off
|
||||
entity_id: light.all
|
||||
- service: media_player.media_stop
|
||||
entity_id: group.all_sonos
|
||||
entity_id:
|
||||
- media_player.master_bedroom
|
||||
- media_player.bathroom
|
||||
- media_player.kitchen
|
||||
- media_player.living_room
|
||||
|
||||
- alias: Simulation mode · 1100
|
||||
trigger:
|
||||
@@ -61,7 +65,11 @@ automation:
|
||||
at: "14:00:00"
|
||||
action:
|
||||
- service: media_player.media_stop
|
||||
entity_id: group.all_sonos
|
||||
entity_id:
|
||||
- media_player.master_bedroom
|
||||
- media_player.bathroom
|
||||
- media_player.kitchen
|
||||
- media_player.living_room
|
||||
|
||||
- alias: Simulation mode · 1700
|
||||
trigger:
|
||||
@@ -78,4 +86,8 @@ automation:
|
||||
at: "22:00:00"
|
||||
action:
|
||||
- service: media_player.media_stop
|
||||
entity_id: group.all_sonos
|
||||
entity_id:
|
||||
- media_player.master_bedroom
|
||||
- media_player.bathroom
|
||||
- media_player.kitchen
|
||||
- media_player.living_room
|
||||
|
||||
@@ -1,16 +1,30 @@
|
||||
script:
|
||||
music_play:
|
||||
alias: Music · Play
|
||||
music_prepare:
|
||||
alias: Music · Prepare
|
||||
mode: queued
|
||||
sequence:
|
||||
- service: script.sonos_join_bedroom
|
||||
- service: media_player.volume_set
|
||||
entity_id: group.all_sonos
|
||||
entity_id:
|
||||
- media_player.master_bedroom
|
||||
- media_player.bathroom
|
||||
- media_player.kitchen
|
||||
- media_player.living_room
|
||||
data_template:
|
||||
volume_level: "{{ volume_level | default(0.2) }}"
|
||||
- service: media_player.shuffle_set
|
||||
entity_id: media_player.master_bedroom
|
||||
data_template:
|
||||
shuffle: "{{ shuffle | default(true) }}"
|
||||
|
||||
music_play:
|
||||
alias: Music · Play
|
||||
mode: queued
|
||||
sequence:
|
||||
- service: script.music_prepare
|
||||
data_template:
|
||||
shuffle: "{{ shuffle | default(true) }}"
|
||||
volume_level: "{{ volume_level | default(0.2) }}"
|
||||
- service: media_player.select_source
|
||||
entity_id: media_player.master_bedroom
|
||||
data_template:
|
||||
|
||||
@@ -31,7 +31,11 @@ script:
|
||||
alias: Routine · Going to sleep
|
||||
sequence:
|
||||
- service: media_player.media_stop
|
||||
entity_id: group.all_sonos
|
||||
entity_id:
|
||||
- media_player.master_bedroom
|
||||
- media_player.bathroom
|
||||
- media_player.kitchen
|
||||
- media_player.living_room
|
||||
|
||||
# Turn off everything else
|
||||
- service: homeassistant.turn_off
|
||||
|
||||
@@ -13,7 +13,11 @@ script:
|
||||
- fan.philips_airpurifier
|
||||
|
||||
- service: media_player.media_stop
|
||||
entity_id: group.all_sonos
|
||||
entity_id:
|
||||
- media_player.master_bedroom
|
||||
- media_player.bathroom
|
||||
- media_player.kitchen
|
||||
- media_player.living_room
|
||||
|
||||
- service: light.turn_on
|
||||
entity_id:
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
input_text:
|
||||
wake_up_spotify_playlist:
|
||||
name: Waking up Spotify playlist
|
||||
icon: mdi:spotify
|
||||
|
||||
input_number:
|
||||
wake_up_volume:
|
||||
name: Waking up volume
|
||||
min: 0
|
||||
max: 1
|
||||
step: 0.05
|
||||
icon: mdi:volume-high
|
||||
|
||||
script:
|
||||
routine_waking_up:
|
||||
alias: Routine · Waking up
|
||||
@@ -29,10 +42,16 @@ script:
|
||||
# data:
|
||||
# message: "Here's some music to start the day!"
|
||||
# - delay: 00:00:02
|
||||
- service: script.music_play
|
||||
data:
|
||||
volume_level: 0.1
|
||||
- service: script.music_prepare
|
||||
data_template:
|
||||
volume_level: "{{ states('input_number.wake_up_volume') | float }}"
|
||||
shuffle: true
|
||||
- service: media_player.play_media
|
||||
target:
|
||||
entity_id: media_player.master_bedroom
|
||||
data_template:
|
||||
media_content_type: "music"
|
||||
media_content_id: "{{ states('input_text.wake_up_spotify_playlist') }}"
|
||||
|
||||
routine_bedroom_morning:
|
||||
alias: Routine · Bedroom · Morning
|
||||
|
||||
Reference in New Issue
Block a user