Rules / Variables based on Date or Calendar

Thanks for sharing the details and the example!

:stop_sign: Update: Math / Date Expressions are now available as a native feature. You can use the syntax noted below directly in an expression without having to use the Lab environment.

:link: Feature Announcement: Math / Date Expressions

Not formally, but I believe you could accomplish this with the /math endpoint on our Lab server that I mentioned in another thread by using the pickRandom() function:

The formula would be:

pickRandom(["Green","Red","Gold","Blue","whiteTemperature"])

You can test it by refreshing the following link:
https://lab.sharptools.dev/math?formula=pickRandom(["Green","Red","Gold","Blue","whiteTemperature"])

From what I can see, that seems to be the biggest missing piece. Basically a True/False indicating if you are between a start and and end date.

Sunset/Sunrise offsets are supported in triggers.

I believe you already cast a vote on the following feature request, but posting it here in case other people see it and want to cast a vote. :slight_smile:

:link: Select multiple devices in rule triggers and actions

2 Likes