Connect a Lux Meter or Light Sensor to Home Assistant
Learn how to add a lux meter or light sensor to Home Assistant, read its illuminance entity, and use measured light levels in automations.
Contents
- What a lux reading tells you
- Choose a sensor that reports illuminance
- Add the sensor to Home Assistant
- Read the illuminance entity correctly
- Compare lux triggers for automations
- Place the sensor for steady readings
- Troubleshoot missing or odd readings
- Questions about Home Assistant lux sensors
- Can a lux meter connect to Home Assistant without a hub?
- What unit does Home Assistant use for light levels?
- Do I need to restart Home Assistant after adding a light sensor?
- How do I stop a lux sensor from triggering automations too often?
- Is a lux sensor the same as a light meter for photography?
Add a lux meter or light sensor to Home Assistant through its integration, then read its illuminance entity. Lux is the unit of illuminance, the amount of light falling on a surface. Once the entity exists, you can show it on a dashboard or use it in automations.
- Lux measures illuminance, the light falling on a surface, not the brightness you see.
- Add the sensor's integration first, then confirm the illuminance entity appears in Home Assistant.
- Place the sensor where it sees the light you want to measure, away from lamps that skew readings.
- Test the reading at different times of day before you build any automation.
- Use a threshold with a gap between on and off values to avoid rapid switching.
What a lux reading tells you
A lux reading states how much light lands on one square meter of a surface. The number describes light at one point, not the brightness that a room seems to have. A bright window and a dim corner can both be useful, depending on the task. A lux value therefore tells you about one spot at one moment.
Handheld light meters for photography also report lux, though each device has its own accuracy. Two sensors in one spot can still differ, so compare them side by side. Treat a single value as an estimate rather than a laboratory measurement. Readings change with the weather, the time of day and where the sensor sits.
Home Assistant stores the light level as an illuminance entity with the unit lx. That entity updates whenever the sensor reports a new value, so history graphs follow changes. Once you know what the number means, you can decide what it should control. The rest of this article shows how to connect the sensor and use its values.
Choose a sensor that reports illuminance
A lux sensor for Home Assistant reports illuminance as a numeric value. Some sensors report light only, while others combine light with temperature or motion. Check the product's data before buying so you know which value it provides. A handheld light meter works only if Home Assistant has an integration for its connection.
Zigbee lux sensors join a Zigbee network through a coordinator, which Home Assistant then reads. Wi-Fi sensors connect directly to your router and may need the vendor's app for setup. Wired or hub-based devices need a gateway, so check that you already own it. Match the sensor's connection type to what your home setup already runs.
Which option fits depends on the rooms, the wiring and the hub you already have. A sensor that needs no new hub often keeps the setup simpler for a single room. Several sensors across a house need a shared network that reaches every spot. Write down the connection type before you order, so the setup does not stall later.
Add the sensor to Home Assistant
Adding a sensor starts with its integration, the software piece that tells Home Assistant how to read it. Open the settings area, choose Devices and services, and look for the integration by name. Follow the on-screen prompts, which may ask for a network address or a pairing step. Some devices need a button press during pairing, so keep the sensor close to the hub.
After pairing, Home Assistant lists the new device under its devices page. Open the device and check that an entity named for illuminance appears. If the entity is missing, the integration may still be loading or the device may not be paired. Give the entity a clear name so automations and dashboards stay easy to read.
Renaming is optional but helps when several rooms each have a light sensor. Use the room name in the entity name, for example a desk lux entity. Assign the device to an area so that dashboards can group it with nearby devices. Keep the device's firmware current if the manufacturer provides updates for it.
- Open Settings and choose Devices and services.
- Select Add integration and search for the sensor's brand or protocol.
- Follow the prompts until the device appears under Devices.
- Open the device and confirm an illuminance entity exists.
- Rename the entity and assign it to an area.
Read the illuminance entity correctly
The illuminance entity reports the current light level as a number in lux. Its history graph shows how the value changed over hours or days. Use the graph to spot patterns, such as a bright window in the afternoon. Patterns like this help you pick threshold values before writing any rules.
A sudden spike can come from a lamp or sunlight reaching the sensor directly. Check whether the spike appears at the same time each day or only once. Recurring spikes point to a fixed light source, while single spikes often point to a passing object. Changing the position or shade of the sensor can correct a skewed reading.
Some integrations report the value in rounded steps, so small changes may not show. Read the device documentation to learn the update interval and the reported unit. A value that never changes can mean a stuck sensor rather than a dark room. Compare the reading with a second source before trusting an unusual value.
Compare lux triggers for automations
An automation can react when the illuminance entity crosses a level you choose. A numeric state trigger watches one entity and compares its value with a number. Use it to turn on a lamp when a room gets dim, for example. Choose the trigger type that matches the decision you want the system to make.
Each trigger type answers a different question about the light in the room. A value above a threshold suits blinds or lights that should react to bright sun. A value below a threshold suits lamps that should come on as evening arrives. A band with two thresholds avoids switching when the reading hovers near one number.
Lux thresholds depend on the room, the window direction and the purpose of the light. A reading that suits a bright kitchen may be too high for a bedroom. Set the first threshold from the history graph, then adjust it after a few days of observation. Keep the thresholds in one place so that you can change them without rewriting each rule.
| Trigger type | What it does | Depends on |
|---|---|---|
| Numeric state above a value | Fires when lux rises past a set level | A threshold chosen from history |
| Numeric state below a value | Fires when light falls under a set level | The room and the time of day |
| Numeric state between two values | Fires only inside a chosen band | Two thresholds with a gap |
Place the sensor for steady readings
Position matters more than the device for getting a useful lux reading. Face the sensor toward the area you want to measure, not toward a lamp or window. Keep it at the height where people work or sit, such as a desk or table. Avoid placing it where a single lamp dominates the reading.
Direct sunlight can push a sensor far above the level of the room. A sensor on a sunny sill measures the window, not the space behind it. Shade the sensor or move it inward so it reflects room light instead. Recheck the reading at noon and evening to see whether the change helped.
Mount the sensor away from moving objects, such as curtains, that cast changing shadows. A ceiling mount may read higher than a wall mount at the same spot. Record the mounting height and angle so later readings can be compared fairly. Fixing the position first saves time before any automation is tuned.
Troubleshoot missing or odd readings
A missing illuminance entity often means the integration did not finish loading. Restart the integration from its settings page before restarting the whole system. Check the logs for errors that name the device or its connection. Log messages often give the clearest clue about which step failed.
A reading stuck at one value can point to a sensor that has lost its connection. Battery-powered sensors may report stale values when their battery runs low. Replace the battery and watch whether the value starts updating again. Wireless signal strength can also drop when the sensor sits far from its hub.
Wired lux sensors may need a qualified electrician for installation and any mains wiring. Do not open a powered fixture to reach a sensor, because a live circuit can cause injury. Turn off the power at the breaker before any work on the wiring. A battery sensor avoids that work, but it still needs a reachable spot and regular checks.
Questions about Home Assistant lux sensors
Can a lux meter connect to Home Assistant without a hub?
Yes, some lux meters connect over Wi-Fi, while others need a hub for Zigbee. The answer depends on the connection protocol the meter uses. Check the device's connection type and confirm that Home Assistant offers an integration for it. A meter that needs a hub will not connect without that hub in place.
What unit does Home Assistant use for light levels?
Home Assistant reports illuminance in lux, which is abbreviated as lx. Lux measures the light falling on a surface, not the brightness that a person sees. A value of zero means that no measurable light reaches the sensor. Compare values from one sensor only with readings taken the same way.
Do I need to restart Home Assistant after adding a light sensor?
Not always, since the integration for many sensors loads without a full restart. The integration's setup page or the device list shows whether it loaded. If the entity does not appear, restarting the integration is a quicker step than restarting everything. Restart the whole system only when the integration page shows no clear cause.
How do I stop a lux sensor from triggering automations too often?
Use a threshold with a gap between the on and off values, which stops rapid switching. A trigger that fires at one exact value can repeat as the reading drifts. Add a short delay or a for-duration condition so brief changes do not start the action. Check the history graph first to see how far the reading moves over a day.
Is a lux sensor the same as a light meter for photography?
Not exactly, though both report lux, so the unit is the same. A photography meter is built for exposure settings and is often handheld. A smart sensor is built to send values to software and it stays in one spot. Check each device's documentation for its accuracy and measuring range.