Auto evaluation of time based global expressions
-
Am I missing something (which is what I'd expect) but is there no way to autoupdate time based expressions such as
strftime("%H", time())
?I guess there's an issue about how often you'd want to update and I can work out another way to do what I want to achieve (which is effectively make available a variable that I can pass to 'stuff' as morning / afternoon or evening.
So just thought I'd check there's no 'interval' kind of thing I can attach?
Cheers
C
-
That's exactly what the Interval condition in a rule is meant for.
-
Almost... time expressions are still an exception. There's tension between various behaviors and optimizations, and compromises must be made. In your case, you'll want an expression-less global variable to store the time, and use the Set reaction in the rule (that uses an Interval condition) to set the global variable's value (Set Variable to
%{{ time() }}
. -
Almost... time expressions are still an exception. There's tension between various behaviors and optimizations, and compromises must be made. In your case, you'll want an expression-less global variable to store the time, and use the Set reaction in the rule (that uses an Interval condition) to set the global variable's value (Set Variable to
%{{ time() }}
.@toggledbits Thanks. I was about to post back that I was still wrong. I shall examine this avenue
C