This is a companion discussion topic for the original entry at https://docs.sleep.urbandroid.org//services/automation.html
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
Hi, it looks like sleep_tracking_started isn’t sent for automated sleep tracking. Is it the expected behaviour?
Hi Alisa, could you check, if this intent is enabled in Settings > Services > Automation > Events?
If it is, please send us the Logs (Left ≡ menu → (?) Support → Report a bug). Thanks!
It would be very helpful if time_to_bed_alarm_alert passed the value for the time that the app considers to be your ideal bedtime, e.g. if the app thinks I should sleep at 23:17 it should pass 23:17. Currently it passes the time for the actual alarm (i.e. 9:00) which is not as helpful. This would be nice so that I can, for example, have my lights automatically dim and then then turn off at my ideal bedtime.
One more thing, it would also be great if smart_period also passed the value for the real alarm time.
Can you help me here? I get the alarm fired into tasker, but i cannot find the way to see the passed label value? Can u please tell me how to?