Change in alarm state to "arming" will not trigger an automation

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.

I have never seen the state arming.
I didn’t know that existed.
Do you see that state when you arm the alarm?

Isn’t is also in pending state until it has been armed? Check the entity under Developer Tools -> States while you arm the alarm.

Mine goes from disarmed to pending then to armed.

The stages are disarmed - arming - armed_away or armed_home. Once triggered, if the state was arm_away then the stages are pending - triggered. Once I understood that you could have a trigger using the platform: state without a “from” or “to” then I figured it out:

description: ''
trigger:
  - platform: state
    entity_id: alarm_control_panel.home_alarm
condition:
  - condition: state
    entity_id: alarm_control_panel.home_alarm
    state: arming
  - condition: state
    entity_id: binary_sensor.backdoor_is_open
    state: 'on'
action:
  - service: notify.mobile_app_pixel_3a_xl
    data:
      message: A door is open
mode: single

Yes. When I enter the code and press either Arm Away or Arm Home, the alarm entity shows “arming”.

When I enter the code and press either Arm Away or Arm Home, the alarm entity shows “arming” then “armed”.