Commit Graph

105 Commits (cbb3d48bd9417fe855820b33ca61ea3d9350a4dc)

Author SHA1 Message Date
Yuxin Wang 81ee5fb46b
Refine sensor descriptions for APCUPSD (#114137)
* Refine sensor descriptions for APCUPSD

* Add device class for cumonbatt

* Add UoM to STESTI and TIMELEFT

* Remove device class for STESTI
2024-06-07 12:28:59 +02:00
Yuxin Wang 071c3abb69
Define PARALLEL_UPDATES for APCUPSD (#114134) 2024-03-28 10:17:12 +01:00
Joost Lekkerkerker 6bb4e7d62c
Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
Yuxin Wang 76052a5385
Implement diagnostics platform for APCUPSD (#112284)
* Implement diagnostic platform for APCUPSd

* Put APCUPSd in gold quality scale

* Revert quality scale update

* Use snapshot testing for apcupsd

* Prettify the code
2024-03-24 23:40:41 +01:00
Yuxin Wang 405bf076b2
Remove a redundant check in APCUPSD's config flow (#113032)
Remove a redundant check that is impossible to happen in practice
2024-03-11 08:38:44 +01:00
Yuxin Wang db31afe019
Migrate APCUPSD to has entity name (#112997)
* Properly set entity names for APCUPSD

* Add test cases to prevent future regressions

* Fix tests due to the updated entity IDs

* Prettify code

* Remove redundant translation key
2024-03-10 23:56:25 +01:00
Marc Mueller ff3a801936
Add empty line after module docstring [a-d] (#112697) 2024-03-08 14:51:32 +01:00
Yuxin Wang 2c5510df30
Avoid using coordinator in config flow of APCUPSD (#112121)
* Separate data class out of coordinator

* Further fix the imports

* Update homeassistant/components/apcupsd/coordinator.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Use `or` to make it a bit cleaner when trying to find the UPS model

Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>

* Use or to make it a bit cleaner when trying to find the UPS model

Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>

* Use plain dict instead of `OrderedDict`

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
2024-03-04 09:40:59 +01:00
Erik Montnemery 6fe28d3764
Migrate integrations a-d to generic flowhandler (#111861) 2024-02-29 20:07:14 +01:00
Joost Lekkerkerker 859c28fdb7
Add icon translations to apcupsd (#111342)
* Add icon translations to apcupsd

* Add icon translations to apcupsd
2024-02-25 10:42:04 +01:00
Marc Mueller c82933175d
Use builtin TimeoutError [a-d] (#109678) 2024-02-05 11:31:33 +01:00
Yuxin Wang 16a90f8f19
Fix stalls in config flow of APCUPSD (#108931)
Fix deadlock in config flow of APCUPSD
2024-01-27 08:34:29 +01:00
Yuxin Wang 88ddc25129
Replace apcaccess dependency with aioapcaccess in apcupsd (#104571)
* Replace apcaccess dependency with async version aioapcaccess

* Upgrade the dependency to the latest version (v0.4.2)

* Handle asyncio.IncompleteReadError
2023-12-08 12:40:09 +01:00
Joost Lekkerkerker fed8e5e873
Always create APCUPS device (#104716) 2023-11-30 18:51:23 +01:00
Joost Lekkerkerker e3599bc26f
Move APCUPSd coordinator to separate file (#104540) 2023-11-26 13:04:52 +01:00
Klaas Schoute 91e0a53cb2
Move to asyncio.timeout for APC integration (#104340)
Move to asyncio.timeout for apcupsd
2023-11-21 23:29:46 +01:00
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
Yuxin Wang 9bba501057
Handle gracefully when unloading apcupsd config entries (#99513) 2023-09-03 15:54:00 +02:00
Erik Montnemery 045c327928
Move DeviceInfo from entity to device registry (#98149)
* Move DeviceInfo from entity to device registry

* Update integrations
2023-08-10 22:04:26 -04:00
Yuxin Wang 36ad24ce01
Add name and default name to device info of APCUPSD sensors (#94415) 2023-07-24 18:42:08 +02:00
Erik Montnemery d1cfb6e1a8
Remove unreferenced issues (#95976) 2023-07-07 18:19:11 +02:00
Yuxin Wang b1bdd92383
Add unit inference for Amps and VA in APCUPSD integration (#94431)
* Add unit inference for Amps and VA

* Rename `init_integration` to `async_init_integration` for better consistency with HA naming style
2023-06-13 16:38:56 +02:00
Yuxin Wang 676b6ab706
Add support for "days" unit for STESTI sensor in APCUPSD integration (#93844)
Add a test case for self test interval
2023-05-31 14:25:46 +02:00
Yuxin Wang a547181984
Fix unit inference for ITEMP field for APCUPSD integration (#93724) 2023-05-29 20:40:36 +02:00
epenet d173590477
Remove combined translations in integrations (#91337)
Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>
2023-04-15 15:51:04 +02:00
Erik Montnemery 231aad7a68
Sort manifests 1 (#87022) 2023-02-08 20:29:44 +01:00
Franck Nijhof 939eef3b28
Remove translations from Core (#87543)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-02-06 15:06:43 +01:00
GitHub Action 3f992ed31d [ci skip] Translation update 2023-02-04 00:23:44 +00:00
GitHub Action d1ecc418bb [ci skip] Translation update 2023-01-19 00:25:04 +00:00
GitHub Action d2e11797f8 [ci skip] Translation update 2023-01-17 00:24:30 +00:00
ondras12345 cef1809536
Fix apcupsd spamming logs when host is unavailable (#85920)
fixes undefined
2023-01-15 14:45:05 +01:00
Ville Skyttä ae302bbec0
Make use of str.removeprefix and .removesuffix (#85584) 2023-01-13 12:19:38 +01:00
Yuxin Wang 06095b1fec
Enable strict typing for apcupsd (#84861) 2022-12-30 21:48:29 +01:00
Yuxin Wang 7a7f986444
Add `state_class` to the sensor entity descriptions for apcupsd integration (#84829) 2022-12-30 17:53:54 +00:00
Yuxin Wang 677f0dc335
Remove deprecated apcupsd YAML config (#83801) 2022-12-13 08:52:05 +01:00
epenet 2b647bcd5b
Use device classes in apcupsd (#83807) 2022-12-12 11:44:37 +01:00
GitHub Action f25017313a [ci skip] Translation update 2022-12-09 00:24:29 +00:00
epenet 248d5ff541
Use ApparentPower unit and device class in integrations (#83577) 2022-12-08 20:55:18 +01:00
GitHub Action 1f3e5fb4fc [ci skip] Translation update 2022-12-07 00:24:08 +00:00
GitHub Action 03154e1d83 [ci skip] Translation update 2022-12-03 00:21:50 +00:00
GitHub Action 0d1f476bee [ci skip] Translation update 2022-12-01 00:33:36 +00:00
GitHub Action 230b50d099 [ci skip] Translation update 2022-11-29 00:26:01 +00:00
GitHub Action 797dc51bc5 [ci skip] Translation update 2022-11-26 00:22:30 +00:00
GitHub Action f3b3193f7a [ci skip] Translation update 2022-11-25 00:24:19 +00:00
GitHub Action 0be2a3f182 [ci skip] Translation update 2022-11-22 00:26:32 +00:00
GitHub Action fe5246fb6f [ci skip] Translation update 2022-11-19 00:26:11 +00:00
GitHub Action 4b5de420ed [ci skip] Translation update 2022-10-29 00:24:41 +00:00
definitio 644b00ca2d
Add apcupsd laststest sensor (#80773) 2022-10-25 08:44:54 +02:00
GitHub Action 5a77c8f96f [ci skip] Translation update 2022-10-22 00:35:23 +00:00
GitHub Action 3c48ce9ee7 [ci skip] Translation update 2022-10-16 00:44:12 +00:00