-
-
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 Pilight switch #3819
Conversation
@fabaff, thanks for your PR! By analyzing the history of the files in this pull request, we identified @DavidLP, @daBONDi and @robbiet480 to be potential reviewers. |
import homeassistant.components.pilight as pilight | ||
from homeassistant.components.switch import SwitchDevice | ||
from homeassistant.components.switch import (SwitchDevice, PLATFORM_SCHEMA) | ||
from homeassistant.const import ( |
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.
- 1: F401 'CONF_PROTOCOL' imported but unused
'uuid': data['uuid']}, | ||
**data['message']) | ||
data = dict({'protocol': data['protocol'], 'uuid': data['uuid']}, | ||
**data['message']) |
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.
I just realized that this part of code uses PEP448,thus is not python 3.4 compatible. I have to fix that.
@mention-bot |
vol.Optional(CONF_SYSTEMCODE): cv.string, | ||
}) | ||
|
||
SWITCHES_SCHEMA = vol.Schema({ |
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.
You're missing CONF_NAME
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.
Thanks.
|
||
_LOGGER = logging.getLogger(__name__) | ||
|
||
CONF_OFF_CODE = 'off_code' | ||
CONF_OFF_CODE = 'off_code' |
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.
Duplicates...
Is there a way that I can add code to this PR, or do I have to create my own PR? I tried to Google this basic question but no luck... |
If it's not voluptuous-related then it would be probably easier and more transparent (due to squash) to create a new PR after that one is merged. |
Time to finish #2800 ... |
Ups, sorry committed to wrong branch. |
I'm going to merge this and take the heat. |
Description:
Migration of the configuration check to
voluptuous
.Related issue (if applicable): fixes 127528299
Example entry for
configuration.yaml
(if applicable):