From 259b04f0e75a66784976a0a78bcf4054d0f193d5 Mon Sep 17 00:00:00 2001 From: Tobias Lehmann Date: Tue, 1 Jul 2025 14:35:06 +0200 Subject: [PATCH] altert template fixed --- files/homeassistant/templates/alert.yaml | 59 +++++++++++++++++------- 1 file changed, 42 insertions(+), 17 deletions(-) diff --git a/files/homeassistant/templates/alert.yaml b/files/homeassistant/templates/alert.yaml index bbf29d3..30322f8 100644 --- a/files/homeassistant/templates/alert.yaml +++ b/files/homeassistant/templates/alert.yaml @@ -20,27 +20,52 @@ filter: fill_container: true layout: vertical multiline_secondary: false + tap_action: + action: fire-dom-event + browser_mod: + service: browser_mod.popup + data: + dismissable: true + autoclose: false + title: Alarm + timeout: 30000 + content: + type: horizontal-stack + cards: + - type: custom:auto-entities + show_empty: true + card: + type: entities + card_mod: + style: | + ha-card { + background-color: red; + border-radius: 5px; + --primary-color: white; + --paper-item-icon-color: white; + --secondary-text-color: white; + height: 8em !important; + overflow-y: scroll !important; + } + filter: + include: + - entity_id: /^alert(.).* + options: + secondary_info: last-changed + exclude: + - state: "off" + - state: idle + sort: + method: last_changed + reverse: true + grid_options: + columns: full card_mod: style: | ha-card { + --icon-size: 1.9em; + --icon-symbol-size: 1.8em; animation: blink 1s linear infinite; } @keyframes blink { 50% {opacity: 0;} } - - mushroom-shape-icon$: | - .shape - { - {% if states('sensor.luba_vsm5l4ku_aktivitatsmodus') == 'MODE_WORKING' or states('sensor.luba_vsm5l4ku_aktivitatsmodus') == 'MODE_RETURNING' %} - --shape-animation: spin 3s linear infinite; - {% endif %} - --icon-symbol-size: 1.4em; - --icon-size: 1.8em; - } - mushroom-state-info$: | - .container { - --card-primary-font-size: 0.7em; - --card-secondary-font-size: 0.7em; - --card-primary-line-height: 1.0em; - --card-secondary-line-height: 1.0em; - } show_empty: true