Comparison method violates its general contract!

It’s worth noting that Scott’s version of those Rules have been released as part of the Community section of the Helper Libraries for JSR223 Rules. it creates all the Items needed for you and does all the work. All you need to do is copy it to the right folder and it does all the work for you.

Definitely keep an eye on the Helper Libraries. As the NGRE and JSR23 Rules become more the standard, the past approach of copy and pasting Rules from the forum will go away. You will just need to copy a folder to the right place and you are done. I’ve already submitted about 10 PRs to the library with similar library capabilities, most recently MQTT 2.5 eventbus.

I had no idea what that meant. :smiley:

I’ll second Scott’s recommendation to give the library a try. We want to move away from requiring users like you from needing to get this deep into coding stuff like this so you can focus on your home automation rather than messing with data manipulation. For JSR223 you just need to copy a folder and maybe make a change to a configuration file. For NGRE you will find and install a Rule Template the same as you do bindings (I hope).

In my relatively limited experience, loading and using Python on the RPi doesn’t take significantly more than .rules and the Helper library has a nice little feature built in that prevents your files from loading until all the rst of OH is ready for your Rules to start running.

1 Like

Just want to say that I was a Financial Accountant(german: Finanzbuchhalter), so don’t know anything about Programming and such stuff. (but very interested in learning)