diff --git a/modules/samples/firealarm/component/api/src/main/java/org/homeautomation/firealarm/api/DeviceTypeServiceImpl.java b/modules/samples/firealarm/component/api/src/main/java/org/homeautomation/firealarm/api/DeviceTypeServiceImpl.java index effaf602..516ac9c2 100644 --- a/modules/samples/firealarm/component/api/src/main/java/org/homeautomation/firealarm/api/DeviceTypeServiceImpl.java +++ b/modules/samples/firealarm/component/api/src/main/java/org/homeautomation/firealarm/api/DeviceTypeServiceImpl.java @@ -129,7 +129,7 @@ public class DeviceTypeServiceImpl implements DeviceTypeService { } String sensorState = state.toUpperCase(); if (!DeviceTypeConstants.STATE_ON.equals(sensorState) - && !sensorState.equals(DeviceTypeConstants.STATE_OFF)) { + && !DeviceTypeConstants.STATE_OFF.equals(sensorState)) { log.error("The requested state change should be either - 'ON' or 'OFF'"); return Response.status(Response.Status.BAD_REQUEST).build(); }