Skip to content

[lock.zwave] Bugfix Zwave lock #5619

Merged
balloob merged 2 commits into
home-assistant:devfrom
turbokongen:zwave-lock
Feb 2, 2017
Merged

[lock.zwave] Bugfix Zwave lock #5619
balloob merged 2 commits into
home-assistant:devfrom
turbokongen:zwave-lock

Conversation

@turbokongen
Copy link
Copy Markdown
Contributor

Related issue (if applicable): fixes #5567

@mention-bot
Copy link
Copy Markdown

@turbokongen, thanks for your PR! By analyzing the history of the files in this pull request, we identified @devdelay and @armills to be potential reviewers.

@homeassistant
Copy link
Copy Markdown
Contributor

Hi @turbokongen,

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@turbokongen
Copy link
Copy Markdown
Contributor Author

Trying to sign the CLA I get: {"message":"Missing Authentication Token"}

@robbiet480
Copy link
Copy Markdown
Contributor

Hey, sorry the CLA link was wrong, it's now been fixed. Please sign the CLA here.

' is %s', value.data)
notification_data = value.data
if self._v2btze:
for value in (self._node.get_values(
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.

I see this kind of code all over Z-Wave, what about we introduce a method like this:

(not including other filters already present on node.get_values)

get_values(node, class_id=None, index=None, data=None):
    result = []

    kwargs = {}
    if class_id is None:
        kwargs['class_id'] = class_id

    values = node.get_values(**kwargs).values()

    for value in values:
        if index is not None and value.index != index:
            continue

        if data is not None and value.data != data:
            continue

        results.append(value)

    return results

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I need some time to look over the code and see how this should be done. It's not totally consistent what is being used, some places uses type, genre, othe places label, and some places like your example. Could this be for an other PR?

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.

Yes, other PR.

@balloob balloob added this to the 0.37.1 milestone Jan 29, 2017
@balloob balloob merged commit 68d6bcd into home-assistant:dev Feb 2, 2017
balloob pushed a commit that referenced this pull request Feb 2, 2017
* Bugfix state

* remove debug
@home-assistant home-assistant locked and limited conversation to collaborators May 19, 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.

Home Assistant 0.36: Schlage Connect lock slider always thinks the lock is locked.

5 participants