Fix so it is possible to ignore discovered config entry handlers#13741
Merged
balloob merged 2 commits intohome-assistant:devfrom Apr 7, 2018
Merged
Fix so it is possible to ignore discovered config entry handlers#13741balloob merged 2 commits intohome-assistant:devfrom
balloob merged 2 commits intohome-assistant:devfrom
Conversation
balloob
reviewed
Apr 7, 2018
| vol.Optional(CONF_IGNORE, default=[]): | ||
| vol.All(cv.ensure_list, [vol.In(SERVICE_HANDLERS)]) | ||
| vol.All(cv.ensure_list, [ | ||
| vol.In({**CONFIG_ENTRY_HANDLERS, **SERVICE_HANDLERS})]) |
Member
There was a problem hiding this comment.
This is inefficient, as you're creating a dictionary just to iterate over the keys. More efficient would be list(CONFIG_ENTRY_HANDLERS) + list(SERVICE_HANDLERS)
Member
|
This is fine for now. In the future, I want it to be possible for users to "decline" discovered config entries and we won't discover it again. |
Member
Author
|
Sounds good, there is a lot of promise and possibilities with config entries |
Member
|
Fixes #13880 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Checklist:
tox. Your PR cannot be merged unless tests pass