Entities
All entities exposed to Home Assistant
List of entities
The Diagral integration operates in Hub Mode, meaning that all configurations will be created as devices, and each device will consist of a set of entities.
Sensor | Description |
---|---|
Central | Alarm Control Panel with 3 modes: Away, Home and Disarmed |
Anomalies | Sensor displaying the number of anomalies in state and details in attributes |
Active Groups | Sensor displaying the number of active groups in state and details per group in attributes |
All entities are refreshed every 5 minutes
(fixed) or upon receiving a Webhook from the Diagral Cloud.
Central - Details
Central entity is an Alarm Control Panel entity type. This entity supports 3 modes (Away, Home and Disarmed) and 4 states (arming, armed_away, armed_home, disarmed, triggered)
States :
arming
: When the alarm is configured to wait for a specific time before activating (allowing time to exit or enter and input the deactivation code on the keypad)armed_away
: The alarm is fully activatedarmed_home
: The alarm is activated in home modedisarmed
: The alarm is not activatedtriggered
: An intrusion has been detected
Triggered state
The triggered
state is not a proper alarm state but is activated when receiving an ALERT webhook (alarm_code 1130, 1139) from Diagral Cloud.
The triggered
status is only removed when the alarm is disarmed.
When the triggered state is activated, the entity contains attributes (if available in the webhook):
trigger:
group_name: Motion Sensors
group_id: 3
Anomalies - Details
Example of Anomalies Sensor Attributes
unit_of_measurement: anomalies
icon: mdi:alert-box
friendly_name: Home Alarm Anomalies
created_at: 2025-02-25T17:45:10.796890+01:00
updated_at: 2025-02-25T18:14:08.936700+01:00
anomalies:
sensors:
- serial: '123'
index: 0
group: Kitchen
label: Kitchen Door
id: 23456789
name: sensorAlert
- id: 98765432
name: sensorAlert2
central:
- id: 12805213
name: mainPowerSupplyAlert
- serial: 234
group: Détecteurs de Mouvements
id: 12345678
name: mainPowerSupplyAlert2
All anomalies are under anomalies
key. The first level (e.g., sensor and central in this example) represents the type of element with anomalies. It can be of multiple types:
- sensor
- badges
- sirens
- cameras
- commands
- trasceivers
- transmitters
- central
Each anomaly can have several attributes:
id
: The unique identifier of the anomaly (internally defined by Diagral)name
: The name of the anomaly (internally defined by Diagral)serial
: The serial number of the element that triggered the anomaly (optional)index
: The index of the element that triggered the anomaly (optional)group
: The group associated with the element that triggered the anomaly. This can be the group name if defined, otherwise the Group ID (optional)label
: The name of the element that triggered the anomaly (optional)
Using this attribute format, you can leverage Jinja2 templates to extract and utilize the information you need.
Below is a quick and simple example for a Home Assistant Template (replace sensor.home_anomalies
with your actual entity):
{% set anomalies = state_attr('sensor.home_anomalies', 'anomalies') %}
{% for location in anomalies.keys() -%}
{% if anomalies[location]|list -%}
Anomalie {{ anomalies[location]|map(attribute='name')|join(', ') }} on {{ location|capitalize }}
{% endif -%}
{% endfor %}
Active Groups - Details
Example of Active Groups Sensor Attributes
unit_of_measurement: active groups
icon: mdi:home-group
friendly_name: Home Alarm Active Groups
groups:
- index: 1
name: Kitchen
active: true
- index: 2
name: Stair
active: true
- index: 3
name: Bed Room
active: true
- index: 4
name: Garage
active: false
updated_at: "2025-02-26T00:24:28.212737+01:00"
Since the attribute format is identical to that of Anomalies
, the same Jinja2 template type can be utilized.