Skip to content

ZWave: Add reset service to meters#7676

Merged
turbokongen merged 3 commits into
home-assistant:devfrom
turbokongen:zwave-reset
May 21, 2017
Merged

ZWave: Add reset service to meters#7676
turbokongen merged 3 commits into
home-assistant:devfrom
turbokongen:zwave-reset

Conversation

@turbokongen
Copy link
Copy Markdown
Contributor

@turbokongen turbokongen commented May 20, 2017

Description:

This adds a reset_node_meters service to zwave that can let the user reset values in the command_class_meter class. (I.e. kWh meter) This "button" will be present at index 33 of the values if the node supports it.

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

@mention-bot
Copy link
Copy Markdown

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

@andrey-git
Copy link
Copy Markdown
Contributor

Why index 33? Could you point to documentation?

Copy link
Copy Markdown
Contributor

@andrey-git andrey-git left a comment

Choose a reason for hiding this comment

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

Ouch. This is ugly :(

@emlove
Copy link
Copy Markdown
Contributor

emlove commented May 20, 2017

Even though it looks like we'll only ever have the one, I think it's probably worth adding to zwave/const.py as METER_RESET_INDEX or something like that. At least then it can have a name. Otherwise LGTM.

@turbokongen
Copy link
Copy Markdown
Contributor Author

You cant reset only one index of the command class. The button resets all meters of the instance.

@emlove
Copy link
Copy Markdown
Contributor

emlove commented May 20, 2017

I just meant adding METER_RESET_INDEX = 33 to zwave/const.py, and then referencing that instead of just 33 in here. Just to give it a name that mirrors this.

@turbokongen turbokongen merged commit 4a0d6e7 into home-assistant:dev May 21, 2017
@balloob balloob mentioned this pull request Jun 2, 2017
@home-assistant home-assistant locked and limited conversation to collaborators Sep 4, 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.

6 participants