Hello.
I've been using a time range condition for executing certain flows. Is it possible to use variables for the start time and end time values instead of fixed ones. I am unable to come up with a workaround.
Any help in this regard is greatly appreciated.
Best regards
Krishna
Time range: Variables
Moderator: Martin
Re: Time range: Variables
Please, explain the use case in more detail. There just might be a workaround but it needs more information.
-
- Posts: 12
- Joined: 14 Dec 2015 10:48
Re: Time range: Variables
I'm back at this. I have a flow where certain things like screen timeout and WiFi state are set based on 'user present' trigger between a certain time range. Currently time range accepts time values. I would like to instead use variables for the from time and to time values.
Re: Time range: Variables
Hello Krishna!
If I have understood you correctly, then you are looking for a way to query a time range with variables in a condition.
Perhaps the following will help you. (Unfortunately, I know no better way.)
(The flow is attached. - The actions are only examples.)
The condition (expression) compares the variable "triggertime" with the variables "mystarttime" and "myendtime"
mystarttime and myenddtime are decimal numbers, the minutes do not have to be converted.
For example: 8:45 = 8.45 (not 8.75) or 11:30 = 11.3 (not 11.5)
Best regards
Peter
If I have understood you correctly, then you are looking for a way to query a time range with variables in a condition.
Perhaps the following will help you. (Unfortunately, I know no better way.)
(The flow is attached. - The actions are only examples.)
The condition (expression) compares the variable "triggertime" with the variables "mystarttime" and "myendtime"
mystarttime and myenddtime are decimal numbers, the minutes do not have to be converted.
For example: 8:45 = 8.45 (not 8.75) or 11:30 = 11.3 (not 11.5)
Best regards
Peter
- Attachments
-
- flow_condition_expression_timerange_20170312_132151.xml
- (4.82 KiB) Downloaded 834 times
-
- Posts: 12
- Joined: 14 Dec 2015 10:48
Re: Time range: Variables
Hi Peter!
Firstly, thank you. I was already thinking of a flow like this. Feeding the start time and end time as global variables (as I use this time range condition is multiple flows) and using an expression to check.
I was just wondering if there was an elegant way of doing it that I wasn't aware of.
I would like this as a feature. It would be nice to have variables for time range values.
Best regards,
Krishna
Firstly, thank you. I was already thinking of a flow like this. Feeding the start time and end time as global variables (as I use this time range condition is multiple flows) and using an expression to check.
I was just wondering if there was an elegant way of doing it that I wasn't aware of.
I would like this as a feature. It would be nice to have variables for time range values.
Best regards,
Krishna