mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +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
|
||||
public void handleRemoval() {
|
||||
EcowattRestApi localApi = api;
|
||||
if (localApi != null) {
|
||||
localApi.deleteServiceAndAccessToken();
|
||||
}
|
||||
oAuthFactory.deleteServiceAndAccessToken(thing.getUID().getAsString());
|
||||
super.handleRemoval();
|
||||
}
|
||||
|
||||
|
@ -140,8 +140,4 @@ public class EcowattRestApi {
|
||||
public void dispose() {
|
||||
oAuthFactory.ungetOAuthService(authServiceHandle);
|
||||
}
|
||||
|
||||
public void deleteServiceAndAccessToken() {
|
||||
oAuthFactory.deleteServiceAndAccessToken(authServiceHandle);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user