mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-25 14:55:55 +01:00
[ecowatt] Change in handleRemoval (#14978)
Follow-up #14934 Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This commit is contained in:
parent
b4551c365a
commit
29edae9f21
@ -118,10 +118,7 @@ public class EcowattHandler extends BaseThingHandler {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handleRemoval() {
|
public void handleRemoval() {
|
||||||
EcowattRestApi localApi = api;
|
oAuthFactory.deleteServiceAndAccessToken(thing.getUID().getAsString());
|
||||||
if (localApi != null) {
|
|
||||||
localApi.deleteServiceAndAccessToken();
|
|
||||||
}
|
|
||||||
super.handleRemoval();
|
super.handleRemoval();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -140,8 +140,4 @@ public class EcowattRestApi {
|
|||||||
public void dispose() {
|
public void dispose() {
|
||||||
oAuthFactory.ungetOAuthService(authServiceHandle);
|
oAuthFactory.ungetOAuthService(authServiceHandle);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteServiceAndAccessToken() {
|
|
||||||
oAuthFactory.deleteServiceAndAccessToken(authServiceHandle);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user