From 158beed9c5895ff9f3bb1f886b7567ac8dcccd11 Mon Sep 17 00:00:00 2001 From: Claus Dethlefsen Date: Fri, 24 Apr 2026 19:10:13 +0200 Subject: [PATCH] =?UTF-8?q?Home=20view:=20person-billeder=20med=20syg-togg?= =?UTF-8?q?le=20(gr=C3=A5toner=20+=20r=C3=B8d=20kant=20ved=20tryk)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dashboards/views/01_home.yaml | 210 ++++++++++++++++++++++++++++++++-- 1 file changed, 201 insertions(+), 9 deletions(-) diff --git a/dashboards/views/01_home.yaml b/dashboards/views/01_home.yaml index c87c7f3..a269d5d 100644 --- a/dashboards/views/01_home.yaml +++ b/dashboards/views/01_home.yaml @@ -33,19 +33,211 @@ cards: name: I morgen icon: mdi:briefcase-outline - # ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ Familien - - type: glance - entities: - - entity: person.daniel_schusler_dethlefsen + # ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ Familien โ€“ tryk for at toggle syg/rask + - type: grid + columns: 4 + square: true + cards: + + - type: custom:button-card + entity: person.daniel_schusler_dethlefsen name: Daniel - - entity: person.claus_dethlefsen + show_name: true + show_state: false + show_icon: false + show_entity_picture: true + entity_picture_style: + - border-radius: 50% + - width: 100% + - filter: > + [[[ + return states['input_select.daniel_status'] && + states['input_select.daniel_status'].state === 'syg' + ? 'grayscale(100%)' : 'none'; + ]]] + styles: + card: + - padding: 6px + - border: > + [[[ + return states['input_select.daniel_status'] && + states['input_select.daniel_status'].state === 'syg' + ? '2px solid rgba(220,50,50,0.8)' : '2px solid transparent'; + ]]] + - border-radius: 12px + name: + - font-size: 11px + - padding-top: 4px + - color: > + [[[ + return states['input_select.daniel_status'] && + states['input_select.daniel_status'].state === 'syg' + ? 'rgb(220,50,50)' : 'var(--primary-text-color)'; + ]]] + tap_action: + action: call-service + service: input_select.select_option + service_data: + entity_id: input_select.daniel_status + option: > + [[[ + return states['input_select.daniel_status'] && + states['input_select.daniel_status'].state === 'syg' + ? 'hjemme' : 'syg'; + ]]] + hold_action: + action: more-info + entity: person.daniel_schusler_dethlefsen + + - type: custom:button-card + entity: person.claus_dethlefsen name: Claus - - entity: person.anne_schusler_dethlefsen + show_name: true + show_state: false + show_icon: false + show_entity_picture: true + entity_picture_style: + - border-radius: 50% + - width: 100% + - filter: > + [[[ + return states['input_select.claus_status'] && + states['input_select.claus_status'].state === 'syg' + ? 'grayscale(100%)' : 'none'; + ]]] + styles: + card: + - padding: 6px + - border: > + [[[ + return states['input_select.claus_status'] && + states['input_select.claus_status'].state === 'syg' + ? '2px solid rgba(220,50,50,0.8)' : '2px solid transparent'; + ]]] + - border-radius: 12px + name: + - font-size: 11px + - padding-top: 4px + - color: > + [[[ + return states['input_select.claus_status'] && + states['input_select.claus_status'].state === 'syg' + ? 'rgb(220,50,50)' : 'var(--primary-text-color)'; + ]]] + tap_action: + action: call-service + service: input_select.select_option + service_data: + entity_id: input_select.claus_status + option: > + [[[ + return states['input_select.claus_status'] && + states['input_select.claus_status'].state === 'syg' + ? 'hjemme' : 'syg'; + ]]] + hold_action: + action: more-info + entity: person.claus_dethlefsen + + - type: custom:button-card + entity: person.anne_schusler_dethlefsen name: Anne - - entity: person.andreas_schusler_dethlefsen + show_name: true + show_state: false + show_icon: false + show_entity_picture: true + entity_picture_style: + - border-radius: 50% + - width: 100% + - filter: > + [[[ + return states['input_select.anne_status'] && + states['input_select.anne_status'].state === 'syg' + ? 'grayscale(100%)' : 'none'; + ]]] + styles: + card: + - padding: 6px + - border: > + [[[ + return states['input_select.anne_status'] && + states['input_select.anne_status'].state === 'syg' + ? '2px solid rgba(220,50,50,0.8)' : '2px solid transparent'; + ]]] + - border-radius: 12px + name: + - font-size: 11px + - padding-top: 4px + - color: > + [[[ + return states['input_select.anne_status'] && + states['input_select.anne_status'].state === 'syg' + ? 'rgb(220,50,50)' : 'var(--primary-text-color)'; + ]]] + tap_action: + action: call-service + service: input_select.select_option + service_data: + entity_id: input_select.anne_status + option: > + [[[ + return states['input_select.anne_status'] && + states['input_select.anne_status'].state === 'syg' + ? 'hjemme' : 'syg'; + ]]] + hold_action: + action: more-info + entity: person.anne_schusler_dethlefsen + + - type: custom:button-card + entity: person.andreas_schusler_dethlefsen name: Andreas - - entity: binary_sensor.family_presence - name: Familie + show_name: true + show_state: false + show_icon: false + show_entity_picture: true + entity_picture_style: + - border-radius: 50% + - width: 100% + - filter: > + [[[ + return states['input_select.andreas_status'] && + states['input_select.andreas_status'].state === 'syg' + ? 'grayscale(100%)' : 'none'; + ]]] + styles: + card: + - padding: 6px + - border: > + [[[ + return states['input_select.andreas_status'] && + states['input_select.andreas_status'].state === 'syg' + ? '2px solid rgba(220,50,50,0.8)' : '2px solid transparent'; + ]]] + - border-radius: 12px + name: + - font-size: 11px + - padding-top: 4px + - color: > + [[[ + return states['input_select.andreas_status'] && + states['input_select.andreas_status'].state === 'syg' + ? 'rgb(220,50,50)' : 'var(--primary-text-color)'; + ]]] + tap_action: + action: call-service + service: input_select.select_option + service_data: + entity_id: input_select.andreas_status + option: > + [[[ + return states['input_select.andreas_status'] && + states['input_select.andreas_status'].state === 'syg' + ? 'hjemme' : 'syg'; + ]]] + hold_action: + action: more-info + entity: person.andreas_schusler_dethlefsen # ๐ŸชŸ Gardiner - type: grid