Skip to content

Illuminance

OS Support:

The illuminance platform allows you to integrate a laptop ambient light sensors into UbiHome. It supports both Linux and Windows systems.

  • Uses Industrial I/O (IIO) framework (/sys/bus/iio/devices/)
  • Supports auto-detection of light sensor devices
  • Fallback support for alternative hardware monitor paths
  • Common device locations:
    • /sys/bus/iio/devices/iio:deviceN/in_illuminance_raw
    • /sys/bus/iio/devices/iio:deviceN/in_illuminance_input
    • /sys/class/hwmon/hwmonN/device/als
    • /sys/devices/platform/applesmc.768/light (Apple devices)
  • Native Windows Sensor API support using COM interfaces
  • Automatic detection of ambient light sensors through Windows Sensor Manager
  • Direct sensor data access without external dependencies

Enable the platform:

illuminance:
update_interval: 30s # Default update interval for all sensors
sensor:
- platform: illuminance
name: 'Ambient Light'
icon: mdi:brightness-6
unit_of_measurement: 'lx'
device_class: illuminance
state_class: measurement

Advanced Configuration with Manual Device Path

Section titled “Advanced Configuration with Manual Device Path”
sensor:
- platform: illuminance
name: 'Ambient Light Sensor'
device_path: '/sys/bus/iio/devices/iio:device0/in_illuminance_raw'
update_interval: 15s
icon: mdi:brightness-6
unit_of_measurement: 'lx'
device_class: illuminance
state_class: measurement
PropertyTypeDefaultDescription
platformstringRequiredMust be illuminance
namestringRequiredDisplay name for the sensor
device_pathstringOptionalManual device path (Linux only)
update_intervalduration30sHow often to read the sensor
iconstringmdi:brightness-6Home Assistant icon
device_classstringilluminanceHome Assistant device class
state_classstringmeasurementHome Assistant state class
unit_of_measurementstringlxUnit of measurement
illuminance:
update_interval: 30s # Default update interval for all sensors
device_path: '/custom/path' # Default device path (Linux only)
  1. No sensor detected: Check if your system has a light sensor:

    Terminal window
    ls /sys/bus/iio/devices/
    find /sys -name "*illuminance*" 2>/dev/null

    Specify the exact path:

    sensor:
    - platform: illuminance
    name: 'Light Sensor'
    device_path: '/sys/bus/iio/devices/iio:device0/in_illuminance_raw'