The _build_options_schema method was calling _get_lights_schema internally,
causing it to be called multiple times redundantly. This refactoring:
- Renames _get_lights_schema to _prepare_lights_schema for clarity
- Changes _build_options_schema to accept to_replace as a parameter
- Updates all callers to prepare lights schema first and pass it
- Fixes async_step_advanced which was broken due to missing parameter
Users have complained about the overwhelming number of options (28+)
in the configuration UI. This change splits the options into two steps:
**Basic Settings (9 options):**
- lights, min/max brightness, min/max color temp
- sleep brightness, sleep color temp, transition, interval
**Advanced Settings (20+ options):**
- All other options (sunrise/sunset times, offsets, brightness modes,
take_over_control, detect_non_ha_changes, etc.)
The flow now works as:
1. User configures basic options
2. Menu appears: "Configure advanced options" or "Save and finish"
3. If advanced chosen, show advanced options form
4. Save combined options
Changes:
- Add BASIC_OPTIONS constant to const.py
- Refactor OptionsFlowHandler with async_step_init, async_step_advanced,
async_step_finish methods
- Update strings.json with menu_options and advanced step
- Update all 34 translation files with translated menu/titles
- Update tests for multi-step flow
Note for Weblate: After merging, run "Rescan all translation files"
to pick up the new structure. Existing translations are preserved.
* Fix setting config_entry directly in ≥2024.12
FAILED tests/components/adaptive_lighting/test_config_flow.py::test_incorrect_options - RuntimeError: Detected that integration 'adaptive_lighting' sets option flow config_entry explicitly, which is deprecated at homeassistant/components/adaptive_lighting/config_flow.py, line 86: self.config_entry = config_entry. Please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+adaptive_lighting%22
* compatiblity