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

prometheus: Fix zwave battery level #8615

Merged
merged 1 commit into from Jul 24, 2017
Merged

prometheus: Fix zwave battery level #8615

merged 1 commit into from Jul 24, 2017

Conversation

rcloran
Copy link
Contributor

@rcloran rcloran commented Jul 23, 2017

Description: prometheus: Fix zwave battery level

This will also be a useful place to start putting zwave metrics that people want exposed to prometheus.

Related issue (if applicable): fixes #

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:

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

@@ -216,6 +216,9 @@ def _handle_switch(self, state):
value = state_helper.state_as_number(state)
metric.labels(**self._labels(state)).set(value)

def _handle_zwave(self, state):
self._battery(state)

Copy link
Member

Choose a reason for hiding this comment

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

Where is that used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

handle_event looks for attributes of the class called handle

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's try again ... _handle_<entity domain>

@balloob balloob merged commit f0293ee into home-assistant:dev Jul 24, 2017
@balloob balloob added this to the 0.49.1 milestone Jul 24, 2017
balloob pushed a commit that referenced this pull request Jul 24, 2017
@balloob balloob mentioned this pull request Jul 24, 2017
dethpickle pushed a commit to dethpickle/home-assistant that referenced this pull request Aug 18, 2017
@home-assistant home-assistant locked and limited conversation to collaborators Dec 11, 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.

None yet

5 participants