mirror of
https://github.com/danieldemus/openhab-addons
synced 2026-07-31 13:34:22 +02:00
[tado] fix regression (#18420)
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
This commit is contained in:
+8
-1
@@ -44,6 +44,7 @@ import org.openhab.core.thing.binding.ThingHandlerFactory;
|
||||
import org.osgi.framework.ServiceRegistration;
|
||||
import org.osgi.service.component.annotations.Activate;
|
||||
import org.osgi.service.component.annotations.Component;
|
||||
import org.osgi.service.component.annotations.Deactivate;
|
||||
import org.osgi.service.component.annotations.Reference;
|
||||
import org.osgi.service.http.HttpService;
|
||||
import org.osgi.service.http.NamespaceException;
|
||||
@@ -89,6 +90,13 @@ public class TadoHandlerFactory extends BaseThingHandlerFactory {
|
||||
this.httpServlet = new TadoAuthenticationServlet(this);
|
||||
}
|
||||
|
||||
@Deactivate
|
||||
public void deactivate() {
|
||||
if (oAuthClientService != null) {
|
||||
oAuthFactory.ungetOAuthService(THING_TYPE_HOME.toString());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsThingType(ThingTypeUID thingTypeUID) {
|
||||
return SUPPORTED_THING_TYPES_UIDS.contains(thingTypeUID);
|
||||
@@ -179,7 +187,6 @@ public class TadoHandlerFactory extends BaseThingHandlerFactory {
|
||||
public void unsubscribeOAuthClientService(TadoHomeHandler tadoHomeHandler) {
|
||||
if (oAuthClientServiceSubscribers.remove(tadoHomeHandler) && oAuthClientServiceSubscribers.isEmpty()) {
|
||||
httpService.unregister(TadoAuthenticationServlet.PATH);
|
||||
oAuthFactory.ungetOAuthService(THING_TYPE_HOME.toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user