Servus,
ich habe mal wieder ein Problem. Ich versuche mit der Picture Elements Card auf dem Dashboard eine Anzeige für die Anzahl offener Fenster zu erstellen. Soweit funktioniert es auch.
Wo ich jedoch nicht weiter komme ist das einbeziehen verschiedener Conditions.
Wenn alle Fenster zu sind, funktioniert die Anzeige, wenn 1 Fenster offen ist funktioniert das Ganze auch, ich will jetzt jedoch noch eine dritte Condition einbeziehen, wenn die Anzahl über 1 ist. Das will aber leider nicht funktionieren.
Kann mir einer eventiell helfen, wo in meinem Code der Fehler versteckt ist oder ob mein Vorhaben überhaupt möglich ist?
Hier mal mein yaml- Code:
type: picture-elements
image: local/Fensterzu.jpg
elements:
- type: image
entity: binary_sensor.alle_fenster
state_image:
'on': local/Fensterauf.jpg
style:
left: 50%
top: 50%
width: 100%
- type: conditional
conditions:
- entity: sensor.anzahl_an_offenen_fenstern
state: '1'
elements:
- type: state-label
entity: sensor.anzahl_an_offenen_fenstern
prefix: 'Es ist noch '
suffix: ' Fenster offen.'
style:
left: 69%
top: 90%
color: white
font-size: 20px
font-weight: bold
- type: conditional
conditions:
- entity: sensor.anzahl_an_offenen_fenstern
state: '0'
elements:
- type: state-label
prefix: Es sind alle Fenster geschlossen.
style:
left: 69%
top: 90%
color: white
font-size: 20px
font-weight: bold
- type: conditional
conditions:
- state: numeric_state
entity: sensor.anzahl_an_offenen_fenstern
above: 1
elements:
- type: state-label
entity: sensor.anzahl_an_offenen_fenstern
prefix: 'Es sind noch '
suffix: ' Fenster offen.'
style:
left: 69%
top: 90%
color: white
font-size: 20px
font-weight: bold
by HarryP: Codezeilen formatiert (bitte immer in </> einbinden)