-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kodi: bug in the dynamic state description provider #3619
Comments
@cweitkamp fyi |
Note that such provider implemented by a binding could directly impact the channels of other bindings. Note that it is a MAJOR bug but only for users using this binding. |
IMHO we should also look into fixing or very explicitly documenting this behavior because null seems to mean something very specific in this case. Normally i see such patterns combined with something like an isSupported method. |
Fixes #3619 Signed-off-by: Laurent Garnier <[email protected]>
I expect the squeezebox binding also may have the same issue. |
I searched for DynamicStateDescriptionProvider and only found it in the Kodi binding. But maybe the squeezebox binding was not loaded in my IDE. |
squeezebox binding is ok but I found the same issue in the Hyperion binding. The loxone binding is certainly to be investigated because very strange. Amazonecho is unusual too. |
Amazonecho is ok as the channel type is checked. It returns original rather than null but it is ok too. |
loxone binding is finally ok. |
Thanks for taking care of this. I can confirm that it works now. I removed those lines in #3505 because my IDE complains about an unnecessary
Suggestion - Let us change private final Map<ChannelUID, @Nullable List<StateOption>> channelOptionsMap = new ConcurrentHashMap<>(); |
Can you please apply the change in all concerned bindings ? |
I based the Hyperion implementation of the dynamic state description service on the Kodi binding as an example so it's likely affected too. |
@tavalin : yes, it is already fixed. |
Fixes openhab#3619 Signed-off-by: Laurent Garnier <[email protected]>
Fixes openhab#3619 Signed-off-by: Laurent Garnier <[email protected]>
Fixes openhab#3619 Signed-off-by: Laurent Garnier <[email protected]>
Signed-off-by: Hilbrand Bouwkamp <[email protected]>
Don't return originalStateDescription as the service code depends on it being null if the specific provider called isn't handling the channel. See openhab#3619 Signed-off-by: Hilbrand Bouwkamp <[email protected]>
Don't return originalStateDescription as the service code depends on it being null if the specific provider called isn't handling the channel. See #3619 Signed-off-by: Hilbrand Bouwkamp <[email protected]>
Don't return originalStateDescription as the service code depends on it being null if the specific provider called isn't handling the channel. See openhab#3619 Signed-off-by: Hilbrand Bouwkamp <[email protected]> Signed-off-by: Pascal Larin <[email protected]>
Don't return originalStateDescription as the service code depends on it being null if the specific provider called isn't handling the channel. See openhab#3619 Signed-off-by: Hilbrand Bouwkamp <[email protected]> Signed-off-by: Maximilian Hess <[email protected]>
Don't return originalStateDescription as the service code depends on it being null if the specific provider called isn't handling the channel. See openhab#3619 Signed-off-by: Hilbrand Bouwkamp <[email protected]>
Don't return originalStateDescription as the service code depends on it being null if the specific provider called isn't handling the channel. See openhab#3619 Signed-off-by: Hilbrand Bouwkamp <[email protected]> Signed-off-by: Tim Roberts <[email protected]>
Don't return originalStateDescription as the service code depends on it being null if the specific provider called isn't handling the channel. See openhab#3619 Signed-off-by: Hilbrand Bouwkamp <[email protected]>
The implementation of the Kodi dynamic state desciption provider has a major issue.
https://github.com/openhab/openhab2-addons/blob/master/addons/binding/org.openhab.binding.kodi/src/main/java/org/openhab/binding/kodi/internal/KodiDynamicStateDescriptionProvider.java#L43
When the service is called for a channel of another binding, it returns the original state description but resetting the options.
It should return null in case the channel is not handled by the Kodi binding.
This has been discovered when trying to implement this feature: eclipse-archived/smarthome#4942
I will provide a fix.
The text was updated successfully, but these errors were encountered: