Commit graph

58 commits

Author SHA1 Message Date
Dylan Corrales
02b26ac4e6
Add state for alarm_control_panel in Prometheus ()
* Prometheus: Add state for alarm_control_panel

* Prometheus: Add pytest for alarm_control_panel
2024-08-18 22:11:37 +02:00
Elliott Balsley
cd72bdd851
Add Prometheus fan_mode and climate_mode metrics ()
Co-authored-by: Anton Tolchanov <1687799+knyar@users.noreply.github.com>
2024-07-07 19:39:54 +02:00
Elliott Balsley
275a7499b1
Add prometheus fan handler ()
Co-authored-by: Anton Tolchanov <1687799+knyar@users.noreply.github.com>
2024-07-07 16:32:15 +02:00
Adam Goode
27bccf0b24
Add test for prometheus export of entities becoming unavailable and available again ()
Add test for state change to unavailable and back
2024-04-20 20:20:01 -07:00
Marc Mueller
1722e23df8
Add empty line after module docstring [tests l-p] () 2024-03-08 14:55:15 +01:00
Adam Goode
a049d0e846
Add types throughout the prometheus tests () 2024-03-03 20:13:35 -08:00
Adam Goode
5cdc3cec32
Properly report cover positions to prometheus () 2024-02-12 15:33:03 +01:00
Anton Tolchanov
80f8e76fa3
Handle attributes set to None in prometheus ()
Better handle attributes set to None
2023-11-20 19:53:25 +01:00
Max
1e57bc5415
Add number state to prometheus metrics () 2023-11-13 17:03:08 +01:00
Sam Crang
b2b57c5f87
Allow exporting of update domain to Prometheus () 2023-09-07 20:43:47 -07:00
Russell Cloran
9144ef7ed8
Enumerate available states in Prometheus startup () 2023-09-04 09:30:56 +02:00
Russell Cloran
5fd14eade5
Handle timestamp sensors in Prometheus integration () 2023-09-02 10:20:36 +02:00
Russell Cloran
49995a4667
Add tests for device tracker in Prometheus () 2023-08-17 17:58:52 +02:00
Jadson Santos
f6273bfca5
Add prometheus requires_auth parameter ()
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-08-08 12:15:08 +02:00
J. Nick Koston
dc5ee71d7a
Add slots to core EventBus () 2023-07-05 11:47:24 -05:00
J. Nick Koston
c63e3c3bf1
Update prometheus tests to avoid patching utcnow () 2023-05-25 07:15:14 +02:00
epenet
d65dff3f9e
Adjust entity registry access in tests (2) () 2023-03-01 16:23:36 +01:00
epenet
2cdc741900
Add type hints to integration tests (part 17) () 2023-02-15 11:14:04 +01:00
Michael
72d3fa6d89
Replace the usage of unit constants by enumerations in Tests [o-r] () 2023-01-15 14:50:24 +01:00
Matt Gerega
2215adf5cf
Add support for covers in Prometheus metrics ()
fixes undefined
2022-12-27 11:25:33 +01:00
Michael
8a3fc2e82b
Fix attribute check in prometheus exporter ()
* fix attribute check

* add test
2022-12-20 16:32:00 -08:00
epenet
f453726b18
Cleanup HVACAction and HVACMode in tests () 2022-09-20 20:30:54 +02:00
epenet
7bc2712142
Adjust root-import in tests ()
* Adjust root-import in tests

* Adjust diagnostics

* Adjust button

* Adjust select

* Adjust device_tracker

* Adjust camera

* Adjust humidifier

* Adjust media_source

* Adjust update

* Adjust siren

* Adjust number

* Adjust alarm_control_panel

* Adjust notify

* Adjust sensor

* Adjust switch

* Revert anthemav

