This is a companion discussion topic for the original entry at https://docs.sleep.urbandroid.org//services/automation.html
Automation - Sleep as Android
This is a companion discussion topic for the original entry at https://docs.sleep.urbandroid.org//services/automation.html
The docs state that events sometimes pass values onto services. For example “alarm_alert_dismiss” passes two variables, a timestamp and the label of the alarm. However I cannot get Tasker to see these variables. Is Sleep as Android correctly sending variables to Tasker, or am I incorrectly setting this up? I tried to use them with the “evtprm” variable as discussed in the Tasker documentation.
For what it’s worth, it appears if you snooze, then tap on the notification to stop the alarm you will only receive the event name in the json data. When I dismiss it without snoozing I see the expected values:
{"value1":"1618972080000","value2":"Test","event":"alarm_alert_dismiss"}
I need an event that gets triggered before an alarm starts to ring by a fixed time. The smart_period event works for this purpose, but only if sleep tracking is enabled. Is there a possibility for such an event? Maybe smart_period event can still be triggered even thought sleep tracking is not enabled?
Hello @casablanca, I’m adding the intent com.urbandroid.sleep.alarmclock.SHOW_SKIP_NEXT_ALARM_ACTION_AUTO… this will be send exactly 1 hour before the next alarm is triggering…
This will be available to enable in Settings > Automation > Events…
Hope that helps…
Forgot to mention that this will appear in the next BETA version of the app which I will be releasing probably today or tomorrow…
before_alarm
is sent via webhook 1 hour before the alarm but is not listed here. Probably related, show_skip_next_alarm
is not sent at all. It seems like it got renamed or something.
smart_period doesn’t seem to work for me in Webhooks (ifttt) as trigger either.
Hello again @petr-urbandroid,
Was wondering, what’s the difference between before_alarm and show_skip_next_alarm ?
Thanks