Schriftgröße und Position in Mushroom-Card

Fidibus

Active member
Moin,
ich versuche seit gestern mit Hilfe der KI folgende Anzeige umzusetzen:
1762761187110.png
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?
 

Letzte Anleitungen

Statistik des Forums

Themen
7.364
Beiträge
71.857
Mitglieder
7.848
Neuestes Mitglied
Freemi
Zurück
Oben