Use state background instead of indicator for sonos master

This commit is contained in:
2020-05-01 19:30:11 +03:00
parent 05f46d25cd
commit f97df6267f
2 changed files with 18 additions and 25 deletions

View File

@@ -116,25 +116,24 @@
- type: custom:button-card
template:
- xs
- with_state_indicator
entity: script.sonos_join_bedroom
- with_state_background
entity: binary_sensor.sonos_is_bedroom_master
name: Bedroom
icon: mdi:speaker-multiple
tap_action:
action: toggle
variables:
state_indicator_id: binary_sensor.sonos_is_bedroom_master
action: call-service
service: script.sonos_join_bedroom
- type: custom:button-card
template:
- xs
- with_state_indicator
entity: script.sonos_join_tv
icon: mdi:speaker-multiple
- with_state_background
entity: binary_sensor.sonos_is_living_room_master
name: TV
icon: mdi:speaker-multiple
tap_action:
action: toggle
variables:
state_indicator_id: binary_sensor.sonos_is_living_room_master
action: call-service
service: script.sonos_join_tv
- type: horizontal-stack
cards:

View File

@@ -292,27 +292,21 @@
- type: horizontal-stack
cards:
- type: custom:button-card
template:
- small
- with_state_indicator
entity: script.sonos_join_bedroom
template: default
entity: binary_sensor.sonos_is_bedroom_master
name: Sonos from Bedroom
icon: mdi:speaker-multiple
tap_action:
action: toggle
variables:
state_indicator_id: binary_sensor.sonos_is_bedroom_master
action: call-service
service: script.sonos_join_bedroom
- type: custom:button-card
template:
- small
- with_state_indicator
entity: script.sonos_join_tv
template: default
entity: binary_sensor.sonos_is_living_room_master
icon: mdi:speaker-multiple
name: Sonos from TV
tap_action:
action: toggle
variables:
state_indicator_id: binary_sensor.sonos_is_living_room_master
action: call-service
service: script.sonos_join_tv
- type: custom:decluttering-card
template: sonos_media_player