* Don't adjust demo humidifier
2022-09-19 15:22:23 +02:00
Paulus Schoutsen
5eb19b8a70
Enforce RegistryEntryDisabler enum ()
Co-authored-by: Franck Nijhof <git@frenck.dev>
2022-03-31 13:10:07 -07:00
alim4r
ca469750ac
Prometheus tests simulate entities () 2022-01-27 15:56:12 +01:00
alim4r
3e0e9e54bf
Fix duplicate metrics in prometheus ()
* 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 () 2022-01-19 14:49:29 +01:00
Jevgeni Kiski
6af99882c5
Prometheus to support input_number ()
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 () 2022-01-04 17:34:05 +01:00
Dave T
38e95ca663
Use new enums for prometheus tests () 2021-12-22 14:31:20 +01:00
alim4r
7d256f56c5
Refactor Prometheus tests ()
* 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
Erik Montnemery
5169ee69c7
Attempt to fix flaky prometheus test () 2021-12-08 16:08:02 +01:00
alim4r
42389fc81b
Support numeric sensors with no unit_of_measurement in prometheus () 2021-11-24 22:30:08 +01:00
alim4r
e180f1e302
Add input_number state to prometheus metrics ()
* Add input_number to prometheus metrics

* Add prometheus input_number tests

* Removed unused import from test
2021-11-17 19:35:48 -08:00
Ville Skyttä
380cff167e
Use HTTPStatus in components/[nop]* () 2021-10-23 20:56:30 +02:00
Matt Zimmerman
515a47212e
Add target high/low temperatures to prometheus integration ()
* 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 () 2021-07-26 20:52:30 +02:00
Erik Montnemery
216b0df908
Set state_class for demo sensor () 2021-05-12 18:38:26 +02:00
Franck Nijhof
5a2b5fe7c5
Yoda assertion style removed is () 2021-03-20 13:55:10 +01:00
Franck Nijhof
65cf2fcb6f
Drop asynctest () 2021-01-01 22:31:56 +01:00
springstan
0c077685b6
Use content type text plain constant () 2020-09-20 13:19:10 +02:00
Eric Severance
16a947aa5f
Add generic unavailable and last_updated metrics for prometheus ()
* 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 ()
* 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
mdegat01
b78f163bb0
Changed FilterTest namedtuples to dataclasses () 2020-06-30 11:59:21 -05:00
mdegat01
6c7355785a
Add support for glob matching to entity filters ()
* Added GLOB capability to entityfilter and every place that uses it. All existing tests are passing

* added tests for components affected by glob change

* fixed flake8 error

* mocking the correct listener

* mocking correct bus method in azure test

* tests passing in 3.7 and 3.8

* fixed formatting issue from rebase/conflict

* Checking against glob patterns in more performant way

* perf improvments and reverted unnecessarily adjusted tests

* added new benchmark test around filters

* no longer using get with default in entityfilter

* changed filter name and removed logbook from filter benchmark

* simplified benchmark tests from feedback

* fixed apache tests and returned include exclude schemas to normal

* fixed azure event hub tests to properly go through component logic

* fixed azure test and clean up for other tests

* renaming test files to match standard

* merged mqtt statestream test changes with base

* removed dependency on recorder filter schema from history

* fixed recorder tests after merge and a bunch of lint errors
2020-06-23 20:02:29 -05:00
Paulus Schoutsen
276f3afb00
Do async_setup_platform in background ()
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-05-31 22:18:30 -07:00
springstan
ef9d9b17bd
Drop UNIT_ prefix for constants ()
* Drop UNIT_ prefix for VOLT

* Drop UNIT_ prefix for DEGREE

* Drop UNIT_ prefix for CONDUCTIVITY

* Drop UNIT_ prefix for UV_INDEX

* Run isort
2020-04-21 19:45:53 +02:00
springstan
b893150154
Add and use UNIT_DEGREE constant ()
* Add and use UNIT_DEGREE constant

* Replace more occurrences

* Add and use TEMP_KELVIN

* Run isort
2020-04-11 16:54:11 +02:00
springstan
02c9e47db8
Use ENERGY_KILO_WATT_HOUR constant () 2020-04-10 20:21:29 +02:00
Ville Skyttä
496bd3dddf
Add and use more unit constants ()
* Add and use speed constants

* Add and use meter based volume and area constants

* Add and use more mass unit constants

* Add and use concentration unit constants

* Add and use watts per square meter constant

* Use more time constants

* Use more data constants
2020-02-24 17:52:14 -08:00