Hi Martin,
there is a method to incorporate the time and date of the future alarm clock in a variable?
thanks.
Alarm clock and variable
Moderator: Martin
Re: Alarm clock and variable
Hi,
I'm not sure if I understand your question properly. Do you want to set an alarm in the alarm app for an arbitrary date in the future?
You can use variables to set the hour and the minute when you have a regular date/time in a variable. The variable could be initialized in an action Script, for example alarmtime=getDate().
You can set the field Hour (0-23) to {alarmtime,dateformat,HH} and the field Minutes (0-59) to {alarmtime,dateformat,mm}.
This will set the alarm for the next occurrence of the alarm time but not an arbitrary amount of days in the future. For this you could build a flow with a trigger Global Variable Date/Time that set's the alarm on the date of the alarm.
As a more general solution, you could add alarmtime to a global list, for example called global_scheduled_alarms. A flow that is executed each day at midnight checks if the global list contains an alarm for this day and executes the proper action Set Alarm. It requires a bit of scripting to achieve this but this method would also allow to schedule multiple future alarms.
Please note that the alarm clock apps are sometimes limited to a maximum number of 10 alarms and don't provide a mechanism to delete alarms, so you will have to manually remove passed alarms from time to time.
Regards,
Martin
I'm not sure if I understand your question properly. Do you want to set an alarm in the alarm app for an arbitrary date in the future?
You can use variables to set the hour and the minute when you have a regular date/time in a variable. The variable could be initialized in an action Script, for example alarmtime=getDate().
You can set the field Hour (0-23) to {alarmtime,dateformat,HH} and the field Minutes (0-59) to {alarmtime,dateformat,mm}.
This will set the alarm for the next occurrence of the alarm time but not an arbitrary amount of days in the future. For this you could build a flow with a trigger Global Variable Date/Time that set's the alarm on the date of the alarm.
As a more general solution, you could add alarmtime to a global list, for example called global_scheduled_alarms. A flow that is executed each day at midnight checks if the global list contains an alarm for this day and executes the proper action Set Alarm. It requires a bit of scripting to achieve this but this method would also allow to schedule multiple future alarms.
Please note that the alarm clock apps are sometimes limited to a maximum number of 10 alarms and don't provide a mechanism to delete alarms, so you will have to manually remove passed alarms from time to time.
Regards,
Martin