Skip to content

Commit

Permalink
DynamicStateDescriptionProvider improvements (openhab#5957)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Hilbrand authored and Pshatsillo committed Dec 8, 2019
1 parent 15332d6 commit 2853afd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ protected void unsetThingRegistry(ThingRegistry thingRegistry) {
}
ThingRegistry thingRegistry = this.thingRegistry;
if (thingRegistry == null) {
return originalStateDescription;
return null;
}
if (CHANNEL_TYPE_BLUETHOOTH_MAC.equals(channel.getChannelTypeUID())) {
EchoHandler handler = (EchoHandler) findHandler(channel);
Expand Down Expand Up @@ -266,6 +266,6 @@ protected void unsetThingRegistry(ThingRegistry thingRegistry) {
.withOptions(options).build().toStateDescription();
return result;
}
return originalStateDescription;
return null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public void removeDescriptionsForThing(ThingUID thingUID) {
logger.trace("returning new stateDescription for {}", channel.getUID());
return descriptions.get(channel.getUID());
} else {
return originalStateDescription;
return null;
}
}
}

0 comments on commit 2853afd

Please sign in to comment.