Unable to invoke working chiming sound during 45 second period after entering home before siren goes off

Full Description of Issue:
(I am a newbie and don’t have much experience with HA)

My environment is as follows:
Hardware
• Konnected Alarm Panel Pro
• Amazon Fire 7 Tablet 9th Gen
• Raspberry PI 4B
HA OS
• Core: 2024.8.1
• Supervisor: 2024.08.0
• Operating: System12.4
• Frontend: 20240809.0
Tablet Software
• Fully Kiosk 1.56.1 (For Android/Fire, Installed on Table)
HACS Integrations and Plugins
• Fully Kiosk Browser
• Alarmo (Integration) v.1.10.4
• Alarmo Card (plugin) v1.5.2
• Kiosk Mode (plugin) v6.1.0
I have so far been successful in creating two of three automations that I require.
My first successful automation is called “Arming Pending”. Essentially, it beeps the tablet for about 45 seconds, after the alarm system is armed. This essentially gives the person a warning that the alarm system is going to be armed soon, and so they need to leave the premise.
Here is my working yaml file for this requirement:

alias: Arming Pending
description: ""
trigger:
  - platform: device
    device_id: XXXXX
    domain: alarm_control_panel
    entity_id: XXXXX
    type: arming
condition: []
action:
  - action: media_player.play_media
    target:
      entity_id: media_player.fire_tablet
    data:
      media_content_id: media-source://media_source/local/pending3.mp3
      media_content_type: audio/mp3
    metadata:
      title: pending3.mp3
      thumbnail: null
      media_class: music
      children_media_class: null
      navigateIds:
        - {}
        - media_content_type: app
          media_content_id: media-source://media_source
mode: single

My next working automation is designed to send a notification sound to my tablet indicating that the alarm has been successfully disarmed. This automation is also working perfectly.

alias: When Alarmo changed to Disarmed
description: ""
trigger:
  - platform: device
    device_id: XXXX
    domain: alarm_control_panel
    entity_id: XXXX
    type: disarmed
condition: []
action:
  - action: media_player.play_media
    target:
      entity_id: media_player.fire_tablet
    data:
      media_content_id: media-source://media_source/local/disarmed.mp3
      media_content_type: audio/mpeg
    metadata:
      title: disarmed.mp3
      thumbnail: null
      media_class: music
      children_media_class: null
      navigateIds:
        - {}
        - media_content_type: app
          media_content_id: media-source://media_source
mode: single

Unfortunately, my third automation is not working. It is designed to send a beeping sound to the tablet when someone enters the home, if the alarm is armed and will be going off in 45 seconds.
Currently no sound is being heard from my table when I enter the premises, although the siren does go off as expected.

This is my current “Alarm Pending” yaml file for this automation. (It Is Not Working)

id: 'XXXX'
alias: Alarm Pending
description: ''
trigger:
  - platform: device
    device_id: XXXX
    domain: alarm_control_panel
    entity_id: XXXX
    type: triggered
condition: []
action:
  - action: media_player.play_media
    target:
      entity_id: media_player.fire_tablet
    data:
      media_content_id: media-source://media_source/local/waiting_for_disarming.mp3
      media_content_type: audio/mp3
    metadata:
      title: waiting_for_disarming.mp3
      thumbnail: null
      media_class: music
      children_media_class: null
      navigateIds:
        - {}
        - media_content_type: app
          media_content_id: media-source://media_source
mode: single

I have made reference to this information to get me to where I am now.

Many thanks
susserj

One other piece of information is as follows: If I run the automation manually, then the sound does get sent to the tablet. But as I said before, If I set the alarm on, leave the home and come back in, the beeping sound on the tablet does not go off before the siren starts.
Thanks
susserj

I do something very similar with the built in alarm integration. Once my alarm is fully armed (as f we were away AND it becomes tripped) the status changes from ARMED AWAY to ARMING then to TRIGGERED. The phase you are interested in is the ARMING state. Now, the term may be different in Alarmo, since I don’t use that, but the flow should be similar. In order to get a full understanding of what the state is in during these transition times, it would be easy enough to create an automation that creates a persistent notification with the timestamp and current state of the alam. Set this temporary automation to trigger on ALL state changes of the alarm. Once you know the state of the alarm AFTER it is set and BEFORE it sounds the siren, you should be able to write an automation the does exactly what you want.
I think that the TRIGGERED state of your non working automation is already too late, and that’s why it fails.

Hope this was helpful.
Art aka kartcon

I believe I have figured out a solution.
Here is my yaml file.

alias: Alarm Pending
description: ""
trigger:
  - platform: state
    entity_id:
      - alarm_control_panel.alarmo
    to: pending
condition: []
action:
  - action: media_player.play_media
    target:
      entity_id: media_player.fire_tablet
    data:
      media_content_id: media-source://media_source/local/pending3.mp3
      media_content_type: audio/mpeg
    metadata:
      title: pending3.mp3
      thumbnail: null
      media_class: music
      children_media_class: null
      navigateIds:
        - {}
        - media_content_type: app
          media_content_id: media-source://media_source
mode: single

The confusing thing for me was the vocabulary and the phrases “from” and “to” in the automation creation interface. First they are both optional and then the meaning of the two were non-obvious to me for their intented purposes. At one point, I had tried to adjust the “from” sending to “pending” but that didn’t work so I gave up. Then I accidently stumbled on this url Manual Alarm control panel - Home Assistant (home-assistant.io) and I decided to try using the “to” option with “pending”, and it seems to now work as required. And the tablet is now beeping before I put the code in to disarm it.

I hope this information is helpful to others who have similar difficulties.
Cheers
susserj