Bubble-Card DWD-Wetterwarnungen bzw. NINA-Integration mit Lauftext

Moin,
ich habe die Bubble-Card zur Darstellung von DWD-Wetterwarnungen angepasst. Für Interessierte - Code nachfolgend: (UPDATE: Code angepasst)

Bildschirmaufnahme2025-10-04114348-ezgif.com-video-to-webp-converter

type: custom:bubble-card
card_type: button
button_type: name
entity: sensor.stadt_neubukow_aktuelle_warnstufe
styles: |-
  .bubble-container {
    --bubble-border-radius: 0px !important;
    --bubble-backdrop-filter: blur(5.1px);
    -webkit-backdrop-filter: blur(5.1px);
    backdrop-filter: blur(5px);
    overlay-backdrop-opacity: 1;
    overlay-backdrop-background-color: rgba(0, 0, 0, 0.32);
    transition: all 150ms ease-in-out;
    box-shadow: rgba(255, 255, 255, 0.05) 0 0 1px 1px inset;
    background: rgba(7, 189, 223, 0.15);
    background-image: linear-gradient(180deg, rgba(206, 211, 234, 0.07) 0%, transparent 100%);
  }
  .bubble-button-card {
    display: grid;
    grid-template-areas:
      'i1 i i2'
      'n1 n n2'
      's1 s s2';
    grid-template-columns: auto 90% auto;
    grid-template-rows: 1fr 90% 1fr;
    justify-items: center;
  }
  .bubble-icon-container {
    grid-area: i;
    justify-self: center;
    background: transparent;
    icon-color: white;
    margin-top: -60px;
  }
  .bubble-name-container {
    grid-area: i;
    justify-self: center;
    align-self: start;
    justify-content: center;
    align-content: center;
    justify-items: center;
    width: 90%;
  }
  .large .bubble-sub-button-container {
    max-width: calc(100% - 20px);
    max-height: calc(100% - 20px);
    grid-area: n;
    justify-self: center;
    align-self: center;
    justify-content: center;
    align-content: start;
    justify-items: center;
  }
  .bubble-name {
    font-family: roboto;
    font-size: calc(1rem + (12 - 10) * ((100vw - 320px) / (1600 - 320)));
    font-weight: 300;
    justify-content: center !important;
    text-align: center;
    margin-top: 10px;
  }
  .bubble-state {
    font-family: roboto;
    font-size: calc(1rem + (11 - 10) * ((100vw - 320px) / (1600 - 320)));
    font-weight: 300;
    line-height: 1;
    justify-content: center !important;
    text-align: center;
    align-self: center;
    margin-top: 40px;
    color: white;
    width: 100% !important;
    display: inline-block !important;
    position: relative !important;
    white-space: nowrap !important;
    animation: scroll 30s linear infinite ;              
  }
    @keyframes scroll {
      0% { transform: translateX(100%); }
      100% { transform: translateX(-500%); }
    }
  .bubble-sub-button-1 {
    font-size: calc(1rem + (12 - 10) * ((100vw - 320px) / (1600 - 320)));
    font-weight: 600;
    margin-top: 15px;
    color: ${
        hass.states['sensor.stadt_neubukow_aktuelle_warnstufe'].state === '0' ? 'white'
      : hass.states['sensor.stadt_neubukow_aktuelle_warnstufe'].state === '1' ? 'gold'
      : hass.states['sensor.stadt_neubukow_aktuelle_warnstufe'].state === '2' ? 'orange'
      : hass.states['sensor.stadt_neubukow_aktuelle_warnstufe'].state === '3' ? 'orangered' : 'mediumpurple'
    } !important;
  }
  .bubble-sub-button-2 {
    position: absolute;
    text-align: center;
    align-self: end;
    left: -10%;
    top: 80%;
  }
  .bubble-sub-button-3 {
    position: absolute;
    text-align: center;
    align-self: end;
    right: -10%;
    top: 80%;
  }
rows: "2"
card_layout: large-sub-buttons-grid
show_icon: false
scrolling_effect: false
show_state: false
show_name: true
show_attribute: true
attribute: warning_1_description
sub_button:
  - entity: sensor.stadt_neubukow_aktuelle_warnstufe
    show_attribute: true
    attribute: warning_1_headline
    show_icon: false
    state_background: false
    show_background: false
    tap_action:
      action: none
  - entity: sensor.stadt_neubukow_aktuelle_warnstufe
    show_icon: false
    state_background: false
    show_background: false
    show_attribute: true
    attribute: warning_1_start
  - entity: sensor.stadt_neubukow_aktuelle_warnstufe
    show_icon: false
    state_background: false
    show_background: false
    show_attribute: true
    attribute: warning_1_end
force_icon: false
name: Wetterwarnungen
tap_action:
  action: none
button_action:
  tap_action:
    action: none

17 „Gefällt mir“

Gefällt mir-Danke.

Wie bekomme ich das untereinander? bei mir ist es nebeneinander und leider etwas klein..

