Setting Android Alarm Ringtone from Home Assistant

Hi,

I am trying to set an alarm overnight based on if it is a workday or not. I have this working but am struggling to set a ringtone for the alarm, anything I do just ends up with the default tone. Does anyone know how I can use android.intent.extra.alarm.RINGTONE to set the ringtone to a specific file?

Below is what I currently have, this currently just sets the alarm tone to file, I am assuming this is due to the colon in the URI.

data:
  message: command_activity
  data:
    intent_package_name: com.google.android.deskclock
    intent_action: android.intent.action.SET_ALARM
    intent_extras: >-
      android.intent.extra.alarm.RINGTONE:"file:///Internal storage/Ringtones/test.mp3",android.intent.extra.alarm.HOUR:19,android.intent.extra.alarm.MINUTES:06,android.intent.extra.alarm.MESSAGE:Work,android.intent.extra.alarm.VIBRATE:true,android.intent.extra.alarm.SKIP_UI:true

Does anyone know how to fix this?

Follow the companion docs on how to properly format the intent_extras using a supported type from the table in the final example in the broadcast intent section.

https://companion.home-assistant.io/docs/notifications/notification-commands#broadcast-intent

You can also check the logs to see if there are any errors in the command.

Apparently I missed that section of the docs. Just formatting as a urlencode fixed it.

Thanks!

I have been trying to change the ringtone as well. Do you mind posting an example of what you changed it to?