From f97df6267f1d62fa92ad425f0a39701e9556c656 Mon Sep 17 00:00:00 2001 From: Georgi Gardev Date: Fri, 1 May 2020 19:30:11 +0300 Subject: [PATCH] Use state background instead of indicator for sonos master --- .../home_dashboard/kitchen_dashboard.yaml | 21 +++++++++--------- .../home_dashboard/main_dashboard.yaml | 22 +++++++------------ 2 files changed, 18 insertions(+), 25 deletions(-) diff --git a/config/lovelace/home_dashboard/kitchen_dashboard.yaml b/config/lovelace/home_dashboard/kitchen_dashboard.yaml index 4237ca7..d4764cd 100644 --- a/config/lovelace/home_dashboard/kitchen_dashboard.yaml +++ b/config/lovelace/home_dashboard/kitchen_dashboard.yaml @@ -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: diff --git a/config/lovelace/home_dashboard/main_dashboard.yaml b/config/lovelace/home_dashboard/main_dashboard.yaml index 323510d..608b480 100644 --- a/config/lovelace/home_dashboard/main_dashboard.yaml +++ b/config/lovelace/home_dashboard/main_dashboard.yaml @@ -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