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: