Skip to content

Search the documentation

Kit
Firmware

LightSensor

Smart Home

Measures how bright it is: a special resistor lets more electricity through when more light falls on it.

The LightSensor class is reached through this attribute of home.

Always there.

All the attributes of home are in its table.

How bright it is, as a raw reading from 0 to 4095 (higher means more light).

level() -> Optional[int]

Used in examples: Web dashboard, Smart house