Source code for aaa_modules.layout_model.illuminance_sensor
from aaa_modules.layout_model.device import Device
[docs]class IlluminanceSensor(Device):
'''
Represents a light/illuminance sensor; the underlying OpenHab object is a
NumberItem.
'''
[docs] def __init__(self, numberItem):
'''
Ctor
:param org.eclipse.smarthome.core.library.items.NumberItem numberItem:
:raise ValueError: if any parameter is invalid
'''
Device.__init__(self, numberItem)
[docs] def getIlluminanceLevel(self):
'''
Returns an positive integer representing the LUX value.
'''
return self.getItem().getState().intValue()