## Summary
- Fixes regression in v1.30.0 where lights turned on by automations were incorrectly marked as "manually controlled"
- Makes `adapt_only_on_bare_turn_on` respect individual attribute tracking from #1356
## Root Cause
PR #1356 added a call to `update_manually_controlled_from_event()` in the `turn_on_off_event_listener.on()` handler for ALL `light.turn_on` events, including when turning a light on from OFF state.
When an automation turns on a light with brightness/color attributes, this incorrectly marked the light as "manually controlled", preventing Adaptive Lighting from adapting it.
## Fix
1. Only call `update_manually_controlled_from_event()` when the light was **already ON** before the turn_on event. Turning on from OFF is handled by `_respond_to_off_to_on_event()`.
2. Make `adapt_only_on_bare_turn_on` respect `take_over_control_mode`:
- With `PAUSE_CHANGED`: Only pause adaptation of specified attributes, continue adapting unspecified ones
- With `PAUSE_ALL`: Pause all adaptation (existing behavior)
## Expected Behavior After Fix
| Scenario | `adapt_only_on_bare_turn_on` | `take_over_control_mode` | Result |
|----------|------------------------------|--------------------------|--------|
| Turn on from OFF with brightness | `false` | Either | NOT manually controlled |
| Turn on from OFF with brightness | `true` | `PAUSE_ALL` | All adaptation paused |
| Turn on from OFF with brightness | `true` | `PAUSE_CHANGED` | Only brightness paused, color adapts |
| Turn on from OFF without attributes | Either | Either | NOT manually controlled |
| Change brightness while ON | Either | Either | Brightness manually controlled |
## Test plan
- [x] Turn on light via automation with brightness/color (`adapt_only_on_bare_turn_on=false`) - should adapt
- [x] Turn on light via scene (`adapt_only_on_bare_turn_on=true`, `PAUSE_ALL`) - should pause all adaptation
- [x] Turn on light with brightness only (`adapt_only_on_bare_turn_on=true`, `PAUSE_CHANGED`) - should adapt color
- [x] Both intercept=True and intercept=False paths tested for consistency
- [x] CI tests pass
Fixes#1378
Co-authored-by: Mario Guggenberger <mg@protyposis.net>
* refactor: introduce light control parameter enum
* refactor: replace manual control flag with parameter enum
* test: update deprecated color temp attribute
* build: set execution bits on task scripts
* feat: individual manual control of brightness and color
* test: add tests for individual manual control evaluation
* fix: sequential manual changes not always detected
If multiple attributes of a light were changed within an interval, only the last change was detected because the check in the interval only used the latest event. For example, if there was a brightness change and a following color change, only the color attribute was detected as manually controlled. To fix this, the manual control attribute flags are now set directly from the event handler so that all events are processed.
* fix: invalid service description
* docs: fix missing space in config description
* refactor: pluralize multivalued bitmask enum name
Replace cv.multi_select with HA's EntitySelector for the lights field
in the options flow. This provides:
- Built-in search/typing to find entities faster
- Better UX with HA's native entity picker
- Improved handling of renamed entities
Closes#1208
* feat: add option to duplicate existing lighting instance
A menu step in the config flow was added that allows a user to create a
new instance or duplicate the options of an existing one.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add type annotation, tests, and translations for duplicate feature
- Add type annotation for source_options class attribute
- Add menu step translations to en.json
- Add tests for menu display, new instance creation, and duplication
* Simplify source_options access with class-level default
---------
Co-authored-by: Bas Nijholt <bas@nijho.lt>
Add automation to keep the pytest test matrix up-to-date with latest
Home Assistant Core releases:
1. **Weekly Automation**: New workflow updates test matrix automatically
2. **Version Fetcher**: Python script queries GitHub API for latest HA Core releases
3. **PR Creation**: Automatically creates PRs when new versions are available
## Benefits
- No more manual updates when new HA Core versions are released
- Automatic tracking of new HA Core releases
- Reduces maintenance burden
## Background
This builds on commit a982acb which fixed mypy-dev pinning. While upstream
now installs latest mypy-dev automatically, the test matrix versions still
need manual updates. This automation solves that remaining manual task.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Translated using Weblate (Galician)
Currently translated at 50.3% (77 of 153 strings)
Translated using Weblate (Galician)
Currently translated at 49.0% (75 of 153 strings)
Translated using Weblate (Galician)
Currently translated at 46.4% (71 of 153 strings)
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Yago Raña Gayoso <yago.rana.gayoso@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/adaptive-lighting/adaptive-lighting/gl/
Translation: Adaptive Lighting/Adaptive Lighting
* Translated using Weblate (Turkish)
Currently translated at 100.0% (153 of 153 strings)
Added translation using Weblate (Turkish)
Co-authored-by: Furkan Kaya <fkaya.personal@gmail.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/adaptive-lighting/adaptive-lighting/tr/
Translation: Adaptive Lighting/Adaptive Lighting
* Translated using Weblate (Portuguese (Brazil))
Currently translated at 56.8% (87 of 153 strings)
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Rafael do Amaral Porciuncula <rafael.do.amaralp@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/adaptive-lighting/adaptive-lighting/pt_BR/
Translation: Adaptive Lighting/Adaptive Lighting
* Translated using Weblate (Danish)
Currently translated at 90.1% (138 of 153 strings)
Translated using Weblate (Danish)
Currently translated at 88.8% (136 of 153 strings)
Translated using Weblate (Danish)
Currently translated at 88.8% (136 of 153 strings)
Translated using Weblate (Danish)
Currently translated at 88.8% (136 of 153 strings)
Co-authored-by: Emil Friis Osmann <Emilfriisosmann@gmail.com>
Co-authored-by: Hans Henrik Juhl <hans@kopula.dk>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/adaptive-lighting/adaptive-lighting/da/
Translation: Adaptive Lighting/Adaptive Lighting
* Translated using Weblate (Russian)
Currently translated at 99.3% (152 of 153 strings)
Co-authored-by: Athish Athish <athisha660@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/adaptive-lighting/adaptive-lighting/ru/
Translation: Adaptive Lighting/Adaptive Lighting
* Translated using Weblate (Ukrainian)
Currently translated at 100.0% (153 of 153 strings)
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Максим Горпиніч <gorpinicmaksim0@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/adaptive-lighting/adaptive-lighting/uk/
Translation: Adaptive Lighting/Adaptive Lighting
* Translated using Weblate (Japanese)
Currently translated at 48.3% (74 of 153 strings)
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: M.Sugahara <equaaqua@hotmail.com>
Translate-URL: https://hosted.weblate.org/projects/adaptive-lighting/adaptive-lighting/ja/
Translation: Adaptive Lighting/Adaptive Lighting
* Translated using Weblate (Hungarian)
Currently translated at 100.0% (153 of 153 strings)
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: therealmate <hellogaming91@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/adaptive-lighting/adaptive-lighting/hu/
Translation: Adaptive Lighting/Adaptive Lighting
* Translated using Weblate (Slovenian)
Currently translated at 71.2% (109 of 153 strings)
Added translation using Weblate (Slovenian)
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Tim Music <tim.music98@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/adaptive-lighting/adaptive-lighting/sl/
Translation: Adaptive Lighting/Adaptive Lighting
---------
Co-authored-by: Yago Raña Gayoso <yago.rana.gayoso@gmail.com>
Co-authored-by: Furkan Kaya <fkaya.personal@gmail.com>
Co-authored-by: Rafael do Amaral Porciuncula <rafael.do.amaralp@gmail.com>
Co-authored-by: Emil Friis Osmann <Emilfriisosmann@gmail.com>
Co-authored-by: Hans Henrik Juhl <hans@kopula.dk>
Co-authored-by: Athish Athish <athisha660@gmail.com>
Co-authored-by: Максим Горпиніч <gorpinicmaksim0@gmail.com>
Co-authored-by: M.Sugahara <equaaqua@hotmail.com>
Co-authored-by: therealmate <hellogaming91@gmail.com>
Co-authored-by: Tim Music <tim.music98@gmail.com>