core/tests/components/apcupsd
Yuxin Wang 33c5d1855d
Rewrite APCUPSD sensors using DataUpdateCoordinator (#88467)
* Add test sensor.

* Fix sensor test file name.

* Add binary sensor test.

* Fix comments and styling.

* Remove apcupsd from omissions in coveragerc.

* Revert "Remove apcupsd from omissions in coveragerc."

This reverts commit 66b05fcb8829619a771a650a3d70174089e15d91.

* Implement the data coordinator for apcupsd.

* Add tests for sensor updates and throttles.

* Reorder the statement for better code clarity.

* Update docstring.

* Add more tests for checking if the coordinator works ok.

* Implement a custom debouncer with 5 second cooldown for the coordinator.

* Add more tests for checking if our integration is able to properly mark entity's availability.

* Make apcupsd a silver integration.

* Try to fix non-deterministic test behaviors

* Fix JSON format

* Use new `with` format in python 3.10 for better readability

* Update tests.

* Rebase and simplify code.

* Add an ups prefix to the property methods of the coordinator

* Replace init_integration with async_init_integration

* Lint fixes

* Fix imports

* Update BinarySensor implementation to add initial update of attributes

* Fix test failures due to rebases

* Reorder the statements for better code clarity

* Fix incorrect references to the ups_name property

* Simplify BinarySensor value getter code

* No need to update when adding coordinator-controlled sensors
2023-11-21 22:40:05 +01:00
..
__init__.py Rewrite APCUPSD sensors using DataUpdateCoordinator (#88467) 2023-11-21 22:40:05 +01:00
test_binary_sensor.py Update a* tests to use device & entity registry fixtures (#103711) 2023-11-09 20:46:20 +01:00
test_config_flow.py Rewrite APCUPSD sensors using DataUpdateCoordinator (#88467) 2023-11-21 22:40:05 +01:00
test_init.py Rewrite APCUPSD sensors using DataUpdateCoordinator (#88467) 2023-11-21 22:40:05 +01:00
test_sensor.py Rewrite APCUPSD sensors using DataUpdateCoordinator (#88467) 2023-11-21 22:40:05 +01:00