Hello,
When activated my alarm I fill in a helper (text) with the text “Sensor onbepaald” :
- service: input_text.set_value
data:
value: Sensor onbepaald
target:
entity_id: input_text.text_sensor_die_alarm_activeert
When a sensor detects motion I do 2 things : setting a helper (boolean) on ‘on’ and filling the text helper with the name (and date/hour) of the sensor :
- service: input_text.set_value
data:
value: >-
Sensor gang op {{ as_timestamp( now() | as_local, 0)|
timestamp_custom('%d/%-m/%-Y ''om'' %H:%M:%S') }}
target:
entity_id: input_text.text_sensor_die_alarm_activeert
- service: input_boolean.turn_on
data: {}
target:
entity_id: input_boolean.toggle_alarm_activeren
An automatisation based on that boolean gives the alarm :
trigger:
- platform: state
entity_id: input_boolean.toggle_alarm_activeren
to: 'on'
condition: []
action:
- service: notify.notification_devices
data:
message: >-
INTRUDER ALERT! ({{ states('input_text.text_sensor_die_alarm_activeert')
}}) !
data:
actions:
- action: URI
title: Camera's
uri: /my-home/camera
- action: DISABLE_ALARM_ONCE
title: Vals Alarm ?
- action: DISABLE_ALARM
title: Alarm uit
...
Now, I get the alarm on my phone but the helper input_text.text_sensor_die_alarm_activeert is still on ‘Sensor onbepaald’…so I don’t know which sensor is causing the alarm.
What am I missing ?