feat: add lux sensor brightness mode#1413
Open
an0nfunc wants to merge 1 commit intobasnijholt:mainfrom
Open
Conversation
bcb3ca7 to
d188cc0
Compare
60770ee to
ad847c0
Compare
Owner
|
Thanks @an0nfunc! Will check later. Just curious, did you use Opus 4.5 or another model? |
Author
Cool :) This is done by Opus 4.5 and manually reviewed 😇 Edit: I see there are still some tests failing, will have a look 👀. |
9402281 to
b8c14c1
Compare
Add support for controlling brightness based on an outdoor lux sensor instead of sun position. Users can select "lux" as the brightness_mode and configure a lux sensor entity. New configuration options: - lux_sensor: Entity ID of outdoor illuminance sensor - lux_min: Lux value for minimum brightness (default: 0) - lux_max: Lux value for maximum brightness (default: 10000) - lux_smoothing_samples: Number of samples to average (default: 5) - lux_smoothing_window: Time window in seconds (default: 300) Features: - Linear brightness mapping matching circadian behavior (dark = dim) - Smoothing buffer to prevent rapid fluctuations - Automatic fallback to sun-based calculation when sensor unavailable - Switch attributes show current_lux and lux_samples_count
e82bfa7 to
de2193e
Compare
Author
|
Hi @basnijholt, did you have a chance to look at this yet? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds support for controlling brightness based on an outdoor lux sensor instead of sun position. This allows adaptive lighting to respond to actual ambient light conditions (e.g., overcast days) rather than calculated sun position.
luxoption forbrightness_modeConfiguration
lux_sensorlux_minlux_maxlux_smoothing_sampleslux_smoothing_windowTest plan
Closes #1177