Moin,
ich versuche seit gestern mit Hilfe der KI folgende Anzeige umzusetzen:

Inzwischen habe ich folgende yaml, welche aber nicht greift.
Kann jemand noch einen Tipp geben?
ich versuche seit gestern mit Hilfe der KI folgende Anzeige umzusetzen:

Inzwischen habe ich folgende yaml, welche aber nicht greift.
Code:
type: custom:mushroom-template-card
entity: sensor.hotwater_temp
primary: Warmwasser
secondary: "{{ states('sensor.hotwater_temp') }} °C"
icon: mdi:thermometer
icon_color: |
{% set temp = states('sensor.hotwater_temp') | float(0) %}
{% if temp < 30 %}
blue
{% else %}
red
{% endif %}
content: ""
tap_action:
action: more-info
card_mod:
style: |
ha-card {
/* Dynamischer Hintergrund */
{% set temp = states('sensor.hotwater_temp') | float(0) %}
{% if temp < 30 %}
background: rgba(0, 0, 255, 0.3) !important;
{% else %}
background: rgba(255, 0, 0, 0.3) !important;
{% endif %}
}
/* Zielgenaues CSS für den sekundären Text innerhalb der info Sektion */
.info .secondary {
font-size: 1.1em !important;
font-weight: bold !important;
opacity: 0.9 !important;
}
Kann jemand noch einen Tipp geben?