Using automation to dismiss alarm on android via companion app

I’m trying to have an automation dismiss an alarm on android when I’m sleeping at specific places. “HomeAlarm” should be dismissed when I’m located at “away1” or “away2”, but even if i trigger the automation manually, my lock screen shows the changed next alarm time, but “HomeAlarm” still goes off in the morning. The notify at the bottom is just a sanity check i added to make sure the automation was triggering and having the action fail rather than failing to trigger. Having trouble nailing down whether this is an issue on my phone, the app, or my automation.

alias: New automation

description: ""
triggers:
  - trigger: time
    at: "05:00:00"
conditions:
  - condition: or
    conditions:
      - condition: zone
        entity_id: device_tracker.protopet_phone
        zone: zone.away1
      - condition: zone
        entity_id: device_tracker.protopet_phone
        zone: zone.away2
  - condition: state
    entity_id: binary_sensor.workday_sensor
    state: "on"
actions:
  - action: notify.mobile_app_protopet_pixel
    data:
      message: command_activity
      data:
        channel: AlarmState
        importance: high
        ttl: 0
        priority: high
        intent_package_name: com.google.android.deskclock
        intent_extras: >-
          android.intent.extra.alarm.SEARCH_MODE:android.label,android.intent.extra.alarm.MESSAGE:HomeAlarm,android.intent.extra.alarm.SKIP_UI:true
        intent_action: android.intent.action.DISMISS_ALARM
  - device_id: [redacted]
    domain: mobile_app
    type: notify
    message: attempting to dismiss early alarm
mode: single

I’m wondering whether you found a solution? I’m currently trying to do something similar (I want to have my phone outside my bedroom and push a zigbee button to dismiss my alarm).

My guess is your solution won’t work because the companion app doesn’t have (and asks for) the required permissions to modify the alarm (?!), at least that’s what a chat with Claude makes me believe.

Claude suggests to use ‘Tasker’ app to set this up and Tasker supposedly asks for more permissions.

Edit: It seems like what you tried above should be possible. Note to self: Claude isn’t always right (duh): Ability to dimiss or snooze an active alarm · Issue #5256 · home-assistant/android · GitHub . I’ll try my luck with this approach as well.