Class MotionSensorImpl
java.lang.Object
io.github.zeroone3010.yahueapi.v2.MotionSensorImpl
- All Implemented Interfaces:
Device,MotionSensor
public class MotionSensorImpl extends Object implements MotionSensor
-
Constructor Summary
Constructors Constructor Description MotionSensorImpl(UUID id, String name, Supplier<Motion> stateProvider) -
Method Summary
Modifier and Type Method Description UUIDgetId()Returns the technical id of the device, as assigned by the Bridge.ZonedDateTimegetLastChanged()The last time there was any change to the motion status.StringgetName()Returns the name of the device, as set by the user.booleanisMotion()Whether motion has been detected.StringtoString()
-
Constructor Details
-
Method Details
-
getId
Description copied from interface:DeviceReturns the technical id of the device, as assigned by the Bridge. The id stays the same even if the device name is changed by the user.
-
getName
Description copied from interface:DeviceReturns the name of the device, as set by the user. -
isMotion
public boolean isMotion()Description copied from interface:MotionSensorWhether motion has been detected.- Specified by:
isMotionin interfaceMotionSensor- Returns:
trueif motion detected,falseif not.
-
getLastChanged
Description copied from interface:MotionSensorThe last time there was any change to the motion status.- Specified by:
getLastChangedin interfaceMotionSensor- Returns:
- Timestamp.
-
toString
-