/
/
/
# What does this implement/fix? Changing the brightness, colour mode or latency of the Hue lights sync provider was meant to be applied to the running lights straight away. Instead every change reloaded the whole provider, which closed the connection to the Hue bridge and re-created the light players — so if music was playing, the lights dropped out and had to re-sync. The latency slider made this worst, since it applies while you drag it. The settings check compared the plain setting names against the changed keys, which are stored with a `values/` prefix, so it never matched and always fell through to the reload. While fixing that it turned out a brightness of 0 never worked either: 0 is a valid value for both brightness and latency, but the fallbacks treated it as "not set" and silently used 100% brightness / 20ms. That applied on startup too, so setting the lights to 0 has never done anything. - Compare against the correct `values/<key>` form - Only skip the reload when every changed setting can be applied in place, so a setting changed together with something else (e.g. the log level) still takes the full path - Read the three settings through shared helpers that only fall back when nothing is configured, so 0 stays 0 - Added tests for the in-place path, the reload path, the mixed case and the zero values ## Types of changes - [x] Bugfix (non-breaking change which fixes an issue) — `bugfix` - [ ] New feature (non-breaking change which adds functionality) — `new-feature` - [ ] Enhancement to an existing feature — `enhancement` - [ ] New music/player/metadata/plugin provider — `new-provider` - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) — `breaking-change` - [ ] Refactor (no behaviour change) — `refactor` - [ ] Documentation only — `documentation` - [ ] Maintenance / chore — `maintenance` - [ ] CI / workflow change — `ci` - [ ] Dependencies bump — `dependencies` ## Checklist - [x] The code change is tested and works locally. - [x] `pre-commit run --all-files` passes. - [x] `pytest` passes, and tests have been added/updated under `tests/` where applicable. - [ ] For changes to shared models, the companion PR in `music-assistant/models` is linked. - [ ] For changes affecting the UI, the companion PR in `music-assistant/frontend` is linked. - [x] I have read and complied with the project's [AI Policy](https://github.com/music-assistant/.github/blob/main/AI_POLICY.md) for any AI-assisted contributions. - [ ] I have [raised a PR against the documentation repository](https://github.com/music-assistant/music-assistant.io/blob/main/CONTRIBUTING.md) targeting the main or beta branch as appropriate.