8000 Use voluptuous for dweet, transmission, and twitch sensor by fabaff · Pull Request #2802 · home-assistant/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Use voluptuous for dweet, transmission, and twitch senso 8000 r #2802

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

Merged
merged 3 commits into from
Aug 19, 2016
Merged

Use voluptuous for dweet, transmission, and twitch sensor #2802

merged 3 commits into from
Aug 19, 2016

Conversation

fabaff
Copy link
Member
@fabaff fabaff commented Aug 12, 2016

Description:

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):

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.

@fabaff fabaff mentioned this pull request Aug 12, 2016
vol.Required(CONF_DEVICE): cv.string,
vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string,
vol.Optional(CONF_UNIT_OF_MEASUREMENT): cv.string,
vol.Optional(CONF_VALUE_TEMPLATE): cv.template,
Copy link
Member

Choose a reason for hiding this comment

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

Based on the diff, it seems like value template was required but is now optional. Is this intentional?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, I was just careless. Thanks.

@balloob
Copy link
Member
balloob commented Aug 13, 2016

Looks good 🐬 can merge when comments addressed.

@balloob
Copy link
Member
balloob commented Aug 13, 2016

The requirements build failed because the two platforms try to import constants that do not exist in homeassistant.const

@@ -53,18 +69,17 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
transmission_api.session_stats)

dev = []
for variable in config['monitored_variables']:
for variable in config[CONF_MONITORED_VARIABLES]:
if variable not in SENSOR_TYPES:
Copy link
Member

Choose a reason for hiding this comment

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

Can be removed with validation 👍

@balloob
Copy link
Member
balloob commented Aug 19, 2016

Looks good! 🐬

@balloob balloob merged commit c74e167 into home-assistant:dev Aug 19, 2016
@home-assistant home-assistant locked and limited conversation to collaborators Mar 17, 2017
@fabaff fabaff deleted the voluptuous-sensors3 branch April 12, 2017 07:14
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.

2 participants
0