* Set the state to the passed value. If value is null, set the state to UNDEF
*/
public static State undefOrOnOff(@Nullable Boolean value) {
- return value == null ? UnDefType.UNDEF : OnOffType.from((value));
+ return value == null ? UnDefType.UNDEF : OnOffType.from(value);
}
public static State undefOrString(@Nullable String value) {
(capabilityId) -> client.setVariableActuatorState(capabilityId, state));
// PSS / PSSO / ISS2 / BT-PSS
} else if (DEVICE_PSS.equals(deviceType) || DEVICE_PSSO.equals(deviceType) || DEVICE_ISS2.equals(deviceType)
- || DEVICE_BT_PSS.equals((deviceType))) {
+ || DEVICE_BT_PSS.equals(deviceType)) {
executeCommand(deviceId, CapabilityDTO.TYPE_SWITCHACTUATOR,
(capabilityId) -> client.setSwitchActuatorState(capabilityId, state));
}
private boolean socketConnect() throws UnknownHostException, IOException {
socket = new Socket(ipAddress, port);
- socket.setSoTimeout((NETWORK_TIMEOUT));
+ socket.setSoTimeout(NETWORK_TIMEOUT);
logger.debug("Open new connection... to {} port {}", ipAddress, port);
reader = new BufferedReader(new InputStreamReader(socket.getInputStream(), StandardCharsets.UTF_8));
writer = new OutputStreamWriter(socket.getOutputStream(), StandardCharsets.UTF_8);