8000 prometheus: Fix zwave battery level by rcloran · Pull Request #8615 · home-assistant/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

prometheus: Fix zwave battery level #8615

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

Merged
merged 1 commit into from
Jul 24, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions homeassistant/components/prometheus.py
Original file line number Diff line number Diff line change
Expand Up @@ -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>


class PrometheusView(HomeAssistantView):
"""Handle Prometheus requests."""
3B56 Expand Down
0