mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-16 08:44:03 +02:00
Two config-flow bugs in the Ambient lux / Advanced sections:
- Conditional fields (target_lux, send_split_delay) only appeared on a
fresh re-open of the dialog, never in the same session — violating the
options-flow spec ('SHALL re-render ... in the same session'). Now, when
a driver is enabled but its dependent field was hidden from the rendered
schema, the form re-renders (carrying the user's edits) instead of saving.
- The options form could not be saved at all without selecting a lux
sensor: vol.Optional(CONF_LUX_SENSOR, default='') fed '' into the
illuminance EntitySelector, which rejects empty strings. Omit the
default (vol.UNDEFINED) when no sensor is configured.
Extracted _has_pending_reveal() and _overlay_range_values() helpers to
keep async_step_init under the branch limit. Added 3 flow-level tests
exercising the real re-render path (prior tests only hit the schema
builder, which is how these slipped through). 141 tests pass.
|
||
|---|---|---|
| .. | ||
| translations | ||
| __init__.py | ||
| adaptation_utils.py | ||
| color_and_brightness.py | ||
| config_flow.py | ||
| const.py | ||
| hass_utils.py | ||
| helpers.py | ||
| manifest.json | ||
| number.py | ||
| sensor.py | ||
| services.yaml | ||
| strings.json | ||
| switch.py | ||