Help with modifying a binding

As a hobbyist, I have the hope of someday writing my own binding. I say this without actually having any formal skills. I may never actually get there.

In order to learn, I thought that I might address an issue which occurs for me with the Astro binding which is discussed here:

and here:

The result may be too hacky to contribute back to the community, but I thought I would take this opportunity to learn a little with the hope that someone else may find my efforts useful.

Anyway I have been able to add a new boolean parameter in the the config.xml. My thought is to toggle this to True if I wish to use the amended code. I also inserted new code which sets the season name based on the current month. All good so far.

What I cannot seem to do after many hours of trial and error and reviewing quite a few other bindings is ‘read’ the state of the new parameter and use it to tell the binding whether to use the new code or the existing code. Maybe this is too advanced for my abilities.

Just wondering whether someone has some time to provide a bit of guidance. Happy to answer any relevant questions and provider more information on what I have done,

So, Australia has its own seasons & the US has its own units of liquid measure & English language spellings.
Why can’t we all get along? :wink:


I suppose it keeps things interesting but at this point it is a bloody nuisance…

1 Like

kudos for trying :+1:

The Astro parameters are stored in the AstroThingConfig class by openHAB. Add the parameter to this class as a boolean and in the handler class that reads this class you can use the parameter and change the behavior. If you need more help post a link to your GitHub with your changes and I can give some advice.

1 Like

I agree.
I am originally from Canada (moved from Imperial to metric) but have been living here in the US for many years.