I set up the Android MQTT Alarm Control Panel App on a tablet and made some automations to have a basic alarm system in HASS. I’ve specified a group of sensors that will trigger the alarm in either Home or Away mode, and made some TTS automations to announce the state of the alarm. I’ve also set up actionable notifications in iOS for when the alarm gets triggered. However, something isn’t right that I can’t figure out. The alarm will get triggered and I’ll get a notification, but neither the tablet’s code entry, nor my iOS disarm action from the notification will actual stop the alarm from sounding. Anyone able to offer thoughts on why this is so? Here’s my set of automations:
- alias: Alarm Arm Away
initial_state: true
trigger:
- platform: state
entity_id: group.motion_sensors
to: 'on'
- platform: state
entity_id: group.door_window_sensors
to: 'on'
condition:
condition: state
entity_id: alarm_control_panel.ha_alarm
state: armed_away
action:
service: alarm_control_panel.alarm_trigger
entity_id: alarm_control_panel.ha_alarm
- alias: Alarm Arm Home
initial_state: true
trigger:
platform: state
entity_id: group.door_window_sensors
to: 'on'
condition:
condition: state
entity_id: alarm_control_panel.ha_alarm
state: armed_home
action:
service: alarm_control_panel.alarm_trigger
entity_id: alarm_control_panel.ha_alarm
- alias: Alarm Sound
initial_state: true
trigger:
platform: state
entity_id: alarm_control_panel.ha_alarm
to: triggered
for:
minutes: 1
action:
- service: scene.turn_on
entity_id: scene.panic
- alias: Alarm Disarm
initial_state: true
trigger:
platform: state
entity_id: alarm_control_panel.ha_alarm
to: disarmed
action:
- service: scene.turn_on
entity_id: scene.home
- service: script.sonos_say
data:
sonos_entity: media_player.kitchen
volume: 0.5
message: Alarm Disarmed
delay: 00:00:05
- alias: Alarm Annunciator Triggered
initial_state: true
trigger:
- platform: state
entity_id: alarm_control_panel.ha_alarm
to: triggered
action:
- service: script.sonos_say
data:
sonos_entity: media_player.kitchen
volume: 0.5
message: Warning! You have activated the alarm. You have 1 minute to disarm
before sirens sound and authorities notified
delay: 00:00:10
- alias: Alarm Annunciator Countdown
initial_state: true
trigger:
- platform: state
entity_id: alarm_control_panel.ha_alarm
to: pending
action:
- service: script.sonos_say
data:
sonos_entity: media_player.kitchen
volume: 0.5
message: Alarm will be armed in 60 seconds
delay: 00:00:05
- alias: Alarm Annunciator Armed Home
initial_state: true
trigger:
- platform: state
entity_id: alarm_control_panel.ha_alarm
to: armed_home
action:
- service: script.sonos_say
data:
sonos_entity: media_player.kitchen
volume: 0.5
message: Alarm is now armed in home mode
delay: 00:00:05
- alias: Alarm iOS Triggered Notify
initial_state: true
trigger:
- platform: state
entity_id: alarm_control_panel.ha_alarm
to: triggered
action:
- service: notify.ios_kevins_iphone
data_template:
title: Alarm has been triggered!
message: What would you like to do?
data:
push:
category: alarmactions
- alias: Alarm iOS Disarm Action
initial_state: true
trigger:
platform: event
event_type: ios.notification_action_fired
event_data:
actionName: DISARMALARM
action:
service: alarm_control_panel.alarm_disarm
entity_id: alarm_control_panel.ha_alarm
- alias: Alarm iOS Sound Action
initial_state: true
trigger:
platform: event
event_type: ios.notification_action_fired
event_data:
actionName: SOUNDALARM
action:
service: scene.turn_on
entity_id: scene.panic
And my config entries, including iOS notification and alarm control panel:
ios:
push:
categories:
- name: Alarmactions
identifier: 'alarmactions'
actions:
- identifier: 'SOUNDALARM'
title: 'Sound Alarm'
activationMode: 'foreground'
authenticationRequired: no
destructive: yes
behavior: 'default'
- identifier: 'DISARMALARM'
title: 'Disarm Alarm'
activationMode: 'foreground'
authenticationRequired: no
behavior: 'default'
alarm_control_panel:
- platform: manual_mqtt
state_topic: "home/alarm"
command_topic: "home/alarm/set"
triggered:
pending_time: 60
armed_home:
pending_time: 0
armed_away:
pending_time: 90