Skip to content

Integration with lockitron#6805

Merged
pvizeli merged 2 commits into
home-assistant:devfrom
aarya123:lockitron
Mar 29, 2017
Merged

Integration with lockitron#6805
pvizeli merged 2 commits into
home-assistant:devfrom
aarya123:lockitron

Conversation

@aarya123
Copy link
Copy Markdown
Contributor

@aarya123 aarya123 commented Mar 26, 2017

Description:

Add support to lockitrons that have the bridge extension that enables wi-fi support. Currently only supports one lock at a time.

Related issue (if applicable): fixes #

Pull request in home-assistant.github.io with documentation: home-assistant/home-assistant.io#2339

Example entry for configuration.yaml (if applicable):

lock:
  - platform: lockitron
    access_token: asdf
    id: fdsa

Checklist:

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

If the code communicates with devices, web services, or third-party tools:

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

@mention-bot
Copy link
Copy Markdown

@aarya123, thanks for your PR! By analyzing the history of the files in this pull request, we identified @balloob, @fabaff and @robbiet480 to be potential reviewers.

Copy link
Copy Markdown
Member

@pvizeli pvizeli left a comment

Choose a reason for hiding this comment

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

I hope we finish it now :)

self.device_id = device_id

@property
def should_poll(self):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is Default, please remove it

def lock(self, **kwargs):
"""Lock the device."""
self._state = self.do_change_request(Lockitron.LOCK_STATE)
self.update_ha_state()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not needed while it is a polling device

def unlock(self, **kwargs):
"""Unlock the device."""
self._state = self.do_change_request(Lockitron.UNLOCK_STATE)
self.update_ha_state()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not needed while it is a polling device

@aarya123
Copy link
Copy Markdown
Contributor Author

Updated!

@pvizeli
Copy link
Copy Markdown
Member

pvizeli commented Mar 29, 2017

Good work 👍

@pvizeli pvizeli merged commit c935bfc into home-assistant:dev Mar 29, 2017
@aarya123 aarya123 deleted the lockitron branch March 29, 2017 17:55
@fabaff fabaff mentioned this pull request Apr 6, 2017
@home-assistant home-assistant locked and limited conversation to collaborators Jul 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