1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Add Min and Event Count Metrics To Prometheus (#10530)

* Added min and Events sensor types to prometheus

* Updated prometheus client and fixed invalid swith state

* Added metric to count number of times an automation is triggered

* Removed assumption that may not apply to everybody

* Fixed tests

* Updated requirements_test_all

* Fixed unit tests
This commit is contained in:
Brent Hughes
2017-12-03 16:39:54 -06:00
committed by Martin Hjelmare
parent 3a246df544
commit 879e32f670
4 changed files with 29 additions and 6 deletions

View File

@@ -30,4 +30,6 @@ def test_view(prometheus_client): # pylint: disable=redefined-outer-name
assert len(body) > 3 # At least two comment lines and a metric
for line in body:
if line:
assert line.startswith('# ') or line.startswith('process_')
assert line.startswith('# ') \
or line.startswith('process_') \
or line.startswith('python_info')