Styling eines Popups mit custom:bubble-card

Hallo Leute,
ich versuche gerade, mit Hilfe der bubble-card popups zu erstellen.
Geht ganz gut: vertical-stack erstellen und als erste Karte darin eine bubble-card vom Typ pop-up anlegen.
Leider gelingt es mir nicht, in dieser bubble-card Farben etc. zu verändern.
Aktuell ist es die Farbe des Icons.
Evtl. hat ja schon mal jemand so was gemacht und kann mir einen Hinweis geben.
Hier ist meine Kartendefinition:

type: vertical-stack
cards:
  - type: custom:bubble-card
    card_type: pop-up
    hash: "#suche_gerate_mit_batterie"
    name: Suche Geräte mit Batterie
    icon: mdi:battery-70
    show_header: true
    card_mod: null
    style: |
      :host {
        --icon-color: orange !important;
      }
  - type: custom:battery-state-card
    secondary_info: "{attributes.battery_type_and_quantity}"
    filter:
      include:
        - name: entity_id
          value: binary_sensor.*batterie*
        - attributes:
            device_class: battery
      exclude:
        - name: entity_id
          value: sensor.pv_maarweg*
    sort:
      by: state
    collapse: 8
    state_map:
      - from: "off"
        to: 80
      - from: "on"
        to: 15
    bulk_rename:
      - from: " Batterie"
      - from: " Battery"
      - from: " level"
    icon_map:
      "on": mdi:battery-alert
      "off": mdi:battery
    colors:
      steps:
        - "#ff0000"
        - "#ffff00"
        - "#00ff00"
      gradient: true
title: Suche Geräte mit Batterie

Im Abschnitt Styling Option → Custom Styles / Templates diesen Code einfügen.

.bubble-icon {
  color: 
    ${
      hass.states[entity].state < 600 ?
        'lightgreen':
      hass.states[entity].state < 1100 ?
        'orange':
    'orangered'
    } !important;
}

Die Variable Entity bezieht sich auf die Entität der Bubble Card.
Wenn du keine Bedingungen brauchst, lass die Zeilen einfach weg.
So z.B.:

.bubble-icon {
  color: 
    ${'lightgreen'} !important}

1 „Gefällt mir“

Super! Ich dachte schon, in pop-up-Karten geht das garnicht. :smile: