I am trying to create an automation that sends the user a message if the alarm is being set and there is an open door. I want the message to be sent while the alarm card shows “arming”. I am using the The manual alarm control panel platform and using alarm_control_panel.home_alarm
as the enitity in the trigger section.
Below is what I have in my configuration.yaml file regarding the alarm
- platform: manual
name: Home_Alarm
code: !secret alarm_code
arming_time: 15
delay_time: 15
Below is the code for the automation I am trying to use to warn me that a door is open (I removed the “condition” just to make sure that the condition was not preventing the automation from running). I receive the message if I execute the automation, so I know the code to notify me works.
- platform: state
to: arming
entity_id: alarm_control_panel.home_alarm
condition: []
action:
- service: notify.mobile_app_pixel_3a_xl
data:
message: A door is open
mode: single
This is an automation where I use the “pending” state to trigger a sound to remind the user that they need to disarm the alarm or it will go off (this automation works fine):
- platform: state
entity_id: alarm_control_panel.home_alarm
to: pending
from: armed_away
condition: []
action:
- service: switch.turn_on
data: {}
entity_id: switch.sonoff_alarm
Any help on this would be appreciated.
Thanks.