WeatherCompany binding (for PWS uploaders) language falls back to English


weather company binding works for me all right for a number of versions.

The only issue - I set in the thing configuration language Lithuanian, and after some time I find it returned to English again.

Any ideas?

Not really sure how this can happen. But just thinking out loud…

During discovery, the binding tries to use the openHAB system’s locale settings to set the binding’s language/country. If there’s no language/country that matches the system’s locale settings, the binding defaults to English/US (en-US). But, as you can see here, the binding clearly includes Lithuania.

So, what are the Language and Country/Region settings in your openHAB’s Regional Settings. if not set to Lithuanian/Lithuania, it’s possible that when discovery runs, it could update your existing thing to English/US. I’m really not sure about this, but I think it can happen if your Thing UID matches the Thing UID that the binding adds to the Inbox.

My described change of language happens not during discovery. I have thing and items working and configures. When I change language to Lithuanian, items are refreshed and I see Lithuanian descriptions etc. After some time they are back to english (and thing properties are back to english).

My openhab regional settings / Language is English, but in fact, I want it to leave this way :slight_smile: and I guess it shouldn’t be making any difference

Yes, I understand that. It may not happen during discovery, but it is caused by discovery.

What I’m trying to say is that it does make a difference. When a discovery result is added to the inbox, and a thing exists with the same UID as the discovery result, the configuration of the thing will be updated with the configuration from the discovery result (see here). This is how openHAB discovery works. Personally, I find this behavior annoying, but it is what it is. :wink:

Since the binding tries to make the language match the openHAB regional settings (see here), when the binding’s discovery service runs, it will update the existing thing config using the system’s locale settings (assuming the existing thing UID matches the UID of the thing being discovered).

Humor me and temporarily change the openHAB Regional settings to language=Lithuanian and country=Lithuania to see if the problem goes away. I’ll bet it does.

Alternatively, you could delete and re-add your weather forecast thing using a different UID than the one that’s added by the binding’s discovery service.

My bad, you are absolutely right. I updated openhab system language to Lithuanian and now binding language stays Lithuanian.

Which is really both illogical and annoying :frowning: