Rules started to failing after update

After latest hubitat upgrade, some of my rules started to fail and I am not able to even open those anymore. Error I get is:

Unexpected Error

An unexpected error has occurred trying to load the app. Check Logs for more information.

Error: Unparseable date: "2021-11-25T13:32:00+0000"

Is date now somehow corrupted in new version because in this rule I am fetcing Hubitat sunrise and sunset times to variables

Is the issue you are having with the use of Date variable? If so, This might apply.

From the release notes:
Notice about Rule Machine

There was a bug reported and fixed concerning triggers using Hub Variables. If you have any such rules, please open the Rule Machine parent app, and just hit Done. This will update those rules. If you don't do this, and had Variable triggers, they will disappear from your rules

Can you tell me just how you came up with this? What set that variable? It is an invalid time string as far as Hub Variables is concerned. So whatever created that time string needs to be fixed. When I set a DateTime variable to Sunset, I get a valid time string for today's sunset, hence my question.

1 Like

Time string is coming from system. I am just using system variables sunset and sunrise to set values for variables, like:


This one have now fixed time set as if I am using system sunset/sunrise then I am getting this error:
Error: Unparseable date: "2021-11-26T13:30:00+0000"
This issue came after recent Hubitat updates as I have not touched rule for ages.
I took export of rule and manually changed values to correct ones to .json and imported (and renamed) it back and changed sunset/sunriset to be fixed times, thats how I managed even open the rule. Original rule gives still the error.

And what it comes to release note about rule machine, I did not noticed that one before. But I am not using variables as triggers.

I don't follow. It looks like you're just setting SunRiseVariable to a fixed time of 9:01 AM. What "system variables" are you referring to?

Setting a variable to sunrise time looks like this:

it was earlier like you wrote. But in oder to be able to run the rule I needed to change system variable to fixed time. And If I set system variable "sunrise time" there instead of fixed time, I will get the error I pasted when trying to open rule again.

That's odd, I'm not getting this. Are you on latest build, and Rule 5.1? Or is this a bug in an older rule?

To be clear, following is not working:


This is actually Rule 4.1 so quite old one.
Hubitat Elevation® Platform Version
2.3.0.112

I do not know if there are any easy ways to migrate old rules to new 5.1.

No there isn't. You'd just have to rewrite the rule. But, in the meantime I will take a look at fixing that in 4.1, and protecting better against an error.

1 Like

other strange thing is that rule 4.1 is showing times in 12 hour format despite I have 24h format in use for Hub.

The sunrise issue will be fixed in the next release.

and also sunset I believe? Many thanks!

Yes, both.

2 Likes
1 Like

Many thanks, now it is working again.

Download the Hubitat app