Closed andreacioni closed 7 years ago
Take a look here
Hey Andrea!
Thank you for your input, I've come to the same conclusion. One additional change is, that the ThingStatus has set to ONLINE on init, because otherwise the thing will update although it is OFFLINE. ;-)
It also fixes the problem with autodiscovery, which is reasonable, because they never come ONLINE and register the EventListener till the bridge changes its status.
I'll do some further testing and push the changes.
Problem is solved.
Bindings from now on are not backward compatible due to the changes in the OH2 API.
Hi Tim!
Due to the recent issue on the binding please note that conversation about new API lifecycle https://github.com/eclipse/smarthome/pull/2087.
I think that one try you could do is to put event listener registration inside MySensorsThingHandler.initialize(). This should allow you to avoid the problem. I've tested this on my refactoring (I hope to PR it early 😉 ) but should work also in your version.
Let me know!