From 77a87ed19acf31cbd013c0c88bad03bc48f5d7f7 Mon Sep 17 00:00:00 2001 From: Claus Dethlefsen Date: Sat, 20 Jun 2026 19:35:48 +0200 Subject: [PATCH] =?UTF-8?q?Ventilator:=20farv=20'Sluk=20om=20X=20min'-knap?= =?UTF-8?q?=20gul=20mens=20timer=20k=C3=B8rer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dashboards/views/03_andreas.yaml | 8 ++++++++ dashboards/views/04_daniel.yaml | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/dashboards/views/03_andreas.yaml b/dashboards/views/03_andreas.yaml index 56e4c50..24447f7 100644 --- a/dashboards/views/03_andreas.yaml +++ b/dashboards/views/03_andreas.yaml @@ -285,6 +285,8 @@ sections: - type: custom:button-card icon: mdi:fan-off + entity: script.andreas_ventilator_sluk_timer + show_state: false name: | [[[ return 'Sluk om ' + Math.round(states['input_number.andreas_ventilator_timer'].state) + ' min'; ]]] tap_action: @@ -294,10 +296,16 @@ sections: card: - padding: 8px 6px - height: 56px + - background-color: | + [[[ return entity && entity.state === 'on' ? '#f9a825' : ''; ]]] icon: - width: 22px + - color: | + [[[ return entity && entity.state === 'on' ? '#000000' : ''; ]]] name: - font-size: 12px + - color: | + [[[ return entity && entity.state === 'on' ? '#000000' : ''; ]]] - type: grid cards: diff --git a/dashboards/views/04_daniel.yaml b/dashboards/views/04_daniel.yaml index ba08738..4d920cf 100644 --- a/dashboards/views/04_daniel.yaml +++ b/dashboards/views/04_daniel.yaml @@ -285,6 +285,8 @@ sections: - type: custom:button-card icon: mdi:fan-off + entity: script.daniel_ventilator_sluk_timer + show_state: false name: | [[[ return 'Sluk om ' + Math.round(states['input_number.daniel_ventilator_timer'].state) + ' min'; ]]] tap_action: @@ -294,10 +296,16 @@ sections: card: - padding: 8px 6px - height: 56px + - background-color: | + [[[ return entity && entity.state === 'on' ? '#f9a825' : ''; ]]] icon: - width: 22px + - color: | + [[[ return entity && entity.state === 'on' ? '#000000' : ''; ]]] name: - font-size: 12px + - color: | + [[[ return entity && entity.state === 'on' ? '#000000' : ''; ]]] - type: grid cards: