Hello, i have a probelm.
I go lot of sensors for my locked door or windows :
What i want to do is this :
When alarm is armed (or armed_away etc…) i want show smalls informations like: covers all down or some up, locked door o windows OK etc…
My code :
type: conditional
conditions:
- condition: state
entity: alarm_control_panel.alarme
state: armed_away
- condition: or
conditions:
- condition: state
entity: alarm_control_panel.alarme
state: armed_custom_bypass
- condition: or
conditions:
- condition: state
entity: alarm_control_panel.alarme
state: armed_home
- condition: or
conditions:
- condition: state
entity: alarm_control_panel.alarme
state: armed_night
- condition: or
conditions:
- condition: state
entity: alarm_control_panel.alarme
state: armed_vacation
card:
type: markdown
content: >-
{% if is_state('cover.tous_les_volets', 'off') %}
<ha-alert title="Volets" alert-type="success">Tous les volets sont fermés</ha-alert>
{% else %}
<ha-alert title="Volets" alert-type="info">
Il y a des volets ouverts
</ha-alert>
{% endif %}
{% set statePorteEntree = states('sensor.verrou_porte_entree') %}
{% set statePorteCellier = states('sensor.verrou_porte_cellier') %}
{% set stateBaieAvantDroit = states('sensor.verrou_baie_avant_droit') %}
{% set stateBaieAvantGauche = states('sensor.verrou_baie_avant_gauche') %}
{% set stateBaieArriereDroit = states('sensor.verrou_baie_arriere_droit') %}
{% set stateBaieArriereGauche = states('sensor.verrou_baie_arriere_gauche')
%}
{% set stateFenetreWC = states('sensor.verrou_fenetre_wc') %}
{% set stateFenetreCellier = states('sensor.verrou_fenetre_cellier') %}
{% if
statePorteEntree == "LOCKED" and
statePorteCellier == "LOCKED" and
stateBaieAvantDroit == "LOCKED" and
stateBaieAvantGauche == "LOCKED" and
stateBaieArriereDroit == "LOCKED" and
stateBaieArriereGauche == "LOCKED" and
stateFenetreWC == "LOCKED" and
stateFenetreCellier == "LOCKED"
%}
<ha-alert title="Verrous" alert-type="success">Tout est fermé</ha-alert>
{% else %}
<ha-alert title="Volets" alert-type="warning">Il y a des portes ou fenêtres
ouvertes</ha-alert>
{% endif %}
title: Alarme activée
- I wanted to know, if state of alarm like : any armed state exist ?
- Is there a simpler solution to retrieve the sensors.verrou_* entities with the openState attribute to know if everything is LOCKED or not?
I tryied to make a sensor group but i’v got state: undifined because he try to do math operation on values.
Thank you for your help