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 Tellstick #3367

Merged
merged 2 commits into from
Sep 14, 2016
Merged

Use voluptuous for Tellstick #3367

merged 2 commits into from
Sep 14, 2016

Conversation

fabaff
Copy link
Member

@fabaff fabaff commented Sep 13, 2016

Description:
Migration of the configuration check to voluptuous.

Related issue (if applicable): fixes 127528299

Example entry for configuration.yaml (if applicable):

tellstick:
  signal_repetitions: X

sensor:
  platform: tellstick
  135: Outside
  21: Inside
  only_named: True
  temperature_scale: "°C"
  datatype_mask: 1

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

@fabaff fabaff mentioned this pull request Sep 13, 2016
@Danielhiversen
Copy link
Member

I do not have a Tellstick device anymore
But the code looks fine

@persandstrom
Copy link
Contributor

I can test

vol.Optional(CONF_ONLY_NAMED, default=DEFAULT_ONLY_NAMED): cv.boolean,
vol.Optional(CONF_TEMPERATURE_SCALE, default=DEFAULT_TEMPERATURE_SCALE):
cv.string,
vol.Optional(CONF_DATATYPE_MASK, default=DEFAULT_DATATYPE_MASK): cv.string,
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be an cv.positive_int because of the bitwise and on line 84

@persandstrom
Copy link
Contributor

Are the switch and light components WIP?

@balloob balloob merged commit d029861 into home-assistant:dev Sep 14, 2016
vol.Optional(CONF_ONLY_NAMED, default=DEFAULT_ONLY_NAMED): cv.boolean,
vol.Optional(CONF_TEMPERATURE_SCALE, default=DEFAULT_TEMPERATURE_SCALE):
cv.string,
vol.Optional(CONF_DATATYPE_MASK, default=DEFAULT_DATATYPE_MASK): cv.positive_int,
Copy link
Contributor

Choose a reason for hiding this comment

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

This is too long line. Lint test are failing because of this at the moment.

hartmms pushed a commit to hartmms/home-assistant that referenced this pull request Sep 17, 2016
* Migrate to voluptuous

* Update tellstick.py
@fabaff fabaff deleted the voluptuous-tellstick branch September 19, 2016 08:27
@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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants