Time range: Variables

Post your questions and help other users.

Moderator: Martin

Post Reply
krishnivas
Posts: 12
Joined: 14 Dec 2015 10:48

Time range: Variables

Post by krishnivas » 18 Nov 2016 08:21

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

User avatar
MURTUMA
Posts: 697
Joined: 05 Mar 2013 22:43

Re: Time range: Variables

Post by MURTUMA » 18 Nov 2016 08:49

Please, explain the use case in more detail. There just might be a workaround but it needs more information.

krishnivas
Posts: 12
Joined: 14 Dec 2015 10:48

Re: Time range: Variables

Post by krishnivas » 11 Mar 2017 00:22

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.

User avatar
Bingwu
Posts: 114
Joined: 26 Feb 2016 10:26

Re: Time range: Variables

Post by Bingwu » 12 Mar 2017 13:27

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.)

flow_condition_expression_timerange_20170312_132151.png
flow_condition_expression_timerange_20170312_132151.png (55.72 KiB) Viewed 12852 times
(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

krishnivas
Posts: 12
Joined: 14 Dec 2015 10:48

Re: Time range: Variables

Post by krishnivas » 07 Apr 2017 08:06

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

Post Reply