Camera Lux is a custom Home Assistant integration that utilizes a camera feed or direct image URL to estimate ambient light levels (lux) in your environment. By analyzing images from your cameras, cameralux provides virtual lux readings that can be used to automate lighting, monitor lighting conditions, and enhance your smart home setup.
- Real-Time Lux Monitoring: Continuously estimate ambient light levels using your existing cameras.
- Configurable Update Intervals: Customize how frequently each sensor updates its lux readings.
- Region of Interest (ROI): Focus on specific areas within the camera's field of view for more accurate measurements.
- Calibration Factor: Scale luminance to lux calculations to better align with real-world lighting conditions.
- Unavailable Lux Thresholds: Optionally mark the sensor unavailable when lux falls below or rises above configured thresholds.
- Compatibility: Works with any camera integrated into Home Assistant, supporting both camera entities and direct image URLs.
entity_id: The camera entity from which to fetch images.image_url(optional): Direct HTTP URL pointing to an image file (e.g., JPEG, PNG).calibration_factor(optional): A float value to calibrate the perceived luminance to lux. Defaults to 2000 if not specified.update_interval(optional): Seconds between updates. Default is 30 seconds.unavailable_below(optional): If the calculated lux is below this value, the sensor is marked unavailable until it rises.unavailable_above(optional): If the calculated lux is above this value, the sensor is marked unavailable until it falls.roi_enabled(optional): Defines a rectangular region within the image for focused brightness assessment.x: The x-coordinate of the top-left corner of the ROI.y: The y-coordinate of the top-left corner of the ROI.width: The width of the ROI.height: The height of the ROI.
Note: Each sensor must have either entity_id or image_url configured, but not both.
-
Using HACS (Recommended):
- Open Home Assistant.
- Navigate to HACS > Integrations.
- Click on the "+" button.
- Search for "Camera Lux Sensor" and install it.
-
Manual Installation:
- Download the
cameraluxrepository from GitHub. - Place the
cameraluxfolder inside yourcustom_componentsdirectory. - Restart Home Assistant.
- Download the