Releases: markfrancisonly/ha-cameralux
Releases · markfrancisonly/ha-cameralux
1.0.0
Release Notes for Version 1.0.0
The ha-cameralux
platform has been significantly upgraded with a robust set of features and optimizations. Here's an overview of the enhancements introduced:
New Features:
- Added support for image URLs alongside camera entity IDs for retrieving images, enabling more flexible configurations.
- Introduced configuration for
brightness_roi
(Region of Interest) to analyze specific portions of an image for lux calculations. - Configurable
calibration_factor
to fine-tune lux values for better accuracy based on real-world conditions. - Configurable
update_interval
(ranging from 5 seconds to 1 hour) for periodic sensor updates. - Added downscaling functionality to handle high-resolution images efficiently while preserving critical luminance data.
Performance Improvements:
- Incorporated a precomputed inverse gamma lookup table for faster and more accurate linearization of 8-bit sRGB values.
- Adopted Rec. 709 coefficients for more accurate luminance computations that align with human perception.
- Added support for multiple image modes (e.g., RGB, RGBA, Grayscale, Linear, 16-bit) and automatic conversion where necessary.
- Images are dynamically cropped and resized to reduce computational load while retaining necessary details.
Error Handling and Logging:
- Improved error handling with clear logging for issues like unsupported image modes or missing camera entities.
- Graceful fallback to
None
for lux values if image retrieval or processing fails. - Comprehensive debug-level logs for every step in the update and processing pipeline.
Code Refactoring and Modularity:
- Sensors are now initialized independently with structured configurations for better readability and maintenance.
- Transitioned to fully asynchronous sensor updates for non-blocking performance in Home Assistant.
- Unique IDs are now hashed for URL inputs, ensuring consistent and collision-free entity naming.
Bug Fixes:
- Resolved issues with unavailable camera entities causing the sensor to crash.
- Addressed inaccuracies in brightness calculations by incorporating high-precision luminance algorithms.
- Improved compatibility with Home Assistant's core and camera components.
0.3.1
initial release