-
-
Notifications
You must be signed in to change notification settings - Fork 28.6k
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
add lock as a supported domain #8676
Conversation
service = SERVICE_LOCK | ||
else: | ||
service = SERVICE_UNLOCK | ||
|
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.
blank line contains whitespace
if service == SERVICE_TURN_ON: | ||
service = SERVICE_LOCK | ||
else: | ||
service = SERVICE_UNLOCK |
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.
undefined name 'SERVICE_UNLOCK'
elif entity.domain == "lock": | ||
domain = entity.domain | ||
if service == SERVICE_TURN_ON: | ||
service = SERVICE_LOCK |
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.
undefined name 'SERVICE_LOCK'
SERVICE_OPEN_COVER, SERVICE_CLOSE_COVER, STATE_ON, STATE_OFF, | ||
HTTP_BAD_REQUEST, HTTP_NOT_FOUND, ATTR_SUPPORTED_FEATURES, | ||
SERVICE_OPEN_COVER, SERVICE_CLOSE_COVER, SERVICE_LOCK, SERVICE_UNLOCK, | ||
STATE_ON, STATE_OFF, HTTP_BAD_REQUEST, HTTP_NOT_FOUND, ATTR_SUPPORTED_FEATURES, |
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.
line too long (83 > 79 characters)
SERVICE_OPEN_COVER, SERVICE_CLOSE_COVER, STATE_ON, STATE_OFF, | ||
HTTP_BAD_REQUEST, HTTP_NOT_FOUND, ATTR_SUPPORTED_FEATURES, | ||
SERVICE_OPEN_COVER, SERVICE_CLOSE_COVER, SERVICE_LOCK, SERVICE_UNLOCK, | ||
STATE_ON, STATE_OFF, HTTP_BAD_REQUEST, HTTP_NOT_FOUND, |
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.
trailing whitespace
Please add a test. |
@balloob apologies for the ignorance. This is my first PR. It appears that tests for this need to go into /tests/components/emulated_hue/test_hue_api.py, is that correct? looks like I should:
Is this the right approach? |
Yep 👍 |
@kylerw any updates on this PR? |
No update. Been traveling for work and unable to add a test. |
You can reopen it after you add a test 👍 |
Description:
Add a new domain to Emulated Hue
**Related issue (if applicable): N/A
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>
Example entry for
configuration.yaml
(if applicable):Checklist:
If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
tox
run successfully. Your PR cannot be merged unless tests passREQUIREMENTS
variable (example).requirements_all.txt
by runningscript/gen_requirements_all.py
..coveragerc
.If the code does not interact with devices:
tox
run successfully. Your PR cannot be merged unless tests pass