Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixing defaults and optionals on selectors for config flow #237

Merged
merged 8 commits into from
Jul 20, 2022

Conversation

jseidl
Copy link
Owner

@jseidl jseidl commented Jul 17, 2022

Fix for #236. Reworked selectors slightly. Original implementation of selectors in Magic Areas was not very well implemented by me and was ignoring defaults and optionals.

In fact, the EntitySelectors does not support blank values at all so I had to create a new class extending it and checking if the value is null on validation and just allowing it. Seems to be working fine now.

@jseidl jseidl added the bug Something isn't working label Jul 17, 2022
@jseidl jseidl added this to the 3.0.1 milestone Jul 17, 2022
@jseidl jseidl self-assigned this Jul 17, 2022
@jseidl jseidl linked an issue Jul 17, 2022 that may be closed by this pull request
@github-actions github-actions bot force-pushed the hotfix/config-flow-selectors-optional branch from 0e5c1b7 to f707358 Compare July 17, 2022 17:13
…eidl/hass-magic_areas into hotfix/config-flow-selectors-optional
@jseidl jseidl merged commit e170693 into develop Jul 20, 2022
@jseidl jseidl deleted the hotfix/config-flow-selectors-optional branch July 20, 2022 06:23
jseidl added a commit that referenced this pull request Jul 24, 2022
* fixing defaults and optionals on selectors for config flow

* fixing defaults and optionals on selectors for config flow

* removing commented and debug code

* removed duplicate NullableEntitySelector class code block

* fixing defaults not showing up if you had a config previously

* fixing defaults not showing up if you had a config previously
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optional configs not optional
1 participant