Skip to content

Options flow: clear empty fields on save - #31

Merged
adnansarajlic merged 2 commits into
mainfrom
Fix-Sensors
Apr 2, 2026
Merged

adnansarajlic merged 2 commits into
mainfrom
Fix-Sensors

Conversation

@adnansarajlic

Copy link
Copy Markdown
Owner

Fix options flow so fields removed by the user are saved as empty strings. If CONF_RESTRICT_TIME_START, CONF_RESTRICT_TIME_END or CONF_BEST_PRICE_SPANS are missing from user_input they are now set to "" before updating the config entry. Added a unit test (tests/test_config_flow.py) and test helpers (tests/conftest.py) to cover this behavior. Also bumped integration version and User-Agent to 1.2.6 and added a changelog entry documenting the fix.

Fix options flow so fields removed by the user are saved as empty strings. If CONF_RESTRICT_TIME_START, CONF_RESTRICT_TIME_END or CONF_BEST_PRICE_SPANS are missing from user_input they are now set to "" before updating the config entry. Added a unit test (tests/test_config_flow.py) and test helpers (tests/conftest.py) to cover this behavior. Also bumped integration version and User-Agent to 1.2.6 and added a changelog entry documenting the fix.
@adnansarajlic
adnansarajlic merged commit 6223e8c into main Apr 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant