Hi. I am rebuilding one of my RM 4.0 rules in RM 5.0 (not exporting but starting from scratch). In building it, I defined two local time variables that I can successfully manipulate in RM 4 but immediately threw an error in RM 5. I didn't even get to finish defining actions. It immediately threw
"Unexpected Error. Error: Cannot execute null+0"
When checking the logs it is the following full error:
[app:2429]2021-08-15 07:31:54.651 pm [error]java.lang.NullPointerException: Cannot execute null+0 on line 5566 (method selectActions)
When creating the last line of the following actions it threw the error and crashed the rule (which is unrecoverable):
Set nowTime to current time
Set nowTime to nowtime plus 10 minutes
Set sunsetTime to sunset time
Set sunsetTime to sunsetTime plus -30 minutes
THIS LINE IS WHAT CRASHES:
IF nowTime < [It crashes here as soon as I select the toggle to compare to variable and the rule is unrecoverable. I tried with different variable names but same result. @bravenel is this possibly another bug or am I completely doing something wrong here?]
RM 5 did have me define default time values for each variable so there should not be any null values.
These previous actions work fine in an RM 4 rule, but immediately caused an issue in RM 5. If anyone has any pointers on what I may be doing wrong here, that would be appreciated. What this rule eventually does is turns off a set of lights that would have turned on during low illuminance during the day.
The reason I am not using lighting control is due to how this rule would interact with other rules that bring up lighting at a certain time combined with mode and presence. The rule does work fine in 4.0 so it is the fallback right now, but I like the use of predicates, especially when I want to override rules, and things seem to run a bit snappier in RM 5. I don't know if this may be related to other time issues that are happening in RM 5, but I could not find a post with the same error.