From 5b59f08ce8f7ea345e3ef8628fa40a519dce7321 Mon Sep 17 00:00:00 2001 From: Sebastian Kristo <120048876+SebastianKristo@users.noreply.github.com> Date: Fri, 18 Apr 2025 10:33:25 +0200 Subject: [PATCH 01/24] Add files via upload --- .../hc_garden_gate_card.yaml | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 dashboard/HaCasa/templates/internal_templates/hc_garden_gate_card.yaml diff --git a/dashboard/HaCasa/templates/internal_templates/hc_garden_gate_card.yaml b/dashboard/HaCasa/templates/internal_templates/hc_garden_gate_card.yaml new file mode 100644 index 0000000..43f4d53 --- /dev/null +++ b/dashboard/HaCasa/templates/internal_templates/hc_garden_gate_card.yaml @@ -0,0 +1,100 @@ +hc_garden_gate_card: + variables: + unlock_entity: + lock_entity: + unlock_action: lock.unlock + lock_action: lock.lock + icon_entity: + triggers_update: + - "[[[ return entity.entity_id; ]]]" + - "[[[ return variables.icon_entity; ]]]" + show_icon: true + show_name: true + show_state: true + icon: > + [[[ return states[variables.icon_entity]?.state === 'on' ? 'mdi:gate-open' : 'mdi:gate'; ]]] + styles: + grid: + - grid-template-areas: | + 'i n buttons' + 'i s buttons' + - grid-template-columns: 1fr auto auto + - grid-template-rows: min-content min-content min-content min-content + card: + - padding: 20px + icon: + - grid-area: i + - position: absolute + - color: > + [[[ + return states[variables.icon_entity]?.state === 'on' + ? 'var(--color-red)' + : 'var(--color-blue)'; + ]]] + - bottom: -15% + - left: -28% + - width: 100% + - z-index: 10 + - border-radius: 10px + - transform: scale(1) + name: + - grid-area: i + - justify-self: start + - align-self: start + - font-family: montserrat + - font-weight: 500 + - z-index: 2 + state: + - grid-area: i + - padding-top: 20px + - opacity: 0.8 + - font-size: 12px + - justify-self: start + - align-self: start + - font-family: montserrat + - z-index: 2 + tap_action: none + custom_fields: + buttons: + card: + type: custom:button-card + styles: + grid: + - grid-template-areas: | + 'item_1' + 'item_2' + - row-gap: 1rem + card: + - padding: 10px + - border-radius: 50px + - background-color: var(--button-card-background) + - z-index: 3 + custom_fields: + item_1: + card: + type: custom:button-card + icon: mdi:lock-open + styles: &icon_style + icon: + - width: 25px + card: + - padding: 10px + - border-radius: 500px + - box-shadow: none + - pointer-events: auto + - background: none + tap_action: + action: call-service + service: "[[[ return variables.unlock_action ]]]" + target: + entity_id: "[[[ return variables.unlock_entity ]]]" + item_2: + card: + type: custom:button-card + icon: mdi:lock + styles: *icon_style + tap_action: + action: call-service + service: "[[[ return variables.lock_action ]]]" + target: + entity_id: "[[[ return variables.lock_entity ]]]" \ No newline at end of file From af486fbb0fa053f987797e91caf7f016f47cceeb Mon Sep 17 00:00:00 2001 From: Sebastian Kristo <120048876+SebastianKristo@users.noreply.github.com> Date: Fri, 18 Apr 2025 10:37:03 +0200 Subject: [PATCH 02/24] Delete dashboard/HaCasa/templates/internal_templates/hc_garden_gate_card.yaml --- .../hc_garden_gate_card.yaml | 100 ------------------ 1 file changed, 100 deletions(-) delete mode 100644 dashboard/HaCasa/templates/internal_templates/hc_garden_gate_card.yaml diff --git a/dashboard/HaCasa/templates/internal_templates/hc_garden_gate_card.yaml b/dashboard/HaCasa/templates/internal_templates/hc_garden_gate_card.yaml deleted file mode 100644 index 43f4d53..0000000 --- a/dashboard/HaCasa/templates/internal_templates/hc_garden_gate_card.yaml +++ /dev/null @@ -1,100 +0,0 @@ -hc_garden_gate_card: - variables: - unlock_entity: - lock_entity: - unlock_action: lock.unlock - lock_action: lock.lock - icon_entity: - triggers_update: - - "[[[ return entity.entity_id; ]]]" - - "[[[ return variables.icon_entity; ]]]" - show_icon: true - show_name: true - show_state: true - icon: > - [[[ return states[variables.icon_entity]?.state === 'on' ? 'mdi:gate-open' : 'mdi:gate'; ]]] - styles: - grid: - - grid-template-areas: | - 'i n buttons' - 'i s buttons' - - grid-template-columns: 1fr auto auto - - grid-template-rows: min-content min-content min-content min-content - card: - - padding: 20px - icon: - - grid-area: i - - position: absolute - - color: > - [[[ - return states[variables.icon_entity]?.state === 'on' - ? 'var(--color-red)' - : 'var(--color-blue)'; - ]]] - - bottom: -15% - - left: -28% - - width: 100% - - z-index: 10 - - border-radius: 10px - - transform: scale(1) - name: - - grid-area: i - - justify-self: start - - align-self: start - - font-family: montserrat - - font-weight: 500 - - z-index: 2 - state: - - grid-area: i - - padding-top: 20px - - opacity: 0.8 - - font-size: 12px - - justify-self: start - - align-self: start - - font-family: montserrat - - z-index: 2 - tap_action: none - custom_fields: - buttons: - card: - type: custom:button-card - styles: - grid: - - grid-template-areas: | - 'item_1' - 'item_2' - - row-gap: 1rem - card: - - padding: 10px - - border-radius: 50px - - background-color: var(--button-card-background) - - z-index: 3 - custom_fields: - item_1: - card: - type: custom:button-card - icon: mdi:lock-open - styles: &icon_style - icon: - - width: 25px - card: - - padding: 10px - - border-radius: 500px - - box-shadow: none - - pointer-events: auto - - background: none - tap_action: - action: call-service - service: "[[[ return variables.unlock_action ]]]" - target: - entity_id: "[[[ return variables.unlock_entity ]]]" - item_2: - card: - type: custom:button-card - icon: mdi:lock - styles: *icon_style - tap_action: - action: call-service - service: "[[[ return variables.lock_action ]]]" - target: - entity_id: "[[[ return variables.lock_entity ]]]" \ No newline at end of file From f1e2c4c48ffadc5d19867c68431e0f1e19099fac Mon Sep 17 00:00:00 2001 From: Sebastian Kristo <120048876+SebastianKristo@users.noreply.github.com> Date: Fri, 18 Apr 2025 10:37:50 +0200 Subject: [PATCH 03/24] Add files via upload --- .../custom_templates/hc_garden_gate_card.yaml | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 dashboard/HaCasa/templates/custom_templates/hc_garden_gate_card.yaml diff --git a/dashboard/HaCasa/templates/custom_templates/hc_garden_gate_card.yaml b/dashboard/HaCasa/templates/custom_templates/hc_garden_gate_card.yaml new file mode 100644 index 0000000..43f4d53 --- /dev/null +++ b/dashboard/HaCasa/templates/custom_templates/hc_garden_gate_card.yaml @@ -0,0 +1,100 @@ +hc_garden_gate_card: + variables: + unlock_entity: + lock_entity: + unlock_action: lock.unlock + lock_action: lock.lock + icon_entity: + triggers_update: + - "[[[ return entity.entity_id; ]]]" + - "[[[ return variables.icon_entity; ]]]" + show_icon: true + show_name: true + show_state: true + icon: > + [[[ return states[variables.icon_entity]?.state === 'on' ? 'mdi:gate-open' : 'mdi:gate'; ]]] + styles: + grid: + - grid-template-areas: | + 'i n buttons' + 'i s buttons' + - grid-template-columns: 1fr auto auto + - grid-template-rows: min-content min-content min-content min-content + card: + - padding: 20px + icon: + - grid-area: i + - position: absolute + - color: > + [[[ + return states[variables.icon_entity]?.state === 'on' + ? 'var(--color-red)' + : 'var(--color-blue)'; + ]]] + - bottom: -15% + - left: -28% + - width: 100% + - z-index: 10 + - border-radius: 10px + - transform: scale(1) + name: + - grid-area: i + - justify-self: start + - align-self: start + - font-family: montserrat + - font-weight: 500 + - z-index: 2 + state: + - grid-area: i + - padding-top: 20px + - opacity: 0.8 + - font-size: 12px + - justify-self: start + - align-self: start + - font-family: montserrat + - z-index: 2 + tap_action: none + custom_fields: + buttons: + card: + type: custom:button-card + styles: + grid: + - grid-template-areas: | + 'item_1' + 'item_2' + - row-gap: 1rem + card: + - padding: 10px + - border-radius: 50px + - background-color: var(--button-card-background) + - z-index: 3 + custom_fields: + item_1: + card: + type: custom:button-card + icon: mdi:lock-open + styles: &icon_style + icon: + - width: 25px + card: + - padding: 10px + - border-radius: 500px + - box-shadow: none + - pointer-events: auto + - background: none + tap_action: + action: call-service + service: "[[[ return variables.unlock_action ]]]" + target: + entity_id: "[[[ return variables.unlock_entity ]]]" + item_2: + card: + type: custom:button-card + icon: mdi:lock + styles: *icon_style + tap_action: + action: call-service + service: "[[[ return variables.lock_action ]]]" + target: + entity_id: "[[[ return variables.lock_entity ]]]" \ No newline at end of file From 3811b7505cb1db810b0b59c2ac6fa49a0b5f3b34 Mon Sep 17 00:00:00 2001 From: Sebastian Kristo <120048876+SebastianKristo@users.noreply.github.com> Date: Fri, 18 Apr 2025 10:38:09 +0200 Subject: [PATCH 04/24] Delete dashboard/HaCasa/templates/custom_templates/yourcustomcard.yaml --- dashboard/HaCasa/templates/custom_templates/yourcustomcard.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 dashboard/HaCasa/templates/custom_templates/yourcustomcard.yaml diff --git a/dashboard/HaCasa/templates/custom_templates/yourcustomcard.yaml b/dashboard/HaCasa/templates/custom_templates/yourcustomcard.yaml deleted file mode 100644 index e69de29..0000000 From 920db3f15dde19736df5e154004c946002912a53 Mon Sep 17 00:00:00 2001 From: Sebastian Kristo <120048876+SebastianKristo@users.noreply.github.com> Date: Fri, 18 Apr 2025 10:43:48 +0200 Subject: [PATCH 05/24] Create hc_garden_gate_card.yaml --- .../hc_garden_gate_card/hc_garden_gate_card.yaml | 1 + 1 file changed, 1 insertion(+) create mode 100644 dashboard/HaCasa/templates/custom_templates/hc_garden_gate_card/hc_garden_gate_card.yaml diff --git a/dashboard/HaCasa/templates/custom_templates/hc_garden_gate_card/hc_garden_gate_card.yaml b/dashboard/HaCasa/templates/custom_templates/hc_garden_gate_card/hc_garden_gate_card.yaml new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/dashboard/HaCasa/templates/custom_templates/hc_garden_gate_card/hc_garden_gate_card.yaml @@ -0,0 +1 @@ + From 9ea94f3388c3c7bf129fe3fa10ab4a98e759f2e0 Mon Sep 17 00:00:00 2001 From: Sebastian Kristo <120048876+SebastianKristo@users.noreply.github.com> Date: Fri, 18 Apr 2025 10:44:02 +0200 Subject: [PATCH 06/24] Delete dashboard/HaCasa/templates/custom_templates/hc_garden_gate_card.yaml --- .../custom_templates/hc_garden_gate_card.yaml | 100 ------------------ 1 file changed, 100 deletions(-) delete mode 100644 dashboard/HaCasa/templates/custom_templates/hc_garden_gate_card.yaml diff --git a/dashboard/HaCasa/templates/custom_templates/hc_garden_gate_card.yaml b/dashboard/HaCasa/templates/custom_templates/hc_garden_gate_card.yaml deleted file mode 100644 index 43f4d53..0000000 --- a/dashboard/HaCasa/templates/custom_templates/hc_garden_gate_card.yaml +++ /dev/null @@ -1,100 +0,0 @@ -hc_garden_gate_card: - variables: - unlock_entity: - lock_entity: - unlock_action: lock.unlock - lock_action: lock.lock - icon_entity: - triggers_update: - - "[[[ return entity.entity_id; ]]]" - - "[[[ return variables.icon_entity; ]]]" - show_icon: true - show_name: true - show_state: true - icon: > - [[[ return states[variables.icon_entity]?.state === 'on' ? 'mdi:gate-open' : 'mdi:gate'; ]]] - styles: - grid: - - grid-template-areas: | - 'i n buttons' - 'i s buttons' - - grid-template-columns: 1fr auto auto - - grid-template-rows: min-content min-content min-content min-content - card: - - padding: 20px - icon: - - grid-area: i - - position: absolute - - color: > - [[[ - return states[variables.icon_entity]?.state === 'on' - ? 'var(--color-red)' - : 'var(--color-blue)'; - ]]] - - bottom: -15% - - left: -28% - - width: 100% - - z-index: 10 - - border-radius: 10px - - transform: scale(1) - name: - - grid-area: i - - justify-self: start - - align-self: start - - font-family: montserrat - - font-weight: 500 - - z-index: 2 - state: - - grid-area: i - - padding-top: 20px - - opacity: 0.8 - - font-size: 12px - - justify-self: start - - align-self: start - - font-family: montserrat - - z-index: 2 - tap_action: none - custom_fields: - buttons: - card: - type: custom:button-card - styles: - grid: - - grid-template-areas: | - 'item_1' - 'item_2' - - row-gap: 1rem - card: - - padding: 10px - - border-radius: 50px - - background-color: var(--button-card-background) - - z-index: 3 - custom_fields: - item_1: - card: - type: custom:button-card - icon: mdi:lock-open - styles: &icon_style - icon: - - width: 25px - card: - - padding: 10px - - border-radius: 500px - - box-shadow: none - - pointer-events: auto - - background: none - tap_action: - action: call-service - service: "[[[ return variables.unlock_action ]]]" - target: - entity_id: "[[[ return variables.unlock_entity ]]]" - item_2: - card: - type: custom:button-card - icon: mdi:lock - styles: *icon_style - tap_action: - action: call-service - service: "[[[ return variables.lock_action ]]]" - target: - entity_id: "[[[ return variables.lock_entity ]]]" \ No newline at end of file From 63c53168eac648e2967801dd1bf785e4f155f8ac Mon Sep 17 00:00:00 2001 From: Sebastian Kristo <120048876+SebastianKristo@users.noreply.github.com> Date: Fri, 18 Apr 2025 10:44:15 +0200 Subject: [PATCH 07/24] Update hc_garden_gate_card.yaml --- .../hc_garden_gate_card.yaml | 101 +++++++++++++++++- 1 file changed, 100 insertions(+), 1 deletion(-) diff --git a/dashboard/HaCasa/templates/custom_templates/hc_garden_gate_card/hc_garden_gate_card.yaml b/dashboard/HaCasa/templates/custom_templates/hc_garden_gate_card/hc_garden_gate_card.yaml index 8b13789..f0f0b22 100644 --- a/dashboard/HaCasa/templates/custom_templates/hc_garden_gate_card/hc_garden_gate_card.yaml +++ b/dashboard/HaCasa/templates/custom_templates/hc_garden_gate_card/hc_garden_gate_card.yaml @@ -1 +1,100 @@ - +hc_garden_gate_card: + variables: + unlock_entity: + lock_entity: + unlock_action: lock.unlock + lock_action: lock.lock + icon_entity: + triggers_update: + - "[[[ return entity.entity_id; ]]]" + - "[[[ return variables.icon_entity; ]]]" + show_icon: true + show_name: true + show_state: true + icon: > + [[[ return states[variables.icon_entity]?.state === 'on' ? 'mdi:gate-open' : 'mdi:gate'; ]]] + styles: + grid: + - grid-template-areas: | + 'i n buttons' + 'i s buttons' + - grid-template-columns: 1fr auto auto + - grid-template-rows: min-content min-content min-content min-content + card: + - padding: 20px + icon: + - grid-area: i + - position: absolute + - color: > + [[[ + return states[variables.icon_entity]?.state === 'on' + ? 'var(--color-red)' + : 'var(--color-blue)'; + ]]] + - bottom: -15% + - left: -28% + - width: 100% + - z-index: 10 + - border-radius: 10px + - transform: scale(1) + name: + - grid-area: i + - justify-self: start + - align-self: start + - font-family: montserrat + - font-weight: 500 + - z-index: 2 + state: + - grid-area: i + - padding-top: 20px + - opacity: 0.8 + - font-size: 12px + - justify-self: start + - align-self: start + - font-family: montserrat + - z-index: 2 + tap_action: none + custom_fields: + buttons: + card: + type: custom:button-card + styles: + grid: + - grid-template-areas: | + 'item_1' + 'item_2' + - row-gap: 1rem + card: + - padding: 10px + - border-radius: 50px + - background-color: var(--button-card-background) + - z-index: 3 + custom_fields: + item_1: + card: + type: custom:button-card + icon: mdi:lock-open + styles: &icon_style + icon: + - width: 25px + card: + - padding: 10px + - border-radius: 500px + - box-shadow: none + - pointer-events: auto + - background: none + tap_action: + action: call-service + service: "[[[ return variables.unlock_action ]]]" + target: + entity_id: "[[[ return variables.unlock_entity ]]]" + item_2: + card: + type: custom:button-card + icon: mdi:lock + styles: *icon_style + tap_action: + action: call-service + service: "[[[ return variables.lock_action ]]]" + target: + entity_id: "[[[ return variables.lock_entity ]]]" From e23350b799566ceb2102679c4863efeaed22262c Mon Sep 17 00:00:00 2001 From: Sebastian Kristo <120048876+SebastianKristo@users.noreply.github.com> Date: Fri, 18 Apr 2025 10:45:10 +0200 Subject: [PATCH 08/24] Create readme.md --- .../templates/custom_templates/hc_garden_gate_card/readme.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 dashboard/HaCasa/templates/custom_templates/hc_garden_gate_card/readme.md diff --git a/dashboard/HaCasa/templates/custom_templates/hc_garden_gate_card/readme.md b/dashboard/HaCasa/templates/custom_templates/hc_garden_gate_card/readme.md new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/dashboard/HaCasa/templates/custom_templates/hc_garden_gate_card/readme.md @@ -0,0 +1 @@ + From 9d484fba4e2f702d682630de2c89fbae54a7a39e Mon Sep 17 00:00:00 2001 From: Sebastian Kristo <120048876+SebastianKristo@users.noreply.github.com> Date: Fri, 18 Apr 2025 10:57:01 +0200 Subject: [PATCH 09/24] Update readme.md --- .../hc_garden_gate_card/readme.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/dashboard/HaCasa/templates/custom_templates/hc_garden_gate_card/readme.md b/dashboard/HaCasa/templates/custom_templates/hc_garden_gate_card/readme.md index 8b13789..2883107 100644 --- a/dashboard/HaCasa/templates/custom_templates/hc_garden_gate_card/readme.md +++ b/dashboard/HaCasa/templates/custom_templates/hc_garden_gate_card/readme.md @@ -1 +1,18 @@ +Added a new gate card +Features: + Supports one lock entity and one unlock entity. + Icon changes based on the state of a icon_entity. + Can also be usedfor doors or garage doors with some modifications. + +Variables + unlock_entity: + lock_entity: + unlock_action: + lock_action: + icon_entity: + + Screenshot 2025-04-18 at 10 50 03 +Screenshot 2025-04-18 at 10 49 34 +Screenshot 2025-04-18 at 10 49 09 +Screenshot 2025-04-18 at 10 49 25 From 89a172cd92f302d49324446ecab38b281594f865 Mon Sep 17 00:00:00 2001 From: Sebastian Kristo <120048876+SebastianKristo@users.noreply.github.com> Date: Fri, 18 Apr 2025 17:43:17 +0200 Subject: [PATCH 10/24] Add files via upload --- dashboard/HaCasa/templates/yourcustomcard.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 dashboard/HaCasa/templates/yourcustomcard.yaml diff --git a/dashboard/HaCasa/templates/yourcustomcard.yaml b/dashboard/HaCasa/templates/yourcustomcard.yaml new file mode 100644 index 0000000..e69de29 From 7836c7c3a5ee894a96ae16c2e11100bea22108f4 Mon Sep 17 00:00:00 2001 From: Sebastian Kristo <120048876+SebastianKristo@users.noreply.github.com> Date: Fri, 18 Apr 2025 17:43:48 +0200 Subject: [PATCH 11/24] Create hc_header_card_3_person.yaml --- .../hc_header_card_3_person/hc_header_card_3_person.yaml | 1 + 1 file changed, 1 insertion(+) create mode 100644 dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/hc_header_card_3_person.yaml diff --git a/dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/hc_header_card_3_person.yaml b/dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/hc_header_card_3_person.yaml new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/hc_header_card_3_person.yaml @@ -0,0 +1 @@ + From 49e7fba51f279ebc1c3aa5b6754d4f2b1c87e62a Mon Sep 17 00:00:00 2001 From: Sebastian Kristo <120048876+SebastianKristo@users.noreply.github.com> Date: Fri, 18 Apr 2025 17:44:07 +0200 Subject: [PATCH 12/24] Update hc_header_card_3_person.yaml --- .../hc_header_card_3_person.yaml | 365 ++++++++++++++++++ 1 file changed, 365 insertions(+) diff --git a/dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/hc_header_card_3_person.yaml b/dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/hc_header_card_3_person.yaml index 8b13789..669bf56 100644 --- a/dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/hc_header_card_3_person.yaml +++ b/dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/hc_header_card_3_person.yaml @@ -1 +1,366 @@ +hc_header_card_3_person: + variables: + air_quality_sensor: + person_entity1: + person_entity2: + person_entity3: + show_icon: false + show_label: true + name: | + [[[ + const today = new Date(); + const aqi = states[variables.air_quality_sensor]?.state || 0; // Replace with your AQI entity + let icon, color; + if (aqi <= 50) { + icon = 'mdi:alpha-g-box'; + color = 'var(--color-green)'; + } else if (aqi <= 100) { + icon = 'mdi:alpha-m-box'; + color = 'var(--color-yellow)'; + } else if (aqi <= 150) { + icon = 'mdi:alpha-u-box'; + color = 'var(--color-orange)'; + } else if (aqi <= 200) { + icon = 'mdi:alpha-u-box'; + color = 'var(--color-red)'; + } else if (aqi <= 300) { + icon = 'mdi:alpha-v-box-box'; + color = 'var(--color-purple)'; + } else if (aqi <= 500) { + icon = 'mdi:alpha-h-box-box'; + color = 'var(--color-orange)'; + } else { + icon = 'mdi:emoticon-dead'; + color = 'var(--color-red)'; + } + + if (variables.air_quality_sensor) { + return ` + ${today.toLocaleString('en-US', { month: 'long', day: 'numeric' })} + + + `; + } + else { + return ` + ${today.toLocaleString('en-US', { month: 'long', day: 'numeric' })} + `; + } + ]]] + label: | + [[[ return states[entity.entity_id].attributes.temperature + '° - ' + + states[entity.entity_id].attributes.humidity + '%']]] + styles: + card: + - box-shadow: none + - background: none + - border-radius: 0% + - padding-right: 4px + grid: + - grid-template-areas: | + "weather_icon n person1 person2 person3" + "weather_icon l person1 person2 person3" + - grid-template-columns: min-content min-content 1fr + - grid-template-rows: min-content min-content + - column-gap: 5px + name: + - justify-self: start + - font-family: montserrat + - font-weight: 800 + - font-size: 16px + - align-self: end + label: + - justify-self: start + - font-family: montserrat + - font-size: 14px + - color: var(--subtext-color) + custom_fields: + weather_icon: + - justify-self: start + - padding: 0 + - margin: 0 + person1: + - justify-self: end + - display: "[[[ return variables.person_entity1 ? 'block' : 'none' ]]]" + person2: + - justify-self: end + - display: "[[[ return variables.person_entity2 ? 'block' : 'none' ]]]" + person3: + - justify-self: end + - display: "[[[ return variables.person_entity3 ? 'block' : 'none' ]]]" + air_quality: + - jusity-self: end + - margin-left: "-30px" + - align-self: center + custom_fields: + weather_icon: | + [[[ + const style = ` + ` + if (!entity || !entity.state) return 'fas:question'; + const weather = entity.state.toLowerCase(); + return style + ' ' || 'fas:question' + ]]] + person1: + card: + type: custom:button-card + entity: "[[[ return variables.person_entity1 ]]]" + show_entity_picture: true + show_name: false + styles: + card: + - height: 55px + - width: 55px + - margin: 0 + - padding: 0 + - border-radius: 50% + - justify-self: end + - position: relative + - overflow: visible + img_cell: + - height: 100% + - width: 100% + - border-radius: 25px + - overflow: hidden + entity_picture: + - height: 100% + - width: 100% + - object-fit: cover + - border-radius: 25px + custom_fields: + status: + card: + type: "custom:button-card" + icon: | + [[[ + var stato = states[variables.person_entity1].state; + if (stato === 'home') { + return 'fapro:house-fill'; + } else if (stato === 'Ullern') { + return 'mdi:account-school'; + } else if (stato === 'Strømstad') { + return 'mdi:lighthouse'; + } else if (stato === 'Toten') { + return 'mdi:tractor'; + } else if (stato === 'Oslo Revmatologipraksis') { + return 'mdi:stethoscope'; + } else { + return 'fas:plane'; + } + ]]] + show_name: false + show_state: false + show_label: false + styles: + card: + - background-color: | + [[[ + var stato = states[variables.person_entity1].state; + if (stato === 'home') { + return 'var(--color-green)'; + } else if (stato === 'Strømstad') { + return 'var(--color-blue)'; + } else if (stato === 'Toten') { + return 'var(--color-brown)'; + } else if (stato === 'Ullern') { + return 'var(--color-yellow)'; + } else if (stato === 'Oslo Revmatologipraksis') { + return 'var(--color-red)'; + } else { + return 'var(--color-blue)'; + } + ]]] + - color: white + - border-radius: 50% + - height: 22px + - width: 22px + - position: absolute + - top: -63px + - right: -3px + - display: flex + - align-items: center + - justify-content: center + - box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2) + icon: + - color: white + - width: 60% + - height: 60% + person2: + card: + type: custom:button-card + entity: "[[[ return variables.person_entity2 ]]]" + show_entity_picture: true + show_name: false + styles: + card: + - height: 55px + - width: 55px + - margin: 0 + - padding: 0 + - border-radius: 50% + - justify-self: end + - position: relative + - overflow: visible + img_cell: + - height: 100% + - width: 100% + - border-radius: 25px + - overflow: hidden + entity_picture: + - height: 100% + - width: 100% + - object-fit: cover + - border-radius: 25px + custom_fields: + status: + card: + type: "custom:button-card" + icon: | + [[[ + var stato = states[variables.person_entity2].state; + if (stato === 'home') { + return 'fapro:house-fill'; + } else if (stato === 'Ullern') { + return 'mdi:account-school'; + } else if (stato === 'Strømstad') { + return 'mdi:lighthouse'; + } else if (stato === 'Toten') { + return 'mdi:tractor'; + } else if (stato === 'Oslo Revmatologipraksis') { + return 'mdi:stethoscope'; + } else { + return 'fas:plane'; + } + ]]] + show_name: false + show_state: false + show_label: false + styles: + card: + - background-color: | + [[[ + var stato = states[variables.person_entity2].state; + if (stato === 'home') { + return 'var(--color-green)'; + } else if (stato === 'Strømstad') { + return 'var(--color-blue)'; + } else if (stato === 'Toten') { + return 'var(--color-brown)'; + } else if (stato === 'Ullern') { + return 'var(--color-yellow)'; + } else if (stato === 'Oslo Revmatologipraksis') { + return 'var(--color-red)'; + } else { + return 'var(--color-blue)'; + } + ]]] + - color: white + - border-radius: 50% + - height: 22px + - width: 22px + - position: absolute + - top: -63px + - right: -3px + - display: flex + - align-items: center + - justify-content: center + - box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2) + icon: + - color: white + - width: 60% + - height: 60% + person3: + card: + type: custom:button-card + entity: "[[[ return variables.person_entity3 ]]]" + show_entity_picture: true + show_name: false + styles: + card: + - height: 55px + - width: 55px + - margin: 0 + - padding: 0 + - border-radius: 50% + - justify-self: end + - position: relative + - overflow: visible + img_cell: + - height: 100% + - width: 100% + - border-radius: 25px + - overflow: hidden + entity_picture: + - height: 100% + - width: 100% + - object-fit: cover + - border-radius: 25px + custom_fields: + status: + card: + type: "custom:button-card" + icon: | + [[[ + var stato = states[variables.person_entity3].state; + if (stato === 'home') { + return 'fapro:house-fill'; + } else if (stato === 'Ullern') { + return 'mdi:account-school'; + } else if (stato === 'Strømstad') { + return 'mdi:lighthouse'; + } else if (stato === 'Toten') { + return 'mdi:tractor'; + } else if (stato === 'Oslo Revmatologipraksis') { + return 'mdi:stethoscope'; + } else { + return 'fas:plane'; + } + ]]] + + show_name: false + show_state: false + show_label: false + styles: + card: + - background-color: | + [[[ + var stato = states[variables.person_entity3].state; + if (stato === 'home') { + return 'var(--color-green)'; + } else if (stato === 'Strømstad') { + return 'var(--color-blue)'; + } else if (stato === 'Toten') { + return 'var(--color-brown)'; + } else if (stato === 'Ullern') { + return 'var(--color-yellow)'; + } else if (stato === 'Oslo Revmatologipraksis') { + return 'var(--color-red)'; + } else { + return 'var(--color-blue)'; + } + ]]] + - color: white + - border-radius: 50% + - height: 22px + - width: 22px + - position: absolute + - top: -63px + - right: -3px + - display: flex + - align-items: center + - justify-content: center + - box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2) + icon: + - color: white + - width: 60% + - height: 60% From 19efa6880811b4e8397d8e92504a123d936f0252 Mon Sep 17 00:00:00 2001 From: Sebastian Kristo <120048876+SebastianKristo@users.noreply.github.com> Date: Fri, 18 Apr 2025 17:44:25 +0200 Subject: [PATCH 13/24] Delete dashboard/HaCasa/templates/yourcustomcard.yaml --- dashboard/HaCasa/templates/yourcustomcard.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 dashboard/HaCasa/templates/yourcustomcard.yaml diff --git a/dashboard/HaCasa/templates/yourcustomcard.yaml b/dashboard/HaCasa/templates/yourcustomcard.yaml deleted file mode 100644 index e69de29..0000000 From f9d12eea5ff4c467cc6154d0ef5496a6e010efc4 Mon Sep 17 00:00:00 2001 From: Sebastian Kristo <120048876+SebastianKristo@users.noreply.github.com> Date: Fri, 18 Apr 2025 17:44:34 +0200 Subject: [PATCH 14/24] Add files via upload --- dashboard/HaCasa/templates/custom_templates/yourcustomcard.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 dashboard/HaCasa/templates/custom_templates/yourcustomcard.yaml diff --git a/dashboard/HaCasa/templates/custom_templates/yourcustomcard.yaml b/dashboard/HaCasa/templates/custom_templates/yourcustomcard.yaml new file mode 100644 index 0000000..e69de29 From 29f7b3f491c1a4fcf1fbb20c5df519ba583ff0cb Mon Sep 17 00:00:00 2001 From: Sebastian Kristo <120048876+SebastianKristo@users.noreply.github.com> Date: Fri, 18 Apr 2025 17:46:36 +0200 Subject: [PATCH 15/24] Create README.md --- .../templates/custom_templates/hc_header_card_3_person/README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/README.md diff --git a/dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/README.md b/dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/README.md new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/README.md @@ -0,0 +1 @@ + From 86040de53bfa0db52fc35f88fed480324787a66b Mon Sep 17 00:00:00 2001 From: Sebastian Kristo <120048876+SebastianKristo@users.noreply.github.com> Date: Fri, 18 Apr 2025 17:47:20 +0200 Subject: [PATCH 16/24] Rename readme.md to README.md --- .../custom_templates/hc_garden_gate_card/{readme.md => README.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename dashboard/HaCasa/templates/custom_templates/hc_garden_gate_card/{readme.md => README.md} (100%) diff --git a/dashboard/HaCasa/templates/custom_templates/hc_garden_gate_card/readme.md b/dashboard/HaCasa/templates/custom_templates/hc_garden_gate_card/README.md similarity index 100% rename from dashboard/HaCasa/templates/custom_templates/hc_garden_gate_card/readme.md rename to dashboard/HaCasa/templates/custom_templates/hc_garden_gate_card/README.md From 1f2e79b199b876a672df67b7f50812ef79802d0d Mon Sep 17 00:00:00 2001 From: Sebastian Kristo <120048876+SebastianKristo@users.noreply.github.com> Date: Fri, 18 Apr 2025 17:55:51 +0200 Subject: [PATCH 17/24] Update README.md --- .../hc_header_card_3_person/README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/README.md b/dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/README.md index 8b13789..2ed776b 100644 --- a/dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/README.md +++ b/dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/README.md @@ -1 +1,14 @@ +Added a New 3-Person Header Card +Features: +Supports up to 3 people instead of the default 1. +Can be scaled from 3-person down to a 1 person. +Inspired by the Header Card by MD3VIX i added the location icon for each person displayed. + +Variables: + person_entity1: + person_entity2: + person_entity3: + +Screenshot 2025-04-18 at 17 55 24 +Screenshot 2025-04-18 at 17 55 35 From 5ead16c3f3449469bb1079fc88c8e63e321b816c Mon Sep 17 00:00:00 2001 From: Sebastian Kristo <120048876+SebastianKristo@users.noreply.github.com> Date: Fri, 18 Apr 2025 17:57:35 +0200 Subject: [PATCH 18/24] Create hc_header_card_2_person.yaml --- .../hc_header_card_2_person.yaml | 280 ++++++++++++++++++ 1 file changed, 280 insertions(+) create mode 100644 dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/hc_header_card_2_person.yaml diff --git a/dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/hc_header_card_2_person.yaml b/dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/hc_header_card_2_person.yaml new file mode 100644 index 0000000..e530a69 --- /dev/null +++ b/dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/hc_header_card_2_person.yaml @@ -0,0 +1,280 @@ +hc_header_card_2_person: + variables: + air_quality_sensor: + person_entity1: + person_entity2: + show_icon: false + show_label: true + name: | + [[[ + const today = new Date(); + const aqi = states[variables.air_quality_sensor]?.state || 0; // Replace with your AQI entity + let icon, color; + + if (aqi <= 50) { + icon = 'mdi:alpha-g-box'; + color = 'var(--color-green)'; + } else if (aqi <= 100) { + icon = 'mdi:alpha-m-box'; + color = 'var(--color-yellow)'; + } else if (aqi <= 150) { + icon = 'mdi:alpha-u-box'; + color = 'var(--color-orange)'; + } else if (aqi <= 200) { + icon = 'mdi:alpha-u-box'; + color = 'var(--color-red)'; + } else if (aqi <= 300) { + icon = 'mdi:alpha-v-box-box'; + color = 'var(--color-purple)'; + } else if (aqi <= 500) { + icon = 'mdi:alpha-h-box-box'; + color = 'var(--color-orange)'; + } else { + icon = 'mdi:emoticon-dead'; + color = 'var(--color-red)'; + } + + if (variables.air_quality_sensor) { + return ` + ${today.toLocaleString('en-US', { month: 'long', day: 'numeric' })} + + + `; + } + else { + return ` + ${today.toLocaleString('en-US', { month: 'long', day: 'numeric' })} + `; + } + ]]] + label: | + [[[ return states[entity.entity_id].attributes.temperature + '° - ' + + states[entity.entity_id].attributes.humidity + '%']]] + styles: + card: + - box-shadow: none + - background: none + - border-radius: 0% + - padding-right: 4px + grid: + - grid-template-areas: | + "weather_icon n person1 person2" + "weather_icon l person1 person2" + - grid-template-columns: min-content min-content 1fr + - grid-template-rows: min-content min-content + - column-gap: 5px + name: + - justify-self: start + - font-family: montserrat + - font-weight: 800 + - font-size: 16px + - align-self: end + label: + - justify-self: start + - font-family: montserrat + - font-size: 14px + - color: var(--subtext-color) + custom_fields: + weather_icon: + - justify-self: start + - padding: 0 + - margin: 0 + person1: + - justify-self: end + - display: "[[[ return variables.person_entity1 ? 'block' : 'none' ]]]" + person2: + - justify-self: end + - display: "[[[ return variables.person_entity2 ? 'block' : 'none' ]]]" + person3: + - justify-self: end + - display: "[[[ return variables.person_entity3 ? 'block' : 'none' ]]]" + air_quality: + - jusity-self: end + - margin-left: "-30px" + - align-self: center + custom_fields: + weather_icon: | + [[[ + const style = ` + ` + if (!entity || !entity.state) return 'fas:question'; + const weather = entity.state.toLowerCase(); + return style + ' ' || 'fas:question' + ]]] + person1: + card: + type: custom:button-card + entity: "[[[ return variables.person_entity1 ]]]" + show_entity_picture: true + show_name: false + styles: + card: + - height: 55px + - width: 55px + - margin: 0 + - padding: 0 + - border-radius: 50% + - justify-self: end + - position: relative + - overflow: visible + img_cell: + - height: 100% + - width: 100% + - border-radius: 25px + - overflow: hidden + entity_picture: + - height: 100% + - width: 100% + - object-fit: cover + - border-radius: 25px + custom_fields: + status: + card: + type: "custom:button-card" + icon: | + [[[ + var stato = states[variables.person_entity1].state; + if (stato === 'home') { + return 'fapro:house-fill'; + } else if (stato === 'Ullern') { + return 'mdi:account-school'; + } else if (stato === 'Strømstad') { + return 'mdi:lighthouse'; + } else if (stato === 'Toten') { + return 'mdi:tractor'; + } else if (stato === 'Oslo Revmatologipraksis') { + return 'mdi:stethoscope'; + } else { + return 'fas:plane'; + } + ]]] + show_name: false + show_state: false + show_label: false + styles: + card: + - background-color: | + [[[ + var stato = states[variables.person_entity1].state; + if (stato === 'home') { + return 'var(--color-green)'; + } else if (stato === 'Strømstad') { + return 'var(--color-blue)'; + } else if (stato === 'Toten') { + return 'var(--color-brown)'; + } else if (stato === 'Ullern') { + return 'var(--color-yellow)'; + } else if (stato === 'Oslo Revmatologipraksis') { + return 'var(--color-red)'; + } else { + return 'var(--color-blue)'; + } + ]]] + - color: white + - border-radius: 50% + - height: 22px + - width: 22px + - position: absolute + - top: -63px + - right: -3px + - display: flex + - align-items: center + - justify-content: center + - box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2) + icon: + - color: white + - width: 60% + - height: 60% + person2: + card: + type: custom:button-card + entity: "[[[ return variables.person_entity2 ]]]" + show_entity_picture: true + show_name: false + styles: + card: + - height: 55px + - width: 55px + - margin: 0 + - padding: 0 + - border-radius: 50% + - justify-self: end + - position: relative + - overflow: visible + img_cell: + - height: 100% + - width: 100% + - border-radius: 25px + - overflow: hidden + entity_picture: + - height: 100% + - width: 100% + - object-fit: cover + - border-radius: 25px + custom_fields: + status: + card: + type: "custom:button-card" + icon: | + [[[ + var stato = states[variables.person_entity2].state; + if (stato === 'home') { + return 'fapro:house-fill'; + } else if (stato === 'Ullern') { + return 'mdi:account-school'; + } else if (stato === 'Strømstad') { + return 'mdi:lighthouse'; + } else if (stato === 'Toten') { + return 'mdi:tractor'; + } else if (stato === 'Oslo Revmatologipraksis') { + return 'mdi:stethoscope'; + } else { + return 'fas:plane'; + } + ]]] + show_name: false + show_state: false + show_label: false + styles: + card: + - background-color: | + [[[ + var stato = states[variables.person_entity2].state; + if (stato === 'home') { + return 'var(--color-green)'; + } else if (stato === 'Strømstad') { + return 'var(--color-blue)'; + } else if (stato === 'Toten') { + return 'var(--color-brown)'; + } else if (stato === 'Ullern') { + return 'var(--color-yellow)'; + } else if (stato === 'Oslo Revmatologipraksis') { + return 'var(--color-red)'; + } else { + return 'var(--color-blue)'; + } + ]]] + - color: white + - border-radius: 50% + - height: 22px + - width: 22px + - position: absolute + - top: -63px + - right: -3px + - display: flex + - align-items: center + - justify-content: center + - box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2) + icon: + - color: white + - width: 60% + - height: 60% From 181314eba4e0a3062a8e1c2ecefdbdd9960a52b4 Mon Sep 17 00:00:00 2001 From: Sebastian Kristo <120048876+SebastianKristo@users.noreply.github.com> Date: Fri, 18 Apr 2025 17:59:01 +0200 Subject: [PATCH 19/24] Create hc_header_card_1_person.yaml --- .../hc_header_card_1_person.yaml | 190 ++++++++++++++++++ 1 file changed, 190 insertions(+) create mode 100644 dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/hc_header_card_1_person.yaml diff --git a/dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/hc_header_card_1_person.yaml b/dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/hc_header_card_1_person.yaml new file mode 100644 index 0000000..8817678 --- /dev/null +++ b/dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/hc_header_card_1_person.yaml @@ -0,0 +1,190 @@ +hc_header_card_1_person: + variables: + air_quality_sensor: + person_entity1: + show_icon: false + show_label: true + name: | + [[[ + const today = new Date(); + const aqi = states[variables.air_quality_sensor]?.state || 0; // Replace with your AQI entity + let icon, color; + + if (aqi <= 50) { + icon = 'mdi:alpha-g-box'; + color = 'var(--color-green)'; + } else if (aqi <= 100) { + icon = 'mdi:alpha-m-box'; + color = 'var(--color-yellow)'; + } else if (aqi <= 150) { + icon = 'mdi:alpha-u-box'; + color = 'var(--color-orange)'; + } else if (aqi <= 200) { + icon = 'mdi:alpha-u-box'; + color = 'var(--color-red)'; + } else if (aqi <= 300) { + icon = 'mdi:alpha-v-box-box'; + color = 'var(--color-purple)'; + } else if (aqi <= 500) { + icon = 'mdi:alpha-h-box-box'; + color = 'var(--color-orange)'; + } else { + icon = 'mdi:emoticon-dead'; + color = 'var(--color-red)'; + } + + if (variables.air_quality_sensor) { + return ` + ${today.toLocaleString('en-US', { month: 'long', day: 'numeric' })} + + + `; + } + else { + return ` + ${today.toLocaleString('en-US', { month: 'long', day: 'numeric' })} + `; + } + ]]] + label: | + [[[ return states[entity.entity_id].attributes.temperature + '° - ' + + states[entity.entity_id].attributes.humidity + '%']]] + styles: + card: + - box-shadow: none + - background: none + - border-radius: 0% + - padding-right: 4px + grid: + - grid-template-areas: | + "weather_icon n person1" + "weather_icon l person1" + - grid-template-columns: min-content min-content 1fr + - grid-template-rows: min-content min-content + - column-gap: 5px + name: + - justify-self: start + - font-family: montserrat + - font-weight: 800 + - font-size: 16px + - align-self: end + label: + - justify-self: start + - font-family: montserrat + - font-size: 14px + - color: var(--subtext-color) + custom_fields: + weather_icon: + - justify-self: start + - padding: 0 + - margin: 0 + person1: + - justify-self: end + - display: "[[[ return variables.person_entity1 ? 'block' : 'none' ]]]" + air_quality: + - jusity-self: end + - margin-left: "-30px" + - align-self: center + custom_fields: + weather_icon: | + [[[ + const style = ` + ` + if (!entity || !entity.state) return 'fas:question'; + const weather = entity.state.toLowerCase(); + return style + ' ' || 'fas:question' + ]]] + person1: + card: + type: custom:button-card + entity: "[[[ return variables.person_entity1 ]]]" + show_entity_picture: true + show_name: false + styles: + card: + - height: 55px + - width: 55px + - margin: 0 + - padding: 0 + - border-radius: 50% + - justify-self: end + - position: relative + - overflow: visible + img_cell: + - height: 100% + - width: 100% + - border-radius: 25px + - overflow: hidden + entity_picture: + - height: 100% + - width: 100% + - object-fit: cover + - border-radius: 25px + custom_fields: + status: + card: + type: "custom:button-card" + icon: | + [[[ + var stato = states[variables.person_entity1].state; + if (stato === 'home') { + return 'fapro:house-fill'; + } else if (stato === 'Ullern') { + return 'mdi:account-school'; + } else if (stato === 'Strømstad') { + return 'mdi:lighthouse'; + } else if (stato === 'Toten') { + return 'mdi:tractor'; + } else if (stato === 'Oslo') { + return 'mdi:stethoscope'; + } else { + return 'fas:plane'; + } + ]]] + show_name: false + show_state: false + show_label: false + styles: + card: + - background-color: | + [[[ + var stato = states[variables.person_entity1].state; + if (stato === 'home') { + return 'var(--color-green)'; + } else if (stato === 'Strømstad') { + return 'var(--color-blue)'; + } else if (stato === 'Toten') { + return 'var(--color-brown)'; + } else if (stato === 'Ullern') { + return 'var(--color-yellow)'; + } else if (stato === 'Oslo') { + return 'var(--color-red)'; + } else { + return 'var(--color-blue)'; + } + ]]] + - color: white + - border-radius: 50% + - height: 22px + - width: 22px + - position: absolute + - top: -63px + - right: -3px + - display: flex + - align-items: center + - justify-content: center + - box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2) + icon: + - color: white + - width: 60% + - height: 60% + From d29b258ec7d2e9c3d9ad9ec2def40cad6879417b Mon Sep 17 00:00:00 2001 From: Sebastian Kristo <120048876+SebastianKristo@users.noreply.github.com> Date: Fri, 18 Apr 2025 17:59:32 +0200 Subject: [PATCH 20/24] Update hc_header_card_2_person.yaml --- .../hc_header_card_2_person.yaml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/hc_header_card_2_person.yaml b/dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/hc_header_card_2_person.yaml index e530a69..7f7bb3d 100644 --- a/dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/hc_header_card_2_person.yaml +++ b/dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/hc_header_card_2_person.yaml @@ -88,9 +88,6 @@ hc_header_card_2_person: person2: - justify-self: end - display: "[[[ return variables.person_entity2 ? 'block' : 'none' ]]]" - person3: - - justify-self: end - - display: "[[[ return variables.person_entity3 ? 'block' : 'none' ]]]" air_quality: - jusity-self: end - margin-left: "-30px" @@ -151,7 +148,7 @@ hc_header_card_2_person: return 'mdi:lighthouse'; } else if (stato === 'Toten') { return 'mdi:tractor'; - } else if (stato === 'Oslo Revmatologipraksis') { + } else if (stato === 'Oslo') { return 'mdi:stethoscope'; } else { return 'fas:plane'; @@ -173,7 +170,7 @@ hc_header_card_2_person: return 'var(--color-brown)'; } else if (stato === 'Ullern') { return 'var(--color-yellow)'; - } else if (stato === 'Oslo Revmatologipraksis') { + } else if (stato === 'Oslo') { return 'var(--color-red)'; } else { return 'var(--color-blue)'; @@ -235,7 +232,7 @@ hc_header_card_2_person: return 'mdi:lighthouse'; } else if (stato === 'Toten') { return 'mdi:tractor'; - } else if (stato === 'Oslo Revmatologipraksis') { + } else if (stato === 'Oslo') { return 'mdi:stethoscope'; } else { return 'fas:plane'; @@ -257,7 +254,7 @@ hc_header_card_2_person: return 'var(--color-brown)'; } else if (stato === 'Ullern') { return 'var(--color-yellow)'; - } else if (stato === 'Oslo Revmatologipraksis') { + } else if (stato === 'Oslo') { return 'var(--color-red)'; } else { return 'var(--color-blue)'; From 5dbd8b4e84d5e971cb4364f838defe2a9b739d8e Mon Sep 17 00:00:00 2001 From: Sebastian Kristo <120048876+SebastianKristo@users.noreply.github.com> Date: Fri, 18 Apr 2025 18:00:36 +0200 Subject: [PATCH 21/24] Update hc_header_card_3_person.yaml --- .../hc_header_card_3_person.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/hc_header_card_3_person.yaml b/dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/hc_header_card_3_person.yaml index 669bf56..44dea39 100644 --- a/dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/hc_header_card_3_person.yaml +++ b/dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/hc_header_card_3_person.yaml @@ -152,7 +152,7 @@ hc_header_card_3_person: return 'mdi:lighthouse'; } else if (stato === 'Toten') { return 'mdi:tractor'; - } else if (stato === 'Oslo Revmatologipraksis') { + } else if (stato === 'Oslo') { return 'mdi:stethoscope'; } else { return 'fas:plane'; @@ -174,7 +174,7 @@ hc_header_card_3_person: return 'var(--color-brown)'; } else if (stato === 'Ullern') { return 'var(--color-yellow)'; - } else if (stato === 'Oslo Revmatologipraksis') { + } else if (stato === 'Oslo') { return 'var(--color-red)'; } else { return 'var(--color-blue)'; @@ -236,7 +236,7 @@ hc_header_card_3_person: return 'mdi:lighthouse'; } else if (stato === 'Toten') { return 'mdi:tractor'; - } else if (stato === 'Oslo Revmatologipraksis') { + } else if (stato === 'Oslo') { return 'mdi:stethoscope'; } else { return 'fas:plane'; @@ -258,7 +258,7 @@ hc_header_card_3_person: return 'var(--color-brown)'; } else if (stato === 'Ullern') { return 'var(--color-yellow)'; - } else if (stato === 'Oslo Revmatologipraksis') { + } else if (stato === 'Oslo') { return 'var(--color-red)'; } else { return 'var(--color-blue)'; @@ -320,7 +320,7 @@ hc_header_card_3_person: return 'mdi:lighthouse'; } else if (stato === 'Toten') { return 'mdi:tractor'; - } else if (stato === 'Oslo Revmatologipraksis') { + } else if (stato === 'Oslo') { return 'mdi:stethoscope'; } else { return 'fas:plane'; @@ -343,7 +343,7 @@ hc_header_card_3_person: return 'var(--color-brown)'; } else if (stato === 'Ullern') { return 'var(--color-yellow)'; - } else if (stato === 'Oslo Revmatologipraksis') { + } else if (stato === 'Oslo') { return 'var(--color-red)'; } else { return 'var(--color-blue)'; From 345dd47e5af57d4091dc0d265230fed3009e752b Mon Sep 17 00:00:00 2001 From: Sebastian Kristo <120048876+SebastianKristo@users.noreply.github.com> Date: Fri, 18 Apr 2025 18:01:00 +0200 Subject: [PATCH 22/24] Update README.md --- .../custom_templates/hc_header_card_3_person/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/README.md b/dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/README.md index 2ed776b..9e19e84 100644 --- a/dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/README.md +++ b/dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/README.md @@ -10,5 +10,13 @@ Variables: person_entity2: person_entity3: +- type: custom:button-card + template: hc_header_card_3_person + entity: weather.forecast_home + variables: + person_entity1: person.sebastian + person_entity2: person.rune + person_entity3: person.cybele + Screenshot 2025-04-18 at 17 55 24 Screenshot 2025-04-18 at 17 55 35 From 964c2133e61856fff896cbb4514fd19595709ba5 Mon Sep 17 00:00:00 2001 From: Sebastian Kristo <120048876+SebastianKristo@users.noreply.github.com> Date: Fri, 18 Apr 2025 18:01:41 +0200 Subject: [PATCH 23/24] Update README.md --- .../custom_templates/hc_header_card_3_person/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/README.md b/dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/README.md index 9e19e84..f734e35 100644 --- a/dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/README.md +++ b/dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/README.md @@ -10,6 +10,7 @@ Variables: person_entity2: person_entity3: +``` - type: custom:button-card template: hc_header_card_3_person entity: weather.forecast_home @@ -17,6 +18,7 @@ Variables: person_entity1: person.sebastian person_entity2: person.rune person_entity3: person.cybele +``` Screenshot 2025-04-18 at 17 55 24 Screenshot 2025-04-18 at 17 55 35 From e5e86f1f6a8c2fa4b8788f2ed0919889f4b0fe5b Mon Sep 17 00:00:00 2001 From: Sebastian Kristo <120048876+SebastianKristo@users.noreply.github.com> Date: Fri, 18 Apr 2025 18:02:04 +0200 Subject: [PATCH 24/24] Update README.md --- .../custom_templates/hc_header_card_3_person/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/README.md b/dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/README.md index f734e35..cb55356 100644 --- a/dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/README.md +++ b/dashboard/HaCasa/templates/custom_templates/hc_header_card_3_person/README.md @@ -5,10 +5,12 @@ Supports up to 3 people instead of the default 1. Can be scaled from 3-person down to a 1 person. Inspired by the Header Card by MD3VIX i added the location icon for each person displayed. -Variables: +``` +variables: person_entity1: person_entity2: person_entity3: +``` ``` - type: custom:button-card