[somfytahoma] fixed detection of roller shutters (#8557)

* [somfytahoma] fixed detection of roller shutters
* [somfytahoma] got rid of compile warning

Signed-off-by: Ondrej Pecta <opecta@gmail.com>
This commit is contained in:
Ondrej Pecta 2020-09-23 19:43:22 +02:00 committed by GitHub
parent f156a80d2f
commit cafa8fdcff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -343,11 +343,11 @@ public class SomfyTahomaItemDiscoveryService extends AbstractDiscoveryService
}
private boolean isSilentRollerShutter(SomfyTahomaDevice device) {
return hasCommmand(device, COMMAND_SET_CLOSURESPEED);
return "PositionableRollerShutterWithLowSpeedManagement".equals(device.getWidget());
}
private boolean isUnoRollerShutter(SomfyTahomaDevice device) {
return hasState(device, TARGET_CLOSURE_STATE);
return "PositionableRollerShutterUno".equals(device.getWidget());
}
private boolean isOnOffHeatingSystem(SomfyTahomaDevice device) {

View File

@ -96,7 +96,8 @@ public abstract class SomfyTahomaBaseThingHandler extends BaseThingHandler {
}
protected @Nullable SomfyTahomaBridgeHandler getBridgeHandler() {
return this.getBridge() != null ? (SomfyTahomaBridgeHandler) this.getBridge().getHandler() : null;
Bridge localBridge = this.getBridge();
return localBridge != null ? (SomfyTahomaBridgeHandler) localBridge.getHandler() : null;
}
private String getURL() {