Ich bin mir nicht sicher, ob das nicht am Sinn vorbei geht. Due Filterst dir ja die offenen Fenster/Türen nach einem bestimmten Status. Du müsstest dann schon irgendwo in der Kette sagen, wenn / dann / sonst
Mal ein anderer Ansatz:
Da du ja sowieso nicht automatisch alle Fenster ind Türen Filterst, sondern nur nach State on suchst und die Entities manuell bennenst, kannst du es auch anders machen.
Pack alle Türen und /oder Fenster in einen Gruppenhelfer z.B. “Alle Fenster”.
Leg dir eine Dashboardkarte an. In diesem Beispeil eine Bubble Card (weil man die gut Stylen kann, geht aber sicher auch sehr gut mit der Button Card.
Beispielhaft so:
type: custom:bubble-card
card_type: button
button_type: state
card_layout: normal
styles: ""
tap_action:
action: navigate
navigation_path: "#fenster"
double_tap_action:
action: none
hold_action:
action: none
button_action:
tap_action:
action: navigate
navigation_path: "#fenster"
use_accent_color: true
show_name: true
force_icon: false
icon: ""
show_last_changed: false
show_icon: true
scrolling_effect: false
show_state: true
show_attribute: false
sub_button:
main:
- entity: sensor.anzahl_offene_fenster_zahl
hold_action:
action: none
tap_action:
action: navigate
navigation_path: "#fenster"
double_tap_action:
action: none
show_icon: false
show_state: true
bottom: []
name: Fenster
modules:
- state_window
entity: sensor.anzahl_offene_fenster
rows: 1
Das verwendete Modul state_window styled die Karte:
/* SLANG - ändert das Icon je nach Zustand */
${icon.setAttribute("icon",
hass.states['binary_sensor.alle_fenster'].state === 'on' ? 'mdi:window-open-variant' :
'mdi:window-closed-variant')
}
ha-card {
--bubble-main-background-color: ${
state === 'geschlossen' ? 'rgba(77, 177, 88, 0.2)' :
'rgba(243, 69, 60, 0.2)'} !important;
--bubble-secondary-background-color: ${
state === 'geschlossen' ? 'rgba(77, 177, 88, 1)' :
'rgba(243, 69, 60, 1)'} !important;
}
.bubble-name {
font-weight: 300;
}
.bubble-state {
font-weight: 400;
}
.bubble-sub-button {
background-color: ${
state === 'geschlossen' ? 'rgba(77, 177, 88, 1)' :
'rgba(243, 69, 60, 1)'} !important;
font-weight: bold;
font-size: 18px;
}
.bubble-icon {
color: #e1e1e1 !important;
opacity: 1 !important;
}
Das Teil sieht so aus, wenn Fenster offen sind:

und so wenn alle Fenster zu sind:

In dem SubButton steht immer die Anzahl der geöffneten Fenster. Klickt man da drauf, kommt eine Auflistung der offenen Fenster als PopUp. Zum Beispiel so:
Das ist nur ein Beipiel wie mans machen kann. Ich glaube das geht auch auf 1001 andere Wege… Such mal im Forum, jede Wette findest du noch was anderes…