mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-04-29 06:48:16 +00:00
Add sonos master indicators
This commit is contained in:
@@ -114,21 +114,27 @@
|
||||
service_data:
|
||||
playlist: "Retro"
|
||||
- type: custom:button-card
|
||||
template: xs
|
||||
template:
|
||||
- xs
|
||||
- with_state_indicator
|
||||
entity: script.sonos_join_bedroom
|
||||
name: Bedroom
|
||||
icon: mdi:speaker-multiple
|
||||
tap_action:
|
||||
action: toggle
|
||||
variables:
|
||||
state_indicator_id: binary_sensor.sonos_is_bedroom_master
|
||||
- type: custom:button-card
|
||||
template:
|
||||
- xs
|
||||
- with_state_background
|
||||
- with_state_indicator
|
||||
entity: script.sonos_join_tv
|
||||
icon: mdi:speaker-multiple
|
||||
name: TV
|
||||
tap_action:
|
||||
action: toggle
|
||||
variables:
|
||||
state_indicator_id: binary_sensor.sonos_is_living_room_master
|
||||
|
||||
- type: horizontal-stack
|
||||
cards:
|
||||
|
||||
@@ -292,19 +292,27 @@
|
||||
- type: horizontal-stack
|
||||
cards:
|
||||
- type: custom:button-card
|
||||
template: default
|
||||
template:
|
||||
- small
|
||||
- with_state_indicator
|
||||
entity: script.sonos_join_bedroom
|
||||
name: Sonos from Bedroom
|
||||
icon: mdi:speaker-multiple
|
||||
tap_action:
|
||||
action: toggle
|
||||
variables:
|
||||
state_indicator_id: binary_sensor.sonos_is_bedroom_master
|
||||
- type: custom:button-card
|
||||
template: default
|
||||
template:
|
||||
- small
|
||||
- with_state_indicator
|
||||
entity: script.sonos_join_tv
|
||||
icon: mdi:speaker-multiple
|
||||
name: Sonos from TV
|
||||
tap_action:
|
||||
action: toggle
|
||||
variables:
|
||||
state_indicator_id: binary_sensor.sonos_is_living_room_master
|
||||
|
||||
- type: custom:decluttering-card
|
||||
template: sonos_media_player
|
||||
|
||||
@@ -28,6 +28,16 @@ binary_sensor:
|
||||
{% else %}
|
||||
False
|
||||
{% endif %}
|
||||
sonos_is_bedroom_master:
|
||||
friendly_name: Sonos is Bedroom master
|
||||
value_template: >-
|
||||
{% set group = state_attr('media_player.master_bedroom', 'sonos_group') %}
|
||||
{{ group|length > 1 and group[0] == 'media_player.master_bedroom' }}
|
||||
sonos_is_living_room_master:
|
||||
friendly_name: Sonos is Living room master
|
||||
value_template: >-
|
||||
{% set group = state_attr('media_player.master_bedroom', 'sonos_group') %}
|
||||
{{ group|length > 1 and group[0] == 'media_player.living_room' }}
|
||||
|
||||
script:
|
||||
sonos_join_bedroom:
|
||||
|
||||
Reference in New Issue
Block a user