ype: custom:bubble-card
card_type: button
button_type: state
entity: sensor.stadt_kaarst_aktuelle_warnstufe
styles: |-
  .bubble-container {
    --bubble-border-radius: 0px !important;
    --bubble-backdrop-filter: blur(5.1px);
    -webkit-backdrop-filter: blur(5.1px);
    backdrop-filter: blur(5px);
    overlay-backdrop-opacity: 1;
    overlay-backdrop-background-color: rgba(0, 0, 0, 0.32);
    transition: all 150ms ease-in-out;
    box-shadow: rgba(255, 255, 255, 0.05) 0 0 1px 1px inset;
    background: rgba(7, 189, 223, 0.15);
    background-image: linear-gradient(180deg, rgba(206, 211, 234, 0.07) 0%, transparent 100%);
  }
  .bubble-button-card {
    display: grid;
    grid-template-areas:
      'i1 i i2'
      'n1 n n2'
      's1 s s2';
    grid-template-columns: auto 90% auto;
    grid-template-rows: 1fr 90% 1fr;
    justify-items: center;
  }
  .bubble-icon-container {
    grid-area: i;
    justify-self: center;
    background: transparent;
    icon-color: white;
    margin-top: -60px;
  }
  .bubble-name-container {
    grid-area: i;
    justify-self: center;
    align-self: start;
    justify-content: center;
    align-content: center;
    justify-items: center;
    width: 90%;
  }
  .large .bubble-sub-button-container {
    max-width: calc(100% - 20px);
    max-height: calc(100% - 20px);
    grid-area: n;
    justify-self: center;
    align-self: center;
    justify-content: center;
    align-content: start;
    justify-items: center;
  }
  .bubble-name {
    font-family: roboto;
    font-size: calc(1rem + (12 - 10) * ((100vw - 320px) / (1600 - 320)));
    font-weight: 300;
    justify-content: center !important;
    text-align: center;
    margin-top: 10px;
  }
  .bubble-state {
    font-family: roboto;
    font-size: calc(1rem + (9 - 10) * ((100vw - 320px) / (1600 - 320)));
    font-weight: 300;
    line-height: 1;
    justify-content: center !important;
    text-align: center;
    align-self: center;
    margin-top: 50px;
    color: white;
    width: 100% !important;
    display: inline-block !important;
    position: relative !important;
    white-space: nowrap !important;
    animation: scroll 20s linear infinite ;              
  }
    @keyframes scroll {
      0% { transform: translateX(100%); }
      100% { transform: translateX(-500%); }
    }

  .bubble-sub-button-1 {
    font-size: calc(1rem + (12 - 10) * ((100vw - 320px) / (1600 - 320)));
    font-weight: 600;
    margin-top: -15px;
    color: ${
        hass.states['sensor.stadt_kaarst_aktuelle_warnstufe'].state === '0' ? 'white'
      : hass.states['sensor.stadt_kaarst_aktuelle_warnstufe'].state === '1' ? 'gold'
      : hass.states['sensor.stadt_kaarst_aktuelle_warnstufe].state === '2' ? 'orange'
      : hass.states['sensor.stadt_kaarst_aktuelle_warnstufe'].state === '3' ? 'orangered' : 'mediumpurple'
    } !important;
  }
rows: "2"
show_icon: false
scrolling_effect: true
show_state: false
show_name: true
show_attribute: true
attribute: warning_1_headline
sub_button:
  - entity: sensor.stadt_kaarst_aktuelle_warnstufe
    show_attribute: true
    attribute: warning_1_headline
    show_icon: false
    state_background: false
    show_background: false
force_icon: false
name: Wetterwarnungen
grid_options:
  columns: 12
  rows: 1
event_action:
  tap_action:
    action: more-info
  double_tap_action:
    action: none
  hold_action:
    action: none
show_last_changed: false
show_last_updated: false
card_layout: normal

Auch das orange wird irgendwie nicht übernommen…

In deinem Code fehler bei “.bubble-sub-button-1” ein ’ bei state ===‘2’

Und dann entferne mal

show_last_changed: false
show_last_updated: false
card_layout: normal

und

grid_options:
  columns: 12
  rows: 1
1 „Gefällt mir“

Habs jetzt nochmal neu kopiert und nur die Sensoren ausgetauscht. Sieht jetzt so aus:

Frage mich, warum das Datum da drin steht wenn es in Deinem Screenshot nicht drin steht.

Die Farben hätte ich gerne etwas anders also der Hintergrund. Das sind dann diese RGB Einstellungen oder?

overlay-backdrop-background-color: rgba(0, 0, 0, 0.32); transition: all 150ms ease-in-out; box-shadow: rgba(255, 255, 255, 0.05) 0 0 1px 1px inset; background: rgba(7, 189, 223, 0.15); background-image: linear-gradient(180deg, rgba(206, 211, 234, 0.07) 0%, transparent 100%); Hier nochmald er YAML Code:

type: custom:bubble-card
card_type: button
button_type: name
entity: sensor.stadt_kaarst_aktuelle_warnstufe
styles: |-
  .bubble-container {
    --bubble-border-radius: 0px !important;
    --bubble-backdrop-filter: blur(5.1px);
    -webkit-backdrop-filter: blur(5.1px);
    backdrop-filter: blur(5px);
    overlay-backdrop-opacity: 1;
    overlay-backdrop-background-color: rgba(0, 0, 0, 0.32);
    transition: all 150ms ease-in-out;
    box-shadow: rgba(255, 255, 255, 0.05) 0 0 1px 1px inset;
    background: rgba(7, 189, 223, 0.15);
    background-image: linear-gradient(180deg, rgba(206, 211, 234, 0.07) 0%, transparent 100%);
  }
  .bubble-button-card {
    display: grid;
    grid-template-areas:
      'i1 i i2'
      'n1 n n2'
      's1 s s2';
    grid-template-columns: auto 90% auto;
    grid-template-rows: 1fr 90% 1fr;
    justify-items: center;
  }
  .bubble-icon-container {
    grid-area: i;
    justify-self: center;
    background: transparent;
    icon-color: white;
    margin-top: -60px;
  }
  .bubble-name-container {
    grid-area: i;
    justify-self: center;
    align-self: start;
    justify-content: center;
    align-content: center;
    justify-items: center;
    width: 90%;
  }
  .large .bubble-sub-button-container {
    max-width: calc(100% - 20px);
    max-height: calc(100% - 20px);
    grid-area: n;
    justify-self: center;
    align-self: center;
    justify-content: center;
    align-content: start;
    justify-items: center;
  }
  .bubble-name {
    font-family: roboto;
    font-size: calc(1rem + (12 - 10) * ((100vw - 320px) / (1600 - 320)));
    font-weight: 300;
    justify-content: center !important;
    text-align: center;
    margin-top: 10px;
  }
  .bubble-state {
    font-family: roboto;
    font-size: calc(1rem + (11 - 10) * ((100vw - 320px) / (1600 - 320)));
    font-weight: 300;
    line-height: 1;
    justify-content: center !important;
    text-align: center;
    align-self: center;
    margin-top: 40px;
    color: white;
    width: 100% !important;
    display: inline-block !important;
    position: relative !important;
    white-space: nowrap !important;
    animation: scroll 30s linear infinite ;              
  }
    @keyframes scroll {
      0% { transform: translateX(100%); }
      100% { transform: translateX(-500%); }
    }
  .bubble-sub-button-1 {
    font-size: calc(1rem + (12 - 10) * ((100vw - 320px) / (1600 - 320)));
    font-weight: 600;
    margin-top: 15px;
    color: ${
        hass.states['sensor.stadt_kaarst_aktuelle_warnstufe'].state === '0' ? 'white'
      : hass.states['sensor.stadt_kaarst_aktuelle_warnstufe'].state === '1' ? 'gold'
      : hass.states['sensor.stadt_kaarst_aktuelle_warnstufe'].state === '2' ? 'orange'
      : hass.states['sensor.stadt_kaarst_aktuelle_warnstufe'].state === '3' ? 'orangered' : 'mediumpurple'
    } !important;
  }
  .bubble-sub-button-2 {
    position: absolute;
    text-align: center;
    align-self: end;
    left: -10%;
    top: 80%;
  }
  .bubble-sub-button-3 {
    position: absolute;
    text-align: center;
    align-self: end;
    right: -10%;
    top: 80%;
  }
rows: "2"
card_layout: large-sub-buttons-grid
show_icon: false
scrolling_effect: false
show_state: false
show_name: true
show_attribute: true
attribute: warning_1_description
sub_button:
  - entity: sensor.stadt_kaarst_aktuelle_warnstufe
    show_attribute: true
    attribute: warning_1_headline
    show_icon: false
    state_background: false
    show_background: false
    tap_action:
      action: none
  - entity: sensor.stadt_kaarst_aktuelle_warnstufe
    show_icon: false
    state_background: false
    show_background: false
    show_attribute: true
    attribute: warning_1_start
  - entity: sensor.stadt_kaarst_aktuelle_warnstufe
    show_icon: false
    state_background: false
    show_background: false
    show_attribute: true
    attribute: warning_1_end
force_icon: false
name: Wetterwarnungen
tap_action:
  action: none
button_action:
  tap_action:
    action: none

Wie kann ich dei Anzeige nur darstellen lassen, wenne s auch wirklich nur eine Wetterwarnung gibt? Was muss bei Sichtbarkeit dann eingetragen werden? Dank Dir

Frage mich, warum das Datum da drin steht wenn es in Deinem Screenshot nicht drin steht.

das Datum steht bei mir jetzt auch im Screenshot … Start und Ende der Warnungen sind heute per Update im Code dazu gekommen. Wenn du das nicht möchtest - einfach die sub-buttons 2 uns 3 löschen

Die Farben hätte ich gerne etwas anders also der Hintergrund. Das sind dann diese RGB Einstellungen oder?

styles: |-
  .bubble-container {
    --bubble-border-radius: 0px !important;
    --bubble-backdrop-filter: blur(5.1px);
    -webkit-backdrop-filter: blur(5.1px);
    backdrop-filter: blur(5px);
    overlay-backdrop-opacity: 1;
    overlay-backdrop-background-color: rgba(0, 0, 0, 0.32);
    transition: all 150ms ease-in-out;
    box-shadow: rgba(255, 255, 255, 0.05) 0 0 1px 1px inset;
    background: rgba(7, 189, 223, 0.15);
    background-image: linear-gradient(180deg, rgba(206, 211, 234, 0.07) 0%, transparent 100%);
  }

Das sind diese Einstellungen … sind halt auf mein Dashboard-Styling angepasst. Da kannst du alles an deinen Style anpassen.

2 „Gefällt mir“

Danke. Kannst Du mir noch sagen, wie ich die karte nur anzeigen lasse, wenn es auch eine Warnung gibt? Was passiert, wenn es keine gibt? Dann dürfte die Karte leer sein oder? Dahe rwürde ich sie gar nicht erst anzeigen lassen wenn keine Warnung vorhanden

Kann ich nicht genau sagen, denn das hängt vom DWD ab. Ich nehme an, dann steht dort “Keine Warnungen”.

Du kannst die Karte auch nur anzeigen lassen, wenn Warnungen vorliegen.


2 „Gefällt mir“

Danke-mir war nicht klar, das ich eine Null dort eintragen kann-als Auswahl gab es das nämlich nicht.

1 „Gefällt mir“

Moin,

erstmal Danke für die tolle Arbeit. Das kannte ich so noch nicht.

Allerdings gibt es bei mir momentan mehrere Meldungen im DWD. Angezeigt wird mir mit deinem Code aber nur die Eine mit dem Dauerregen. Wie kann ich mir alle Meldungen anzeigen lassen? Mein Sensor liefert folgendes:

region_name: Stadt Delmenhorst
region_id: 103401000
last_update: 2025-10-04T10:53:51.036000+00:00
warning_count: 3
warning_1_name: DAUERREGEN
warning_1_type: 63
warning_1_level: 2
warning_1_headline: Amtliche WARNUNG vor DAUERREGEN
warning_1_description: Es tritt Dauerregen auf. Dabei werden Niederschlagsmengen zwischen 30 l/m² und 45 l/m² erwartet.
warning_1_instruction: Gefahr durch: 
 · vereinzelte Überflutungen von Straßen/Unterführungen

Handlungsempfehlungen: 
 · Verhalten im Straßenverkehr anpassen
 · überflutete Abschnitte meiden
warning_1_start: 2025-10-03T16:00:00+00:00
warning_1_end: 2025-10-04T12:00:00+00:00
warning_1_parameters: 
Niederschlag: 30-45 [l/m²]

warning_1_color: #fb8c00
warning_1: 
start_time: '2025-10-03T16:00:00+00:00'
end_time: '2025-10-04T12:00:00+00:00'
event: DAUERREGEN
event_code: 63
headline: Amtliche WARNUNG vor DAUERREGEN
description: >-
  Es tritt Dauerregen auf. Dabei werden Niederschlagsmengen zwischen 30 l/m² und
  45 l/m² erwartet.
instruction: "Gefahr durch: \n\_·\_vereinzelte Überflutungen von Straßen/Unterführungen\n\nHandlungsempfehlungen: \n\_·\_Verhalten im Straßenverkehr anpassen\n\_·\_überflutete Abschnitte meiden"
urgency: immediate
level: 2
parameters:
  Niederschlag: 30-45 [l/m²]
color: '#fb8c00'

warning_2_name: WINDBÖEN
warning_2_type: 51
warning_2_level: 1
warning_2_headline: Amtliche WARNUNG vor WINDBÖEN
warning_2_description: Es treten Windböen mit Geschwindigkeiten bis 60 km/h (17 m/s, 33 kn, Bft 7) anfangs aus südlicher, später aus südwestlicher Richtung auf. In Schauernähe sowie in exponierten Lagen muss mit Sturmböen bis 75 km/h (21 m/s, 41 kn, Bft 9) gerechnet werden.
warning_2_instruction: Hinweis auf: 
 · umherfliegende leichte Gegenstände

Handlungsempfehlungen: 
 · lose Gegenstände sichern
 · z.B. Zelte und Abdeckungen befestigen
warning_2_start: 2025-10-04T06:00:00+00:00
warning_2_end: 2025-10-04T18:00:00+00:00
warning_2_parameters: 
Windrichtung: south-west
Böen: <60 [km/h]
Exponierte Böen: <75 [km/h]

warning_2_color: #ffeb3b
warning_2: 
start_time: '2025-10-04T06:00:00+00:00'
end_time: '2025-10-04T18:00:00+00:00'
event: WINDBÖEN
event_code: 51
headline: Amtliche WARNUNG vor WINDBÖEN
description: >-
  Es treten Windböen mit Geschwindigkeiten bis 60 km/h (17 m/s, 33 kn, Bft 7)
  anfangs aus südlicher, später aus südwestlicher Richtung auf. In Schauernähe
  sowie in exponierten Lagen muss mit Sturmböen bis 75 km/h (21 m/s, 41 kn, Bft
  9) gerechnet werden.
instruction: "Hinweis auf: \n\_·\_umherfliegende leichte Gegenstände\n\nHandlungsempfehlungen: \n\_·\_lose Gegenstände sichern\n\_·\_z.B. Zelte und Abdeckungen befestigen"
urgency: immediate
level: 1
parameters:
  Windrichtung: south-west
  Böen: <60 [km/h]
  Exponierte Böen: <75 [km/h]
color: '#ffeb3b'

warning_3_name: STURMBÖEN
warning_3_type: 52
warning_3_level: 2
warning_3_headline: Amtliche WARNUNG vor STURMBÖEN
warning_3_description: Es treten Sturmböen mit Geschwindigkeiten bis 75 km/h (21 m/s, 41 kn, Bft 9) anfangs aus südlicher, später aus südwestlicher Richtung auf. In Schauernähe sowie in exponierten Lagen muss mit schweren Sturmböen bis 90 km/h (25 m/s, 48 kn, Bft 10) gerechnet werden.
warning_3_instruction: Gefahr durch: 
 · einzelne herabstürzende Äste
 · umherfliegende Gegenstände

Handlungsempfehlungen: 
 · frei stehende Objekte sichern (z.B. Leinwände und Möbel)
 · z.B. Zelte und Abdeckungen befestigen
 · im Freien auf herabfallende Gegenstände (z.B. Äste) achten
warning_3_start: 2025-10-04T10:00:00+00:00
warning_3_end: 2025-10-04T18:00:00+00:00
warning_3_parameters: 
Böen: <75 [km/h]
Exponierte Böen: <90 [km/h]
Windrichtung: south-west

warning_3_color: #fb8c00
warning_3: 
start_time: '2025-10-04T10:00:00+00:00'
end_time: '2025-10-04T18:00:00+00:00'
event: STURMBÖEN
event_code: 52
headline: Amtliche WARNUNG vor STURMBÖEN
description: >-
  Es treten Sturmböen mit Geschwindigkeiten bis 75 km/h (21 m/s, 41 kn, Bft 9)
  anfangs aus südlicher, später aus südwestlicher Richtung auf. In Schauernähe
  sowie in exponierten Lagen muss mit schweren Sturmböen bis 90 km/h (25 m/s, 48
  kn, Bft 10) gerechnet werden.
instruction: "Gefahr durch: \n\_·\_einzelne herabstürzende Äste\n\_·\_umherfliegende Gegenstände\n\nHandlungsempfehlungen: \n\_·\_frei stehende Objekte sichern (z.B. Leinwände und Möbel)\n\_·\_z.B. Zelte und Abdeckungen befestigen\n\_·\_im Freien auf herabfallende Gegenstände (z.B. Äste) achten"
urgency: immediate
level: 2
parameters:
  Böen: <75 [km/h]
  Exponierte Böen: <90 [km/h]
  Windrichtung: south-west
color: '#fb8c00'

attribution: Data provided by DWD
friendly_name: Stadt Delmenhorst Aktuelle Warnstufe

Moin,

weitere Meldungen anzuzeigen ist ganz einfach.
Nachfolgend mal ein Beispiel. Einfach 2 dieser Karten untereinander gelegt und bei der 2. Karte die Attribute geändert. z.B. statt “warning_1_headline” nimmst du “warning_2_headline” usw.

type: grid
cards:
  - type: custom:bubble-card
    card_type: button
    button_type: name
    entity: sensor.stadt_neubukow_aktuelle_warnstufe
    styles: |-
      .bubble-container {
        --bubble-border-radius: 0px !important;
        --bubble-backdrop-filter: blur(5.1px);
        -webkit-backdrop-filter: blur(5.1px);
        backdrop-filter: blur(5px);
        overlay-backdrop-opacity: 1;
        overlay-backdrop-background-color: rgba(0, 0, 0, 0.32);
        transition: all 150ms ease-in-out;
        box-shadow: rgba(255, 255, 255, 0.05) 0 0 1px 1px inset;
        background: rgba(7, 189, 223, 0.15);
        background-image: linear-gradient(180deg, rgba(206, 211, 234, 0.07) 0%, transparent 100%);
      }
      .bubble-button-card {
        display: grid;
        grid-template-areas:
          'i1 i i2'
          'n1 n n2'
          's1 s s2';
        grid-template-columns: auto 90% auto;
        grid-template-rows: 1fr 90% 1fr;
        justify-items: center;
      }
      .bubble-name-container {
        grid-area: i;
        justify-self: center;
        align-self: start;
        justify-content: center;
        align-content: center;
        justify-items: center;
        width: 90%;
      }
      .large .bubble-sub-button-container {
        max-width: calc(100% - 20px);
        max-height: calc(100% - 20px);
        grid-area: n;
        justify-self: center;
        align-self: center;
        justify-content: center;
        align-content: start;
        justify-items: center;
      }
      .bubble-name {
        font-family: roboto;
        font-size: calc(1rem + (12 - 10) * ((100vw - 320px) / (1600 - 320)));
        font-weight: 300;
        justify-content: center !important;
        text-align: center;
        margin-top: 10px;
      }
      .bubble-state {
        font-family: roboto;
        font-size: calc(1rem + (11 - 10) * ((100vw - 320px) / (1600 - 320)));
        font-weight: 300;
        line-height: 1;
        justify-content: center !important;
        text-align: center;
        align-self: center;
        margin-top: 40px;
        color: white;
        width: 100% !important;
        display: inline-block !important;
        position: relative !important;
        white-space: nowrap !important;
        animation: scroll 30s linear infinite ;              
      }
      @keyframes scroll {
        0% { transform: translateX(100%); }
        100% { transform: translateX(-500%); }
      }
      .bubble-sub-button-1 {
        font-size: calc(1rem + (12 - 10) * ((100vw - 320px) / (1600 - 320)));
        font-weight: 600;
        margin-top: 15px;
        color: ${
            hass.states['sensor.stadt_neubukow_aktuelle_warnstufe'].state === '0' ? 'white'
          : hass.states['sensor.stadt_neubukow_aktuelle_warnstufe'].state === '1' ? 'gold'
          : hass.states['sensor.stadt_neubukow_aktuelle_warnstufe'].state === '2' ? 'orange'
          : hass.states['sensor.stadt_neubukow_aktuelle_warnstufe'].state === '3' ? 'orangered' : 'mediumpurple'
        } !important;
      }
      .bubble-sub-button-2 {
        position: absolute;
        text-align: center;
        align-self: end;
        left: -10%;
        top: 80%;
      }
      .bubble-sub-button-3 {
        position: absolute;
        text-align: center;
        align-self: end;
        right: -10%;
        top: 80%;
      }
    rows: "2"
    card_layout: large-sub-buttons-grid
    show_icon: false
    scrolling_effect: false
    show_state: false
    show_name: true
    show_attribute: true
    attribute: warning_1_description
    sub_button:
      - entity: sensor.stadt_neubukow_aktuelle_warnstufe
        show_attribute: true
        attribute: warning_1_headline
        show_icon: false
        state_background: false
        show_background: false
        tap_action:
          action: none
      - entity: sensor.stadt_neubukow_aktuelle_warnstufe
        show_icon: false
        state_background: false
        show_background: false
        show_attribute: true
        attribute: warning_1_start
      - entity: sensor.stadt_neubukow_aktuelle_warnstufe
        show_icon: false
        state_background: false
        show_background: false
        show_attribute: true
        attribute: warning_1_end
    force_icon: false
    name: Wetterwarnungen
    tap_action:
      action: none
    button_action:
      tap_action:
        action: none
    modules:
      - "!default"
  - type: custom:bubble-card
    card_type: button
    button_type: state
    entity: sensor.stadt_neubukow_aktuelle_warnstufe
    styles: |-
      .bubble-container {
        --bubble-border-radius: 0px !important;
        --bubble-backdrop-filter: blur(5.1px);
        -webkit-backdrop-filter: blur(5.1px);
        backdrop-filter: blur(5px);
        overlay-backdrop-opacity: 1;
        overlay-backdrop-background-color: rgba(0, 0, 0, 0.32);
        transition: all 150ms ease-in-out;
        box-shadow: rgba(255, 255, 255, 0.05) 0 0 1px 1px inset;
        background: rgba(7, 189, 223, 0.15);
        background-image: linear-gradient(180deg, rgba(206, 211, 234, 0.07) 0%, transparent 100%);
      }
      .bubble-button-card {
        display: grid;
        grid-template-areas:
          'i1 i i2'
          'n1 n n2'
          's1 s s2';
        grid-template-columns: auto 90% auto;
        grid-template-rows: 1fr 90% 1fr;
        justify-items: center;
      }
      .bubble-name-container {
        grid-area: i;
        justify-self: center;
        align-self: start;
        justify-content: center;
        align-content: center;
        justify-items: center;
        width: 90%;
      }
      .large .bubble-sub-button-container {
        max-width: calc(100% - 20px);
        max-height: calc(100% - 20px);
        grid-area: n;
        justify-self: center;
        align-self: center;
        justify-content: center;
        align-content: start;
        justify-items: center;
      }
      .bubble-name {
        font-family: roboto;
        font-size: calc(1rem + (12 - 10) * ((100vw - 320px) / (1600 - 320)));
        font-weight: 300;
        justify-content: center !important;
        text-align: center;
        margin-top: 10px;
      }
      .bubble-state {
        font-family: roboto;
        font-size: calc(1rem + (11 - 10) * ((100vw - 320px) / (1600 - 320)));
        font-weight: 300;
        line-height: 1;
        justify-content: center !important;
        text-align: center;
        align-self: center;
        margin-top: 40px;
        color: white;
        width: 100% !important;
        display: inline-block !important;
        position: relative !important;
        white-space: nowrap !important;
        animation: scroll 30s linear infinite ;              
      }
      @keyframes scroll {
        0% { transform: translateX(100%); }
        100% { transform: translateX(-500%); }
      }
      .bubble-sub-button-1 {
        font-size: calc(1rem + (12 - 10) * ((100vw - 320px) / (1600 - 320)));
        font-weight: 600;
        margin-top: 15px;
        color: ${
            hass.states['sensor.stadt_neubukow_aktuelle_warnstufe'].state === '0' ? 'white'
          : hass.states['sensor.stadt_neubukow_aktuelle_warnstufe'].state === '1' ? 'gold'
          : hass.states['sensor.stadt_neubukow_aktuelle_warnstufe'].state === '2' ? 'orange'
          : hass.states['sensor.stadt_neubukow_aktuelle_warnstufe'].state === '3' ? 'orangered' : 'mediumpurple'
        } !important;
      }
      .bubble-sub-button-2 {
        position: absolute;
        text-align: center;
        align-self: end;
        left: -10%;
        top: 80%;
      }
      .bubble-sub-button-3 {
        position: absolute;
        text-align: center;
        align-self: end;
        right: -10%;
        top: 80%;
      }
    rows: "2"
    card_layout: large-sub-buttons-grid
    show_icon: false
    scrolling_effect: false
    show_state: false
    show_name: true
    show_attribute: true
    attribute: warning_2_description
    sub_button:
      - entity: sensor.stadt_neubukow_aktuelle_warnstufe
        show_attribute: true
        attribute: warning_2_headline
        show_icon: false
        state_background: false
        show_background: false
        tap_action:
          action: none
      - entity: sensor.stadt_neubukow_aktuelle_warnstufe
        show_icon: false
        state_background: false
        show_background: false
        show_attribute: true
        attribute: warning_2_start
      - entity: sensor.stadt_neubukow_aktuelle_warnstufe
        show_icon: false
        state_background: false
        show_background: false
        show_attribute: true
        attribute: warning_2_end
    force_icon: false
    name: Wetterwarnungen
    tap_action:
      action: none
    button_action:
      tap_action:
        action: none
    modules:
      - "!default"

Du kannst natürlich auch alles als eine Karte konfigurieren indem du einfach neue Sub-Buttons hinzufügst und dort die Attribute für die Meldungen 2, 3 usw. auswählst.

1 „Gefällt mir“

Danke. Nun klappt es :slight_smile:

1 „Gefällt mir“

Ich habe es etwas verfeinert, aber danke für den Denkanstoß.

@Schwippser du fragst für die Farbe des Sub-Button-1 den Status der aktuellen Warnstufe ab. Ich wollte aber gerne, gerade bei mehreren Meldungen, den Status des warning_1_level-Attribut bzw. warning_2_level-Attribut etc.

Dazu kann man die Farbe so abfragen

type: custom:bubble-card
card_type: button
button_type: state
state_color: false
entity: sensor.stadt_neubukow_aktuelle_warnstufe
styles: |-
  .bubble-sub-button-1{
    color: ${
        hass.states[entity].attributes.warning_1_level === 0 ? 'white'
      : hass.states[entity].attributes.warning_1_level === 1 ? 'gold'
      : hass.states[entity].attributes.warning_1_level === 2 ? 'orange'
      : hass.states[entity].attributes.warning_1_level === 3 ? 'orangered' : 'white'
    } !important;
  }

Danke dir … das erspart mir die Mühe, denn ich hatte es eigentlich auch so vor. Allerdings bekomme ich momentan keine Verbindung zum DWD. Bin deshalb auf “Nina” umgestiegen und wenn nachher Zeit ist werde ich ein wenig an der Karte basteln.

Mein Ziel ist es eine sehr kompakte Karte für’s Dashboard zu bekommen, die nacheinander mehrere Meldungen einblenden kann. Mal sehen wie ich das anstelle.

Für die NINA-Integration muss der sub-Button-1 angepasst werden

.bubble-sub-button-1 {
  font-size: calc(1rem + (12 - 10) * ((100vw - 320px) / (1600 - 320)));
  font-weight: 600;
  margin-top: 15px;
  color: ${
      hass.states[entity].attributes.severity === 'Unknown' ? 'white'
    : hass.states[entity].attributes.severity === 'Minor' ? 'gold'
    : hass.states[entity].attributes.severity === 'Moderate' ? 'orange'
    : hass.states[entity].attributes.severity === 'Severe' ? 'orangered'
    : hass.states[entity].attributes.severity === 'Extreme' ? 'red' : 'mediumpurple'
  } !important;
}

Mit DWD habe ich seit gestern auch Probleme. Die Sensoren werden oft nicht verfügbar. Auch ein Neu laden der Integration hilft dann nicht, zumindest nicht sofort.

Ich bin gespannt, was du aus der Karte machst. Ich habe es mir einfach gemacht, da ich keine Laufschrift mag.

jepp … bei mir das Gleiche … ab und zu funktioniert es mal sporadisch … aber meistens nicht. Deshalb der Umstieg auf NINA … sind auch die Meldungen vom DWD, aber es läuft bis jetzt stabil.

Habe NINA gerade mal versucht. Aber während DWD noch 1 Warnung Level 1 hat, zeigt NINA nichts an.

Möglicherweise hat der DWD bei dir noch nicht aktualisiert … ich habe aktuell noch eine Warnung bei NINA … DWD nicht erreichbar

DWD:

NINA:

Vielen Dank für die Bubble Karte.

Kannst du mir evtl. Noch zeigen, wie ich daraus eine Popup Karte in Bubble Card machen kann.

Bekomme das irgendwie nicht hin.

Jepp ist ziemlich einfach …

type: vertical-stack
cards:
  - type: custom:bubble-card
    card_type: pop-up
    hash: "#wetterwarnungen"
  - type: custom:bubble-card
    card_type: button
    button_type: state
    entity: binary_sensor.nina_warning_neubukow_stadt_rostock_mecklenburg_vorpommern_1
    styles: |-
      .bubble-container {
        --bubble-border-radius: 0px !important;
        --bubble-backdrop-filter: blur(5.1px);
        -webkit-backdrop-filter: blur(5.1px);
        backdrop-filter: blur(5px);
        overlay-backdrop-opacity: 1;
        overlay-backdrop-background-color: rgba(0, 0, 0, 0.32);
        transition: all 150ms ease-in-out;
        box-shadow: rgba(255, 255, 255, 0.05) 0 0 1px 1px inset;
        background: rgba(7, 189, 223, 0.15);
        background-image: linear-gradient(180deg, rgba(206, 211, 234, 0.07) 0%, transparent 100%);
      }
      .bubble-button-card {
        display: grid;
        grid-template-areas:
          'i1 i i2'
          'n1 n n2'
          's1 s s2';
        grid-template-columns: auto 90% auto;
        grid-template-rows: 1fr 90% 1fr;
        justify-items: center;
      }
      .bubble-name-container {
        grid-area: i;
        justify-self: center;
        align-self: start;
        justify-content: center;
        align-content: center;
        justify-items: center;
        width: 90%;
      }
      .large .bubble-sub-button-container {
        max-width: calc(100% - 20px);
        max-height: calc(100% - 20px);
        grid-area: n;
        justify-self: center;
        align-self: center;
        justify-content: center;
        align-content: start;
        justify-items: center;
      }
      .bubble-name {
        font-family: roboto;
        font-size: calc(1rem + (12 - 10) * ((100vw - 320px) / (1600 - 320)));
        font-weight: 300;
        justify-content: center !important;
        text-align: center;
        margin-top: 10px;
      }
      .bubble-state {
        font-family: roboto;
        font-size: calc(1rem + (11 - 10) * ((100vw - 320px) / (1600 - 320)));
        font-weight: 300;
        line-height: 1;
        justify-content: center !important;
        text-align: center;
        align-self: center;
        margin-top: 40px;
        color: white;
        width: 100% !important;
        display: inline-block !important;
        position: relative !important;
        white-space: nowrap !important;
        animation: scroll 30s linear infinite ;              
      }
      @keyframes scroll {
        0% { transform: translateX(100%); }
        100% { transform: translateX(-500%); }
      }
      .bubble-sub-button-1 {
        font-size: calc(1rem + (12 - 10) * ((100vw - 320px) / (1600 - 320)));
        font-weight: 600;
        margin-top: 15px;
        color: ${
            hass.states[entity].attributes.severity === 'Unknown' ? 'white'
          : hass.states[entity].attributes.severity === 'Minor' ? 'gold'
          : hass.states[entity].attributes.severity === 'Moderate' ? 'orange'
          : hass.states[entity].attributes.severity === 'Severe' ? 'orangered'
          : hass.states[entity].attributes.severity === 'Extreme' ? 'red' : 'mediumpurple'
        } !important;
      }
      .bubble-sub-button-2 {
        position: absolute;
        text-align: center;
        align-self: end;
        left: -10%;
        top: 80%;
      }
      .bubble-sub-button-3 {
        position: absolute;
        text-align: center;
        align-self: end;
        right: -10%;
        top: 80%;
      }
    rows: "2"
    card_layout: large-sub-buttons-grid
    show_icon: false
    scrolling_effect: false
    show_state: false
    show_name: true
    show_attribute: true
    attribute: description
    sub_button:
      - entity: >-
          binary_sensor.nina_warning_neubukow_stadt_rostock_mecklenburg_vorpommern_1
        show_attribute: true
        attribute: headline
        show_icon: false
        state_background: false
        show_background: false
        tap_action:
          action: none
      - entity: >-
          binary_sensor.nina_warning_neubukow_stadt_rostock_mecklenburg_vorpommern_1
        show_icon: false
        state_background: false
        show_background: false
        show_attribute: true
        attribute: start
      - entity: >-
          binary_sensor.nina_warning_neubukow_stadt_rostock_mecklenburg_vorpommern_1
        show_icon: false
        state_background: false
        show_background: false
        show_attribute: true
        attribute: expires
    force_icon: false
    name: Wetterwarnungen
    tap_action:
      action: none
    button_action:
      tap_action:
        action: none
    modules:
      - "!default"

das Popup kannst du entweder über einen Button öffnen mit

  tap_action:
    action: navigate
    navigation_path: "#wetterwearnungen"

oder du definierst einen Trigger in der Bubble-Card:

1 „Gefällt mir“