From e433c667ba4d0ed379fce5db5be3b78e9c55bc9d Mon Sep 17 00:00:00 2001 From: Georgi Gardev Date: Mon, 27 Apr 2020 01:27:51 +0300 Subject: [PATCH] Refactor xs button --- .../button_card_templates/xs_button.yaml | 16 +------------ .../home_dashboard/kitchen_dashboard.yaml | 24 ++++++++++++++----- 2 files changed, 19 insertions(+), 21 deletions(-) diff --git a/config/lovelace/button_card_templates/xs_button.yaml b/config/lovelace/button_card_templates/xs_button.yaml index 85370bc..b87c18a 100644 --- a/config/lovelace/button_card_templates/xs_button.yaml +++ b/config/lovelace/button_card_templates/xs_button.yaml @@ -8,18 +8,4 @@ xs: - font-size: 12px name: - height: 24px - state: - - value: 'on' - styles: - card: - - background-color: var(--primary-color) - - color: black - icon: - - color: black - - value: 'home' - styles: - card: - - background-color: var(--primary-color) - - color: black - icon: - - color: black + diff --git a/config/lovelace/home_dashboard/kitchen_dashboard.yaml b/config/lovelace/home_dashboard/kitchen_dashboard.yaml index 4639414..3893096 100644 --- a/config/lovelace/home_dashboard/kitchen_dashboard.yaml +++ b/config/lovelace/home_dashboard/kitchen_dashboard.yaml @@ -127,7 +127,9 @@ tap_action: action: toggle - type: custom:button-card - template: xs + template: + - xs + - with_state entity: script.sonos_join_tv icon: mdi:speaker-multiple name: TV @@ -137,21 +139,31 @@ - type: horizontal-stack cards: - type: custom:button-card - template: xs + template: + - xs + - with_state entity: binary_sensor.browser_kitchen name: Motion - type: custom:button-card - template: xs + template: + - xs + - with_state entity: binary_sensor.motion_1_ias_zone name: Motion 2 - type: custom:button-card - template: xs + template: + - xs + - with_state entity: binary_sensor.motion_2_ias_zone name: Hallway - type: custom:button-card - template: xs + template: + - xs + - with_state entity: media_player.nvidia_shield name: Shield - type: custom:button-card - template: xs + template: + - xs + - with_state entity: switch.titanium_power