In a test rule, I set a local datetime var to $nextSunrise (I was trying to see if this was just doable, having only learned about system variables today)
I get the error posted below, and can no longer edit the Rule. Below is the reconstructed rule.
This is not the first time I've gotten fatal errors when using time strings -- that aspect of RM seems to be very touchy and obviously user-unfriendly (a warning with the ability to edit the rule would be nicer).
Unexpected Error
An unexpected error has occurred trying to load the app. Check Logs for more information.
Error: Unparseable date: "$nextSunrise"
Here's the reconstructed rule:

Not sure what you are referring to, but $nextSunrise is not a valid value in Rule Machine.
2 Likes
I saw this in Google's AI response, which is either just wrong OR may be just referring (implicitly) to Webcore:

LOL. I guess Google's AI doesn't know ā ā ā ā from shinola
Seems to be confusing as to context. Certainly not in RM, not in Groovy. In a new Dashboard? I don't know...
4 Likes
Seems to be a Webcore thing -- here's a test that I just wrote (for manual execution):
execute
with
{$location}
do
Set variable {@@hvSunriseTomorrow} = {$nextSunrise};
Set variable {@@hvSunriseToday} = {$sunrise};
end with;
end execute;
Result (for Vancouver, WA):

With every sunrise and sunset there are two 'location' events generated by the hub: 'sunrise' and 'sunriseTime', and 'sunset' and 'sunsetTime'. 'sunriseTime' carries the sunrise time for the next day, and 'sunsetTime' carries the next day's sunset time. These events can be subscribed to as triggers in RM, so it is possible to get and use the next day's sunrise or sunset that way.
So just triggers? No way to set a local or hub var to "sunriseTime"?
Not directly. Here's the list now:
If you trigger from sunriseTime (which will happen at sunrise), %value% contains a Time String, and you can set that into a DateTime variable, like this:
My variable 'sunset tomorrow' is now set correctly, for tomorrow's sunset time.
3 Likes