-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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
Use voluptuous for x10 #3342
Use voluptuous for x10 #3342
Conversation
vol.Required(CONF_LIGHTS): vol.All(cv.ensure_list, [ | ||
{ | ||
vol.Required(CONF_ID): cv.string, | ||
vol.Optional(CONF_NAME): cv.string, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code assumes that name is required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True
|
||
_LOGGER = logging.getLogger(__name__) | ||
|
||
SUPPORT_X10 = SUPPORT_BRIGHTNESS | ||
|
||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({ | ||
vol.Required(CONF_LIGHTS): vol.All(cv.ensure_list, [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to move this to CONF_DEVICES
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we are using CONF_DEVICES
already at other places.
Looks good! 🐬 |
Description:
Migration of the configuration check to
voluptuous
.Related issue (if applicable): fixes 127528299
Example entry for
configuration.yaml
(if applicable):@fotoetienne, would be nice if you could take a look at the changes and run a quick test. Thanks.