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

Use voluptuous for logentries #2927

Merged
merged 1 commit into from
Aug 24, 2016
Merged

Use voluptuous for logentries #2927

merged 1 commit into from
Aug 24, 2016

Conversation

fabaff
Copy link
Member

@fabaff fabaff commented Aug 22, 2016

Description:
Migration of the configuration check to voluptuous.

Related issue (if applicable): fixes 127528299

Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#

Example entry for configuration.yaml (if applicable):

logentries:
  token: your-log-token-here

Checklist:

If user exposed functionality or configuration variables are added/changed:

If code communicates with devices, web services, or a:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass
  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

If the code does not interact with devices:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass
  • Tests have been added to verify that the new code works.

@omgapuppy, would be nice if you could take a look at the changes and run a quick test.

@omgapuppy
Copy link
Contributor

@fabaff looks good to me & seems to work locally :)

@fabaff fabaff mentioned this pull request Aug 22, 2016
@fabaff
Copy link
Member Author

fabaff commented Aug 22, 2016

Thanks

CONFIG_SCHEMA = vol.Schema({
DOMAIN: vol.Schema({
vol.Required(CONF_TOKEN): cv.string,
}),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In such cases, we should disallow extra's inside the DOMAIN schema.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't add PREVENT_EXTRA because it seems to be the default.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, didn't know.

@balloob balloob merged commit a43ea81 into home-assistant:dev Aug 24, 2016
@fabaff fabaff deleted the voluptuous-logentries branch August 24, 2016 07:04
@home-assistant home-assistant locked and limited conversation to collaborators Mar 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants