Marc Mueller
7998f874c0
Use PEP 695 for function annotations with scoping ( #117787 )
2024-05-20 12:43:39 +02:00
J. Nick Koston
7d5b39b9de
Fix dictionary changed size during iteration in prometheus ( #115005 )
...
Fixes #104803
2024-04-06 11:50:29 +02:00
Marc Mueller
0f03079065
Update import for EventStateChangedData [i-z] ( #114900 )
2024-04-04 11:48:29 -10:00
Marc Mueller
de886d8c49
Update EventBus listen type signatures ( #112760 )
2024-03-08 21:57:23 +01:00
Marc Mueller
84c44c1835
Replace EventType with Event [l-s] ( #112741 )
2024-03-08 19:37:18 +01:00
Marc Mueller
988c71ecc5
Add empty line after module docstring [n-q] ( #112702 )
2024-03-08 15:04:07 +01:00
Joost Lekkerkerker
c8f39911cc
Enable some PERF rules ( #112498 )
...
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2024-03-06 17:50:41 +01:00
Adam Goode
5cdc3cec32
Properly report cover positions to prometheus ( #110157 )
2024-02-12 15:33:03 +01:00
Marc Mueller
5bde007048
Enable strict typing for prometheus ( #108025 )
2024-01-15 09:07:12 +01:00
Marc Mueller
3c1e2e17a0
Use prometheus_client module directly ( #107918 )
2024-01-14 02:56:22 +01:00
Anton Tolchanov
80f8e76fa3
Handle attributes set to None in prometheus ( #104247 )
...
Better handle attributes set to None
2023-11-20 19:53:25 +01:00
Max
1e57bc5415
Add number
state to prometheus metrics ( #102518 )
2023-11-13 17:03:08 +01:00
Sam Crang
b2b57c5f87
Allow exporting of update
domain to Prometheus ( #99400 )
2023-09-07 20:43:47 -07:00
Russell Cloran
9144ef7ed8
Enumerate available states in Prometheus startup ( #97993 )
2023-09-04 09:30:56 +02:00
Russell Cloran
5fd14eade5
Handle timestamp sensors in Prometheus integration ( #98001 )
2023-09-02 10:20:36 +02:00
Jadson Santos
f6273bfca5
Add prometheus requires_auth parameter ( #92964 )
...
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-08-08 12:15:08 +02:00
Franck Nijhof
e738924780
Enable Ruff SIM105 ( #86759 )
...
* Enable Ruff SIM105
* Adjust existing cases
2023-01-26 21:06:22 -05:00
Matt Gerega
2215adf5cf
Add support for covers in Prometheus metrics ( #83763 )
...
fixes undefined
2022-12-27 11:25:33 +01:00
Michael
8a3fc2e82b
Fix attribute check in prometheus exporter ( #84321 )
...
* fix attribute check
* add test
2022-12-20 16:32:00 -08:00
epenet
ba043c9ebb
Use UnitOfTemperature in integrations (p-s) ( #84308 )
2022-12-20 18:47:27 +01:00
epenet
ac7b4e7569
Make temperature conversions private ( #79349 )
2022-09-30 11:07:10 +02:00
epenet
24c26dc032
Use unit_conversion in components ( #79204 )
...
* Use unit_conversion in components
* Two more
2022-09-28 16:05:31 +02:00
epenet
ff356205bf
Use platform constants from root ( #78032 )
2022-09-08 12:24:45 +02:00
epenet
e2568d8375
Import climate constants from root [m-z] ( #78020 )
2022-09-08 10:34:44 +02:00
epenet
bdba3e193e
Use climate enums in prometheus ( #70772 )
2022-04-26 11:43:45 +02:00
alim4r
3e0e9e54bf
Fix duplicate metrics in prometheus ( #61355 )
...
* Fix duplicate metrics in prometheus
* Fix duplicate prometheus metrics for entities with multiple labelsets
- Move friendly_name detection to state_changed event
- Add additional test case
* Add review suggestions for prometheus friendly name update
* Remove commented out code in prometheus
* Update prometheus tests for deleted metrics
* Add review suggestions for prometheus
- Remove unnecessary firendly_name check in handle_entity_registry_updated
- Add assert in test
2022-01-25 08:05:52 -08:00
Renat Nurgaliyev
d11f2b5151
Add HVAC modes of climate entities to Prometheus exporter ( #62144 )
2022-01-19 14:49:29 +01:00
Jevgeni Kiski
6af99882c5
Prometheus to support input_number ( #58964 )
...
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2022-01-04 18:52:43 +01:00
Renat Nurgaliyev
f71d49230d
Add counter entities support to Prometheus component ( #62410 )
2022-01-04 17:34:05 +01:00
epenet
0d7b531285
Add init type hints [p-q] ( #63191 )
...
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-02 16:35:23 +01:00
alim4r
7d256f56c5
Refactor Prometheus tests ( #60451 )
...
* Removed prometheus from .coveragerc
* Update prometheus tests with handler categories
* Updated prometheus metrics to use the current registry
- don't use the registry created on import (needed for tests)
* Reset the prometheus CollectorRegistry before every test
* Update prometheus metrics generation
- Use latest registry when generating a response
* Add default collectors when resetting the registry
* Move entities to the specific prometheus test case
* Refactor body generation for prometheus tests
* Add test case for sensors without unit after rebase
* Fix prometheus tests
- Wait for events in prometheus tests
- Add workaround for demo platform dependecy conversation (aiohttp frozen router)
* Added prometheus tests for attribute metrics
* Added prometheus tests for binary_sensor
* Add prometheus test for input_boolean
* Add prometheus test for lights
* Add prometheus test for lock
* Add prometheus test for sensor fahrenheit conversion
* Fix prometheus test for input_number
2021-12-08 20:18:21 +01:00
alim4r
42389fc81b
Support numeric sensors with no unit_of_measurement in prometheus ( #60157 )
2021-11-24 22:30:08 +01:00
alim4r
e180f1e302
Add input_number state to prometheus metrics ( #56507 )
...
* Add input_number to prometheus metrics
* Add prometheus input_number tests
* Removed unused import from test
2021-11-17 19:35:48 -08:00
Marc Mueller
4513ee4ea5
Use assignment expressions 12 ( #57937 )
2021-10-20 14:34:08 -07:00
Matt Zimmerman
515a47212e
Add target high/low temperatures to prometheus integration ( #50071 )
...
* add target high/low temperatures to prometheus integration
* use labels
* Revert "use labels"
This reverts commit 09c56d6359
.
* fix naming
* tests
* cleanup
* use three separate metrics
* fix descriptions
2021-08-04 07:42:47 +02:00
Anton Tolchanov
80aaebb761
Rename Prometheus metrics to conform with naming guidelines ( #50156 )
2021-07-26 20:52:30 +02:00
Christopher Masto
5d3f3c756f
Fix Fahrenheit to Celsius conversion in Prometheus exporter ( #52212 )
...
const.TEMP_FAHRENHEIT is "°F", but _unit_string converts this to "c",
so the comparison never succeeds and we end up with temperatures in F
but labeled C.
2021-06-28 09:19:49 +02:00
Antoine Meillet
4dc0cdbb5f
Ignore STATE_UNKNOWN in prometheus ( #47840 )
...
Giving a value of 0 by default can lead to erroneous
data being exported. For example, if a MQTT temperature
sensor is in `STATE_UNKNOWN` (which can happen after a
HASS restart), a temperature of 0°C will be exported.
Some user might prefer no value rather than a wrong one.
2021-03-16 16:11:51 +01:00
tkdrob
ab53b49d3f
Clean up constants ( #46948 )
...
* Clean up constants
* clean up humidifier constants
* fix tests
* fix prometheus tests
Co-authored-by: Tobias Sauerwein <cgtobi@users.noreply.github.com>
2021-03-02 12:52:00 +01:00
Ville Skyttä
5e90a4d000
Use more state attribute name constants ( #40428 )
2020-09-21 23:03:39 +02:00
springstan
d2b1918e9c
Drop UNIT_ prefix for percentage constant ( #39383 )
2020-09-05 21:09:14 +02:00
Franck Nijhof
1c2ebdf307
Upgrade black to 20.8b1 ( #39287 )
2020-08-27 13:56:20 +02:00
Martin Weinelt
2e4b4dc188
prometheus: Reduce loglevel of failed float conversion to debug ( #37936 )
...
It creates alot of useless noise currently.
Fixes #30186
2020-07-17 20:18:35 +02:00
Eric Severance
16a947aa5f
Add generic unavailable and last_updated metrics for prometheus ( #37456 )
...
* Add generic unavailable and last_updated metrics for prometheus
* Updated with feedback from the code review
2020-07-12 21:27:33 +02:00
Shulyaka
872140123d
Add humidifier support to prometheus ( #37112 )
...
* Add humidifier support to promethease
* add humidifier dependency
* handle dependencies
* wrong place
* applied suggestions from code review
* fix typo
* Revert "wrong place"
This reverts commit 58e509d767
.
* Revert "handle dependencies"
This reverts commit 74bd523e08
.
* Revert "add humidifier dependency"
This reverts commit 8840b378e5
.
2020-07-08 20:42:45 -04:00
craiggenner
212660330f
Cope with attribute errors being converted ( #36911 )
2020-06-19 05:36:56 +02:00
Anton Tolchanov
d14112748c
Add a Prometheus metric for HVAC action ( #31945 )
2020-06-03 11:53:21 +02:00
Martin Weinelt
acfd907c50
Expose switch attributes in Prometheus component ( #35216 )
2020-06-02 22:47:49 +02:00
Nacho Barrientos
a55c6c5f47
Make prometheus light state report robust ( #36134 )
2020-05-27 09:59:40 +02:00
springstan
f1a0ca7cd3
Add and use percentage constant ( #32094 )
...
* Add and use percentage constant
* Fix pylint error and broken test
2020-02-28 11:46:48 -08:00