[Solved] Indicator Block Time Condition


New to the platform, and I’m having a bit of an issue trying to evaluate a condition based on time for the indicator block. I’m wondering if the following are even possible with this block. Any clues to get me in the right direction would help:

  1. Can I evaluate the {time-1} variable based on whether or not it’s past a certain time, e.g. 5p? I know it returns the date/time in milliseconds, so seems like some conversion is necessary.

  2. If not, I tried to create a new workflow with the gauge query to store the result of one of the devices attributes in the hopes this might get me closer. I get payload data of “myObject”: “value”: true “time” : Thu May 31, 2018 09:37:10 GMT-04:00. I can’t, however, seem to pull that info into the condition expression or label for evaluation.

Thanks in advance!


You can accomplish this by adding conditions in the following format:

{{formatDate time-0 'HH'}} > 17

The above expression will format the time as only the hour-of-day between 0-23. We can then compare that against 17 (5p in 24 hour time).

Here’s our documentation for other available helpers. Hope that helps!


Well, that was easy! This makes complete sense now. Appreciate the speedy response.