I have two automations:
The first checks the sensors that are activated and if the panel is in “armed-away” mode.
- id: '1679674514418'
alias: Alarm status
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.fibaro_door_window_sensor_2_window_door_is_open
to: 'on'
from: 'off'
- platform: state
entity_id:
- binary_sensor.recessed_door_sensor_gen5_window_door_is_open
to: 'on'
from: 'off'
condition:
- condition: state
entity_id: alarm_control_panel.alarmpaneel
state: armed_away
action:
- service: alarm_control_panel.alarm_trigger
data: {}
target:
entity_id: alarm_control_panel.alarmpaneel
mode: single
The second automation triggers the alarm and sents a notification and sents a TTS message.
- id: '1679220464444'
alias: Alarm actief
description: ''
trigger:
- platform: state
entity_id:
- alarm_control_panel.alarmpaneel
to: triggered
id: alarm_actief
condition: []
action:
- service: media_player.play_media
target:
entity_id: media_player.woonkamer
data:
media_content_id: media-source://tts/cloud?message=Alarm%2C+verlaat+onmiddelijk+het+huis.+Politie+is+gebeld.&language=nl-BE&gender=female
media_content_type: provider
metadata:
title: Alarm, verlaat onmiddelijk het huis. Politie is gebeld.
thumbnail: https://brands.home-assistant.io/_/cloud/logo.png
media_class: app
children_media_class:
navigateIds:
- {}
- media_content_type: app
media_content_id: media-source://tts
- media_content_type: provider
media_content_id: media-source://tts/cloud?message=Alarm%2C+verlaat+onmiddelijk+het+huis.+Politie+is+gebeld.&language=nl-BE&gender=female
- service: notify.mobile_app_iphone_van_lode
data:
title: "Alarm"
message: “Inbraak alarm”
data:
push:
sound:
name: "Alarm.wav"
critical: 1
volume: 1.0
This works fine but how can i get to know in wich room the alarm was activated.