mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-09-08 10:38:44 +00:00
Add input_select for sonos leader
This commit is contained in:
@@ -39,6 +39,7 @@ logger:
|
|||||||
default: warning
|
default: warning
|
||||||
logs:
|
logs:
|
||||||
homeassistant.components.amcrest: error
|
homeassistant.components.amcrest: error
|
||||||
|
zigpy.util: error
|
||||||
|
|
||||||
#
|
#
|
||||||
# ─── INTEGRATIONS ───────────────────────────────────────────────────────────────
|
# ─── INTEGRATIONS ───────────────────────────────────────────────────────────────
|
||||||
|
|||||||
+27
-21
@@ -44,10 +44,10 @@ cards:
|
|||||||
title: Devices
|
title: Devices
|
||||||
show_header_toggle: false
|
show_header_toggle: false
|
||||||
entities:
|
entities:
|
||||||
- entity: switch.camera
|
- switch.camera
|
||||||
- entity: media_player.living_room_tv
|
- media_player.living_room_tv
|
||||||
- entity: media_player.nvidia_shield
|
- media_player.nvidia_shield
|
||||||
- entity: fan.philips_airpurifier
|
- fan.philips_airpurifier
|
||||||
|
|
||||||
- type: "custom:mini-media-player"
|
- type: "custom:mini-media-player"
|
||||||
artwork: cover
|
artwork: cover
|
||||||
@@ -69,15 +69,21 @@ cards:
|
|||||||
when_idle: true
|
when_idle: true
|
||||||
when_standby: true
|
when_standby: true
|
||||||
|
|
||||||
|
- type: entities
|
||||||
|
show_header_toggle: false
|
||||||
|
entities:
|
||||||
|
- entity: input_select.sonos_leader
|
||||||
|
icon: mdi:speaker
|
||||||
|
|
||||||
- type: entities
|
- type: entities
|
||||||
title: Manual Overrides
|
title: Manual Overrides
|
||||||
show_header_toggle: false
|
show_header_toggle: false
|
||||||
entities:
|
entities:
|
||||||
- entity: input_boolean.speech_notifications
|
- input_boolean.speech_notifications
|
||||||
- entity: input_boolean.guest_mode
|
- input_boolean.guest_mode
|
||||||
- entity: input_boolean.domestina
|
- input_boolean.domestina
|
||||||
- entity: input_boolean.sleep_mode
|
- input_boolean.sleep_mode
|
||||||
- entity: input_boolean.georgi_home
|
- input_boolean.georgi_home
|
||||||
|
|
||||||
# Column 2: Sensors
|
# Column 2: Sensors
|
||||||
- type: vertical-stack
|
- type: vertical-stack
|
||||||
@@ -86,26 +92,26 @@ cards:
|
|||||||
title: Sensors
|
title: Sensors
|
||||||
show_header_toggle: false
|
show_header_toggle: false
|
||||||
entities:
|
entities:
|
||||||
- entity: binary_sensor.front_door_on_off_wrapper
|
- binary_sensor.front_door_on_off_wrapper
|
||||||
- entity: binary_sensor.living_room_right_window_on_off_wrapper
|
- binary_sensor.living_room_right_window_on_off_wrapper
|
||||||
- entity: binary_sensor.bedroom_right_window_on_off_wrapper
|
- binary_sensor.bedroom_right_window_on_off_wrapper
|
||||||
|
|
||||||
- type: entities
|
- type: entities
|
||||||
title: Presence
|
title: Presence
|
||||||
show_header_toggle: false
|
show_header_toggle: false
|
||||||
entities:
|
entities:
|
||||||
- entity: binary_sensor.georgi_home
|
- binary_sensor.georgi_home
|
||||||
- entity: device_tracker.carbon
|
- device_tracker.carbon
|
||||||
- entity: device_tracker.tile_1bcb2b3021b9f96b
|
- device_tracker.tile_1bcb2b3021b9f96b
|
||||||
|
|
||||||
- type: entities
|
- type: entities
|
||||||
title: Misc Badges
|
title: Misc Badges
|
||||||
show_header_toggle: false
|
show_header_toggle: false
|
||||||
entities:
|
entities:
|
||||||
- entity: sun.sun
|
- sun.sun
|
||||||
- entity: sensor.carbon_battery_level
|
- sensor.carbon_battery_level
|
||||||
- entity: sensor.carbon_steps
|
- sensor.carbon_steps
|
||||||
- entity: binary_sensor.updater
|
- binary_sensor.updater
|
||||||
|
|
||||||
# Column 3: Misc
|
# Column 3: Misc
|
||||||
- type: vertical-stack
|
- type: vertical-stack
|
||||||
@@ -127,5 +133,5 @@ cards:
|
|||||||
- duration
|
- duration
|
||||||
- distance
|
- distance
|
||||||
entities:
|
entities:
|
||||||
- entity: sensor.home_to_work
|
- sensor.home_to_work
|
||||||
- entity: sensor.work_to_home
|
- sensor.work_to_home
|
||||||
|
|||||||
@@ -73,8 +73,8 @@ cards:
|
|||||||
show_name: false
|
show_name: false
|
||||||
show_state: true
|
show_state: true
|
||||||
entities:
|
entities:
|
||||||
- entity: binary_sensor.living_room_right_window_on_off_wrapper
|
- binary_sensor.living_room_right_window_on_off_wrapper
|
||||||
- entity: sensor.living_room_right_window_power
|
- sensor.living_room_right_window_power
|
||||||
|
|
||||||
- type: vertical-stack
|
- type: vertical-stack
|
||||||
cards:
|
cards:
|
||||||
@@ -88,6 +88,6 @@ cards:
|
|||||||
title: Camera Controls
|
title: Camera Controls
|
||||||
show_header_toggle: false
|
show_header_toggle: false
|
||||||
entities:
|
entities:
|
||||||
- entity: switch.camera
|
- switch.camera
|
||||||
- entity: binary_sensor.amcrest_camera_online
|
- binary_sensor.amcrest_camera_online
|
||||||
- entity: binary_sensor.amcrest_camera_motion_detected
|
- binary_sensor.amcrest_camera_motion_detected
|
||||||
|
|||||||
@@ -37,8 +37,8 @@ cards:
|
|||||||
title: Window
|
title: Window
|
||||||
show_name: false
|
show_name: false
|
||||||
entities:
|
entities:
|
||||||
- entity: binary_sensor.bedroom_right_window_on_off_wrapper
|
- binary_sensor.bedroom_right_window_on_off_wrapper
|
||||||
- entity: sensor.bedroom_right_window_power
|
- sensor.bedroom_right_window_power
|
||||||
|
|
||||||
- type: "custom:mini-graph-card"
|
- type: "custom:mini-graph-card"
|
||||||
animate: true
|
animate: true
|
||||||
|
|||||||
+27
-27
@@ -7,35 +7,35 @@ cards:
|
|||||||
title: Automations
|
title: Automations
|
||||||
show_header_toggle: false
|
show_header_toggle: false
|
||||||
entities:
|
entities:
|
||||||
- entity: input_boolean.routine_welcome_home
|
- input_boolean.routine_welcome_home
|
||||||
- entity: automation.security_door_opened_while_away
|
- automation.security_door_opened_while_away
|
||||||
- entity: automation.presence_arrival_detection
|
- automation.presence_arrival_detection
|
||||||
- entity: automation.coming_home
|
- automation.coming_home
|
||||||
- entity: automation.leaving_work_to_home
|
- automation.leaving_work_to_home
|
||||||
- entity: automation.leaving_home
|
- automation.leaving_home
|
||||||
- entity: automation.master_bedroom_bedside_light_on_bedside_switch_single_click
|
- automation.master_bedroom_bedside_light_on_bedside_switch_single_click
|
||||||
- entity: automation.cube_knock
|
- automation.cube_knock
|
||||||
- entity: automation.cube_shake
|
- automation.cube_shake
|
||||||
- entity: automation.enable_guest_mode
|
- automation.enable_guest_mode
|
||||||
- entity: automation.disable_guest_mode
|
- automation.disable_guest_mode
|
||||||
- entity: automation.enable_sleep_mode
|
- automation.enable_sleep_mode
|
||||||
- entity: automation.disable_sleep_mode
|
- automation.disable_sleep_mode
|
||||||
- entity: automation.sleep_toggle_on_switch_tap
|
- automation.sleep_toggle_on_switch_tap
|
||||||
- entity: automation.domestina_automate_start
|
- automation.domestina_automate_start
|
||||||
- entity: automation.domestina_start
|
- automation.domestina_start
|
||||||
- entity: automation.domestina_automate_end
|
- automation.domestina_automate_end
|
||||||
- entity: automation.domestina_end
|
- automation.domestina_end
|
||||||
- entity: automation.speech_telegram_do_nothing
|
- automation.speech_telegram_do_nothing
|
||||||
- entity: automation.camera_turn_off_on_startup
|
- automation.camera_turn_off_on_startup
|
||||||
- entity: automation.system_announce_start
|
- automation.system_announce_start
|
||||||
|
|
||||||
- type: entities
|
- type: entities
|
||||||
title: Batteries
|
title: Batteries
|
||||||
show_header_toggle: false
|
show_header_toggle: false
|
||||||
entities:
|
entities:
|
||||||
- entity: sensor.front_door_power
|
- sensor.front_door_power
|
||||||
- entity: sensor.living_room_right_window_power
|
- sensor.living_room_right_window_power
|
||||||
- entity: sensor.bedroom_right_window_power
|
- sensor.bedroom_right_window_power
|
||||||
- entity: sensor.bedroom_weather_power
|
- sensor.bedroom_weather_power
|
||||||
- entity: sensor.cube_power
|
- sensor.cube_power
|
||||||
- entity: sensor.master_bedroom_bedside_switch_power
|
- sensor.master_bedroom_bedside_switch_power
|
||||||
|
|||||||
@@ -6,29 +6,37 @@ group:
|
|||||||
- media_player.living_room
|
- media_player.living_room
|
||||||
- media_player.kitchen
|
- media_player.kitchen
|
||||||
|
|
||||||
|
input_select:
|
||||||
|
sonos_leader:
|
||||||
|
name: "Sonos Leader"
|
||||||
|
initial: media_player.master_bedroom
|
||||||
|
options:
|
||||||
|
- media_player.master_bedroom
|
||||||
|
- media_player.living_room
|
||||||
|
- media_player.kitchen
|
||||||
|
|
||||||
script:
|
script:
|
||||||
music_play:
|
music_play:
|
||||||
alias: "Music · Play"
|
alias: "Music · Play"
|
||||||
sequence:
|
sequence:
|
||||||
|
- service: script.music_join_sonoses
|
||||||
- service: media_player.volume_set
|
- service: media_player.volume_set
|
||||||
entity_id: media_player.master_bedroom
|
entity_id: group.all_sonos
|
||||||
data_template:
|
data_template:
|
||||||
volume_level: "{{ volume | default(0.3) }}"
|
volume_level: "{{ volume | default(0.3) }}"
|
||||||
- service: media_player.shuffle_set
|
- service: media_player.shuffle_set
|
||||||
entity_id: media_player.master_bedroom
|
|
||||||
data_template:
|
data_template:
|
||||||
|
entity_id: "{{ states('input_select.sonos_leader') }}"
|
||||||
shuffle: "{{ shuffle | default(true) }}"
|
shuffle: "{{ shuffle | default(true) }}"
|
||||||
- service: media_player.select_source
|
- service: media_player.select_source
|
||||||
entity_id: media_player.master_bedroom
|
|
||||||
data_template:
|
data_template:
|
||||||
|
entity_id: "{{ states('input_select.sonos_leader') }}"
|
||||||
source: "{{ playlist | default('Evening Chill') }}"
|
source: "{{ playlist | default('Evening Chill') }}"
|
||||||
|
|
||||||
music_join_sonoses:
|
music_join_sonoses:
|
||||||
alias: "Music · Join Sonoses"
|
alias: "Music · Join Sonoses"
|
||||||
sequence:
|
sequence:
|
||||||
- service: sonos.join
|
- service: sonos.join
|
||||||
entity_id:
|
entity_id: group.all_sonos
|
||||||
- media_player.living_room
|
data_template:
|
||||||
- media_player.kitchen
|
master: "{{ states('input_select.sonos_leader') }}"
|
||||||
data:
|
|
||||||
master: media_player.master_bedroom
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ script:
|
|||||||
sequence:
|
sequence:
|
||||||
# Figure out whether to talk or send a text.
|
# Figure out whether to talk or send a text.
|
||||||
- service_template: >
|
- service_template: >
|
||||||
{% if is_state('media_player.master_bedroom', 'playing')
|
{% if is_state(states('input_select.sonos_leader'), 'playing')
|
||||||
or is_state('input_boolean.speech_notifications', 'off')
|
or is_state('input_boolean.speech_notifications', 'off')
|
||||||
or is_state('input_boolean.georgi_home', 'off') %}
|
or is_state('input_boolean.georgi_home', 'off') %}
|
||||||
notify.telegram
|
notify.telegram
|
||||||
@@ -52,7 +52,7 @@ script:
|
|||||||
entity_id: input_boolean.sarah_talking
|
entity_id: input_boolean.sarah_talking
|
||||||
# Don't shout :)
|
# Don't shout :)
|
||||||
- service: media_player.volume_set
|
- service: media_player.volume_set
|
||||||
entity_id: media_player.master_bedroom
|
entity_id: group.all_sonos
|
||||||
data_template:
|
data_template:
|
||||||
volume_level: >-
|
volume_level: >-
|
||||||
{% if now().strftime('%H')|int < 6 and now().strftime('%H')|int > 0 %}
|
{% if now().strftime('%H')|int < 6 and now().strftime('%H')|int > 0 %}
|
||||||
@@ -63,11 +63,11 @@ script:
|
|||||||
# Say message.
|
# Say message.
|
||||||
- service: tts.amazon_polly_say
|
- service: tts.amazon_polly_say
|
||||||
data_template:
|
data_template:
|
||||||
entity_id: media_player.master_bedroom
|
entity_id: "{{ states('input_select.sonos_leader') }}"
|
||||||
message: "{{ message }}"
|
message: "{{ message }}"
|
||||||
# Wait for phrase to be over and mark as not talking.
|
# Wait for phrase to be over and mark as not talking.
|
||||||
- delay: 00:00:01
|
- delay: 00:00:01
|
||||||
- wait_template: "{{ is_state('media_player.master_bedroom', 'paused') }}"
|
- wait_template: "{{ is_state(states('input_select.sonos_leader'), 'paused') }}"
|
||||||
timeout: 00:02:00
|
timeout: 00:02:00
|
||||||
- service: input_boolean.turn_off
|
- service: input_boolean.turn_off
|
||||||
entity_id: input_boolean.sarah_talking
|
entity_id: input_boolean.sarah_talking
|
||||||
|
|||||||
@@ -7,16 +7,14 @@ script:
|
|||||||
entity_id: light.bedside_light
|
entity_id: light.bedside_light
|
||||||
- service: fan.turn_on
|
- service: fan.turn_on
|
||||||
entity_id: fan.philips_airpurifier
|
entity_id: fan.philips_airpurifier
|
||||||
|
- service: sonos.unjoin
|
||||||
|
entity_id: group.all_sonos
|
||||||
- service: media_player.volume_set
|
- service: media_player.volume_set
|
||||||
entity_id: media_player.master_bedroom
|
entity_id: media_player.master_bedroom
|
||||||
data:
|
data:
|
||||||
volume_level: 0.15
|
volume_level: 0.15
|
||||||
|
|
||||||
# Turn off everything else
|
# Turn off everything else
|
||||||
- service: sonos.unjoin
|
|
||||||
entity_id:
|
|
||||||
- media_player.living_room
|
|
||||||
- media_player.kitchen
|
|
||||||
- service: media_player.turn_off
|
- service: media_player.turn_off
|
||||||
entity_id:
|
entity_id:
|
||||||
- media_player.nvidia_shield
|
- media_player.nvidia_shield
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ script:
|
|||||||
- media_player.nvidia_shield
|
- media_player.nvidia_shield
|
||||||
- media_player.living_room_tv
|
- media_player.living_room_tv
|
||||||
- service: media_player.media_stop
|
- service: media_player.media_stop
|
||||||
entity_id: media_player.master_bedroom
|
data_template:
|
||||||
|
entity_id: "{{ states('input_select.sonos_leader') }}"
|
||||||
- service: light.turn_off
|
- service: light.turn_off
|
||||||
entity_id: light.all_lights
|
entity_id: light.all_lights
|
||||||
|
|||||||
Reference in New Issue
Block a user