Error when assigning value to a Boolean variable

Sorry if I'm missing something obvious here, but I searched all over and can't find a solution.

I have a small app in rule machine that is throwing an error when setting the value of a global Boolean variable. Seems straightforward, but I can't figure it out.

Here's the code:

Here's the error log:
app:1802022-12-30 05:56:29.287 PMerrorjava.lang.NullPointerException: Cannot invoke method toLong() on null object on line 5207 (method appButtonHandler)

app:1802022-12-30 05:56:29.254 PMinfoAction: Thermostat Scheduler for MBR Stat: Activate Scheduled Setpoints

app:1802022-12-30 05:56:29.168 PMinfoAction: Notify Pixel 7: 'MBR Slider Closed at %time%(MBR Slider Closed at 05:56)'

app:1802022-12-30 05:56:21.991 PMinfoInitialized

Here's the variable declaration:

The first two lines appear to be executing. The error code is then thrown and according to the logs, the third line with the variable assignment isn't executing. I must be missing something basic. I use Booleans in several apps. This is the only one giving me trouble.

TIA!

I can’t see why it would not work. Have you tried re-creating the rule to see if the problem would occur again? What platform version are you on?

The error is from the Set Thermostat Schedule action. Looking into it...

Try deleting that one action and recreating it. Do need to know what platform version you are running from Settings / Hub Details.

1 Like

Thanks for the fast response, everyone. Platform version is: 2.3.4.123. I don't think I was having this problem before I upgraded to it. I will recreate the rules ASAP and give that a try.

OK, FWIW, I deleted the action and recreated it. That did it. I should have tried that earlier, except it seemed like the next action was the problem. It's working now. Sounds like there might be a bug here, but I'll leave that to the better informed on this thread. Happy to provide more information if that will help.

Thanks!

My bad. All you had to do was edit the action, and hit Done Editing Action. There was a subtle change that was not backwards compatible, and your rule stepped on it. I never figured out exactly how to communicate this need in the release notes, and actually forgot about it,. The actions for setting Thermostat Scheduler had a lot of surgery performed to improve them.

Thanks. Happy to have it all going again. Hubitat is so great. The product, support and community are just outstanding.

Thanks!

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.