Is there any way for a triggered alarm to pass a label or identifier to Tasker?
For example:
With AMdroid, each individual alarm has the ability to pass strings such as Alarm Note and/or Profile Name.
It can also pass boolean values to help identify whether it is a pre-alarm or post-alarm.
Similarly, Turbo Alarm can filter the alarm by its label. Not as flexible as AMdroid, but better than nothing.
This is hugely important for me as it ensures that each alarm event triggers the appropriate sequence within Tasker.
I imagine it must be possible with Sleep as Android, but I can’t seem to figure out a way.
I’m disappointed that your question has not gotten any answer in 27 days.
I’ve also been looking into this. As far as I can tell, the Tasker plugin that Sleep as Android exposes does not provide any information regarding which alarm an event pertains too.
I’ve also looked into intents. I created a test alarm and dumped the intents with dumpsys activity broadcasts but I do not see anywhere a simple indication of which alarm is associated with the events that Sleep as Android produces.
The com.urbandroid.sleep.alarmclock.ALARM_ALERT intent has an extra called intent.extra.alarm_raw which does contain the label of the alarm that went off. However, this extra is an Android Parcel in raw binary form. It would need decoding, which is probably not an easy thing to do in Tasker.