Rm 5.1

I was editing a rule and after trying to copy and paste stated receiving this error
and now cannot do any further editing

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

Error: Cannot invoke method getDisplayName() on null object

here is a screenshot of actions...

receive this error when I click to edit

and this is what shows in the logs

java.lang.NullPointerException: Cannot invoke method getDisplayName() on null object on line 4439 (method selectActions)

any help would be appreciated.

Restore a backup from before you began editing.

1 Like

If you Export this rule and send it to me, I should be able to help you. Please see PM I just sent you.

1 Like

On another topic, you don't want to put a minute delay between your IF-THEN and your ELSE-IF statements.

Time between 12:00 AM and 8:30 AM is true between 12:00:00.000 and 8:29:59.999
Time between 8:31 AM and 7:00 PM is true between 8:31:00.000 and 6:59:59.000
Any time between 8:30:00.000 to 8:30:59.999 will satisfy the ELSE statement.

Additionally, I'm not sure how the first nested IF-THEN can even be true. If the time is between 9:00 AM and 9:00 PM then it can't also be between 12:00 AM and 8:30 AM. Maybe that was the point of editing this rule, not sure. If not, you may want to take a look at your logic again and perhaps change or simplify this rule.

1 Like

yeah.. the snapshot is as it is right now, it broke in the middle while I was moving the conditional statements to the appropriate places...

I ended up recreating the rule because the old rule would not even export !
this is what I was trying to get to when the error started showing up.

where is the delay ? There was another thread a while ago that 8:30 (in the end time) is actually 8:30:59 and not 8:30:00 while 8:30 (in start time) is 8:30:00

anyways.. will close this out as I have redone the rule from scratch and removed the old one

If Time IS 8:30 AM then that is true between 8:30:00.000 and 8:30:59.999. That is not the same as Time BETWEEN 12:00 AM and 8:30 AM. Since you're using between bump them right up next to each other, otherwise you have a minute dead spot in your rule.

Time of day: "Time is 8:30 AM" will be True from 8:30:00 until 8:30:59.999
Between two times: "Time between 12:00 AM and 8:30 AM" will be True from 12:00:00.000 until 8:29:59.999


Download the Hubitat app