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

vera lock support #2391

Merged
merged 2 commits into from
Jun 30, 2016
Merged

vera lock support #2391

merged 2 commits into from
Jun 30, 2016

Conversation

rhooper
Copy link
Contributor

@rhooper rhooper commented Jun 29, 2016

Description:

Add Vera Lock support using pyvera 0.2.12

Related issue (if applicable): fixes #603

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

Checklist:

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

If code communicates with devices:

  • 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.


def update(self):
"""Called by the vera device callback to update state."""
self._state = STATE_LOCKED if self.vera_device.is_locked(True) else STATE_UNLOCKED

Choose a reason for hiding this comment

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

farcy v1.1

  • 80: E501 line too long (90 > 79 characters)

def device_state_attributes(self):
"""Return the state attributes of the device."""
attr = {}
if self.vera_device.has_battery:
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't these be generalized inside VeraDevice ?

@balloob
Copy link
Member

balloob commented Jun 30, 2016

The code looks fine. I've added some small improvements. I'll merge this now but you can create a new PR if you feel like addressing those 👍

@balloob balloob merged commit 5cce02a into home-assistant:dev Jun 30, 2016
@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.

VeraLite Door lock
3 participants