From 0090ffe0fd8f550df91d81e40b30b794378708b7 Mon Sep 17 00:00:00 2001 From: Georgi Gardev Date: Fri, 1 May 2020 13:33:48 +0300 Subject: [PATCH] Enable showing just state or just name in progress card --- .../progress_button.yaml | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/config/lovelace/button_card_templates/progress_button.yaml b/config/lovelace/button_card_templates/progress_button.yaml index 0ec2bb8..22e704d 100644 --- a/config/lovelace/button_card_templates/progress_button.yaml +++ b/config/lovelace/button_card_templates/progress_button.yaml @@ -14,17 +14,21 @@ progress: styles: name: - position: absolute - - width: 100% - - text-align: center - - top: 66% - - font-size: 1em - state: - - position: absolute - - top: 22% - - width: 100% + - top: "[[[ return this.___config.show_state ? '65%' : 'initial' ]]]" - display: flex - align-items: center - justify-content: center + - width: 100% + - height: "[[[ return this.___config.show_state ? 'initial' : '100%' ]]]" + - font-size: 1em + state: + - position: absolute + - top: "[[[ return this.___config.show_name ? '22%' : 'initial' ]]]" + - display: flex + - align-items: center + - justify-content: center + - width: 100% + - height: "[[[ return this.___config.show_name ? 'initial' : '100%' ]]]" - font-size: 1.9em icon: - position: absolute