Hi Leute,
ich brauch mal Euer Schwarmwissen. Ich versuche was zu tüfteln und weiss nicht, wie ich es am besten lösen soll.
Auf meinem Dashboard hab ich eine Card.
Diese Card ist Grün, wenn die Terassentür zu ist. Und Rot, wenn die Tür auf ist.
So sieht der Code aus
type: vertical-stack
cards:
- type: horizontal-stack
cards:
- type: custom:button-card
color_type: card
entity: binary_sensor.aqara_tuersensor_terasse_contact
name: Tür zur Terasse ist
show_state: true
state:
- value: "on"
color: red
icon: mdi:alert
styles:
card:
- animation: blink 2s ease infinite
- value: "off"
color: green
icon: mdi:shield-lock
tap_action:
action: toggle
- type: custom:button-card
color_type: card
entity: binary_sensor.aqara_smoke_kuche_smoke
name: Rauchmelder Küche
show_state: true
state:
- value: "on"
color: red
icon: mdi:smoke
styles:
card:
- animation: blink 2s ease infinite
tap_action:
action: toggle
- value: "off"
color: green
icon: mdi:smoke
tap_action:
action: toggle
Jetzt sitzt ich nicht immer am HA Dashboard, also soll die Card Rot bleiben, bis ich manuell auf die Card drücke.
Meine Idee wäre es ein Helper zu nehmen.
D.h. wenn die Tür auf geht, soll eine automation den helper auf an schalten. Das „helper an“ soll die Card Rot einfärben.
Wenn die Tür zu geht, soll die Card rot bleiben.
Wenn ich die Card manuell drücke, soll der helper von „helper an“ auf „helper aus“, WENN die Tür zu ist. Wenn Tür zu und helper aus, soll die Card grün werden.
wie kann ich das abbilden? macht das Sinn? habt ihr eine bessere Idee?
Danke Euch!