Can you cancel an active alarm on mobile?

My phone rings in the morning and I want to disable/cancel/mute the alarm via a smart button so I don’t have to get out of bed and leave the room :wink:
Is there a way to do that via the Companion App? I couldn’t find a related command in the docs.
Thanks in advance for any help!

depends on the alarm, there is no specific intent to dismiss an alarm. Sleep as android does offer this capability and you can leverage the companion app to do it.

Thanks! Also read that suggestion in another post. I was hoping for an native solution since I don’t really want to install another app for that automation.

I have been strugling with this for some time, and finally I have got a solution that works.
So, just in case anyone is still trying to get a solution, here it goes:

When you create an alarm, you have to set a Label for it, with an specific intent extra “alarm_label”:

   "message":"command_activity",
   "data":{
       "intent_action": "android.intent.action.SET_ALARM",
       "intent_extras": "android.intent.extra.alarm.HOUR:06,android.intent.extra.alarm.MINUTES:00,android.intent.extra.alarm.SKIP_UI:true,alarm_label:YOUR_LABEL_HERE"    
   } 

Then, when you want to cancel it, you just have to use the DISMISS intent with the intent extra “SEARCH_MODE_LABEL” followed by your alarm label:

   "message":"command_activity",
   "data":{
       "intent_action": "android.intent.action.DISMISS_ALARM",
       "intent_extras": "android.intent.extra.alarm.SEARCH_MODE_LABEL:YOUR_LABEL_HERE"    
   } 

I have tested it and it works, at least in Android 15 on Pixel.