Reduce SAT warnings (#15090)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
This commit is contained in:
@@ -112,49 +112,42 @@ public class GrafikEyeHandler extends BaseThingHandler {
|
||||
} else {
|
||||
logger.error("Received a SCENE command with a non DecimalType: {}", command);
|
||||
}
|
||||
|
||||
} else if (id.equals(PrgConstants.CHANNEL_SCENELOCK)) {
|
||||
if (command instanceof OnOffType) {
|
||||
getProtocolHandler().setSceneLock(config.getControlUnit(), command == OnOffType.ON);
|
||||
} else {
|
||||
logger.error("Received a SCENELOCK command with a non OnOffType: {}", command);
|
||||
}
|
||||
|
||||
} else if (id.equals(PrgConstants.CHANNEL_SCENESEQ)) {
|
||||
if (command instanceof OnOffType) {
|
||||
getProtocolHandler().setSceneSequence(config.getControlUnit(), command == OnOffType.ON);
|
||||
} else {
|
||||
logger.error("Received a SCENESEQ command with a non OnOffType: {}", command);
|
||||
}
|
||||
|
||||
} else if (id.equals(PrgConstants.CHANNEL_ZONELOCK)) {
|
||||
if (command instanceof OnOffType) {
|
||||
getProtocolHandler().setZoneLock(config.getControlUnit(), command == OnOffType.ON);
|
||||
} else {
|
||||
logger.error("Received a ZONELOCK command with a non OnOffType: {}", command);
|
||||
}
|
||||
|
||||
} else if (id.startsWith(PrgConstants.CHANNEL_ZONELOWER)) {
|
||||
final Integer zone = getTrailingNbr(id, PrgConstants.CHANNEL_ZONELOWER);
|
||||
|
||||
if (zone != null) {
|
||||
getProtocolHandler().setZoneLower(config.getControlUnit(), zone);
|
||||
}
|
||||
|
||||
} else if (id.startsWith(PrgConstants.CHANNEL_ZONERAISE)) {
|
||||
final Integer zone = getTrailingNbr(id, PrgConstants.CHANNEL_ZONERAISE);
|
||||
|
||||
if (zone != null) {
|
||||
getProtocolHandler().setZoneRaise(config.getControlUnit(), zone);
|
||||
}
|
||||
|
||||
} else if (id.equals(PrgConstants.CHANNEL_ZONEFADE)) {
|
||||
if (command instanceof DecimalType) {
|
||||
setFade(((DecimalType) command).intValue());
|
||||
} else {
|
||||
logger.error("Received a ZONEFADE command with a non DecimalType: {}", command);
|
||||
}
|
||||
|
||||
} else if (id.startsWith(PrgConstants.CHANNEL_ZONEINTENSITY)) {
|
||||
final Integer zone = getTrailingNbr(id, PrgConstants.CHANNEL_ZONEINTENSITY);
|
||||
|
||||
@@ -172,7 +165,6 @@ public class GrafikEyeHandler extends BaseThingHandler {
|
||||
logger.error("Received a ZONEINTENSITY command with a non DecimalType: {}", command);
|
||||
}
|
||||
}
|
||||
|
||||
} else if (id.startsWith(PrgConstants.CHANNEL_ZONESHADE)) {
|
||||
final Integer zone = getTrailingNbr(id, PrgConstants.CHANNEL_ZONESHADE);
|
||||
|
||||
@@ -190,7 +182,6 @@ public class GrafikEyeHandler extends BaseThingHandler {
|
||||
logger.error("Received a ZONEINTENSITY command with a non DecimalType: {}", command);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
logger.error("Unknown/Unsupported Channel id: {}", id);
|
||||
}
|
||||
@@ -209,7 +200,6 @@ public class GrafikEyeHandler extends BaseThingHandler {
|
||||
|
||||
if (id.equals(PrgConstants.CHANNEL_SCENE)) {
|
||||
getProtocolHandler().refreshScene();
|
||||
|
||||
} else if (id.equals(PrgConstants.CHANNEL_ZONEINTENSITY)) {
|
||||
getProtocolHandler().refreshZoneIntensity(config.getControlUnit());
|
||||
} else if (id.equals(PrgConstants.CHANNEL_ZONEFADE)) {
|
||||
|
||||
@@ -162,10 +162,8 @@ public class PrgBridgeHandler extends BaseBridgeHandler {
|
||||
|
||||
if (id.equals(PrgConstants.CHANNEL_ZONELOWERSTOP)) {
|
||||
protocolHandler.setZoneLowerStop();
|
||||
|
||||
} else if (id.equals(PrgConstants.CHANNEL_ZONERAISESTOP)) {
|
||||
protocolHandler.setZoneRaiseStop();
|
||||
|
||||
} else if (id.equals(PrgConstants.CHANNEL_TIMECLOCK)) {
|
||||
if (command instanceof DateTimeType) {
|
||||
final ZonedDateTime zdt = ((DateTimeType) command).getZonedDateTime();
|
||||
@@ -180,15 +178,12 @@ public class PrgBridgeHandler extends BaseBridgeHandler {
|
||||
} else {
|
||||
logger.error("Received a SCHEDULE channel command with a non DecimalType: {}", command);
|
||||
}
|
||||
|
||||
} else if (id.startsWith(PrgConstants.CHANNEL_SUPERSEQUENCESTART)) {
|
||||
protocolHandler.startSuperSequence();
|
||||
|
||||
} else if (id.startsWith(PrgConstants.CHANNEL_SUPERSEQUENCEPAUSE)) {
|
||||
protocolHandler.pauseSuperSequence();
|
||||
} else if (id.startsWith(PrgConstants.CHANNEL_SUPERSEQUENCERESUME)) {
|
||||
protocolHandler.resumeSuperSequence();
|
||||
|
||||
} else {
|
||||
logger.error("Unknown/Unsupported Channel id: {}", id);
|
||||
}
|
||||
@@ -207,16 +202,12 @@ public class PrgBridgeHandler extends BaseBridgeHandler {
|
||||
|
||||
if (id.equals(PrgConstants.CHANNEL_TIMECLOCK)) {
|
||||
protocolHandler.refreshTime();
|
||||
|
||||
} else if (id.equals(PrgConstants.CHANNEL_SCHEDULE)) {
|
||||
protocolHandler.refreshSchedule();
|
||||
|
||||
} else if (id.equals(PrgConstants.CHANNEL_SUNRISE)) {
|
||||
protocolHandler.refreshSunriseSunset();
|
||||
|
||||
} else if (id.equals(PrgConstants.CHANNEL_SUNSET)) {
|
||||
protocolHandler.refreshSunriseSunset();
|
||||
|
||||
} else if (id.equals(PrgConstants.CHANNEL_SUPERSEQUENCESTATUS)) {
|
||||
protocolHandler.reportSuperSequenceStatus();
|
||||
} else if (id.equals(PrgConstants.CHANNEL_SUPERSEQUENCENEXTSTEP)) {
|
||||
@@ -277,7 +268,6 @@ public class PrgBridgeHandler extends BaseBridgeHandler {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
logger.error("Exception during connection attempt", e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user