Commit Graph

77 Commits (3ccd0ef013c221de23d44d420889e8cd513c6efb)

Author SHA1 Message Date
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
GitHub Action aca340de1c [ci skip] Translation update 2022-10-10 00:34:37 +00:00
GitHub Action e1047320a9 [ci skip] Translation update 2022-10-07 00:38:36 +00:00
GitHub Action 558b327928 [ci skip] Translation update 2022-10-06 00:31:54 +00:00
GitHub Action 8d28da83ca [ci skip] Translation update 2022-10-05 00:36:50 +00:00
GitHub Action 12358f2446 [ci skip] Translation update 2022-10-03 00:31:05 +00:00
GitHub Action 13c8d22baf [ci skip] Translation update 2022-10-02 00:37:00 +00:00
GitHub Action bd5ec4e198 [ci skip] Translation update 2022-10-01 00:40:08 +00:00
GitHub Action 21b078eeb7 [ci skip] Translation update 2022-09-30 00:42:29 +00:00
GitHub Action 63f2c4ab98 [ci skip] Translation update 2022-09-29 00:36:54 +00:00
Yuxin Wang 52307708c8
Refactor apcupsd to use config flow (#64809)
* Add Config Flow to APCUPSd integration and remove YAML support.

* Hide the binary sensor if user does not select STATFLAG resource.

* Add tests for config flows.

* Simplify config flow code.

* Spell fix.

* Fix pylint warnings.

* Simplify the code for config flow.

* First attempt to implement import flows to suppport legacy YAML configurations.

* Remove unnecessary log calls.

* Wrap synchronous update call with `hass.async_add_executor_job`.

* Import the YAML configurations when sensor platform is set up.

* Move the logger call since the variables are not properly set up.

* Add codeowner.

* Fix name field of manifest.json.

* Fix linting issue.

* Fix incorrect dependency due to incorrect rebase.

* Update codeowner and config flows via hassfest.

* Postpone the deprecation warning to 2022.7.

* Import future annotations for init file.

* Add an newline at the end to make prettier happy.

* Update github id.

* Add type hints for return types of steps in config flow.

* Move the deprecation date for YAML config to 2022.12.

* Update according to reviews.

* Use async_forward_entry_setups.

* Add helper properties to `APCUPSdData` class.

* Add device_info for binary sensor.

* Simplify config flow.

* Remove options flow strings.

* update the tests according to the changes.

* Add `entity_registry_enabled_default` to entities and use imported CONF_RESOURCES to disable entities instead of skipping them.

* Update according to reviews.

* Do not use model of the UPS as the title for the integration.

Instead, simply use "APCUPSd" as the integration title and let the device info serve as title for each device instead.

* Change schema to be a global variable.

* Add more comments.

* Rewrite the tests for config flows.

* Fix enabled_by_default.

* Show friendly titles in the integration.

* Add import check in `async_setup_platform` to avoid importing in sensor platform setup.

* Add import check in `async_setup_platform` to avoid importing in sensor platform setup.

* Update comments in test files.

* Use parametrize instead of manually iterating different test cases.

* Swap the order of the platform constants.

* Avoid using broad exceptions.

* Set up device info via `_attr_device_info`.

* Remove unrelated test in `test_config_flow`.

* Use `DeviceInfo` instead of dict to assign to `_attr_device_info`.

* Add english translation.

* Add `async_create_issue` for deprecated YAML configuration.

* Enable UPS status by default since it could show "online, charging, on battery etc" which is meaningful for all users.

* Apply suggestions from code review

* Apply suggestion

* Apply suggestion

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-09-28 09:14:04 +02:00
epenet 65eb1584f7
Improve entity type hints [a] (#76986) 2022-08-18 15:56:52 +02:00
Marc Mueller 911b159281
Cleanup after pylint update (#68657) 2022-03-26 00:34:12 +01:00
pailloM a3d30f6ecc
Re-enable apcupsd (#67264) 2022-02-26 09:46:16 +01:00
Franck Nijhof 276fd4f42c
Add Python 3.10 to CI (#59729) 2022-02-17 14:58:24 +01:00
J. Nick Koston 5b755b74fb
Add loggers to integration manifest.json (#65083) 2022-01-28 13:37:53 -08:00
epenet 4363852178
Add sensor setup type hints [a-b] (#63319)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-03 19:18:00 +01:00
epenet fbabad1d1d
Add binary_sensor setup type hints [a-f] (#63268)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-03 13:10:41 +01:00
epenet 545e321002
Add init type hints [a] (#63098)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-30 21:17:05 -08:00
epenet 880a2b69b6
Use new SensorDeviceClass in apcupsd (#61271)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-08 21:55:44 +01:00
Michael 0edb0c9bc9
Correct name of end apc sensor (#59200) 2021-11-08 16:08:07 +01:00
Marc Mueller a4e4ffef0a
Use EntityDescription - apcupsd (#55790) 2021-09-06 10:19:31 +02:00
Erik Montnemery 4e07ab1b32
Move temperature conversions to sensor base class (1/8) (#48261)
* Move temperature conversions to entity base class (1/8)

* Update integrations a-c

* Leave old temperature conversion until all integrations are migrated

* tweak

* Use contextlib.suppress

* Remove the MeasurableUnitEntity mixin

* Address comments, add tests

* Fix f-string

* Drop deprecation warning from base entity class

* Update with _attr-shorthand

* Fix rebase mistakes

* Fix additional rebase mistakes

* Only report temperature conversion once

* Fix additional rebase mistakes

* Format homeassistant/components/bbox/sensor.py

* Fix check for overidden _attr_state

* Remove test workarounds from implementation

* Remove useless None-check

* Tweaks

* Migrate new sensors a-c

* Update climacell

* Push deprecation of temperature conversion forward

* Override __repr__ in SensorEntity

* Include native_value in SensorEntity attributes

* Pylint

* Black

* Black

* Fix rebase mistakes

* black

* Fix rebase mistakes

* Revert changes in august/sensor.py

* Revert handling of unit converted restored state

* Apply code review suggestion

* Fix arlo test
2021-08-11 10:45:05 +02:00
Michael f7fb4ad782
Fix attr_unit_of_measurement in update of apcupsd entity (#53947) 2021-08-04 21:24:19 +02:00
Marc Mueller 074d762664
Rename and reorganize electric unit constants (#53243) 2021-07-20 20:06:23 +02:00
Erik Montnemery 9b8a776001
Set device_class on temperature sensors A-E (#49524)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-07-12 22:45:29 +02:00
Robert Hillis 1c11b247e4
Use entity class attributes for apcupsd (#52662) 2021-07-08 11:55:26 +02:00
Franck Nijhof 055cdc64c0
Add support for IoT class in manifest (#46935) 2021-04-15 10:21:38 +02:00
Erik Montnemery e0cd7072d6
Migrate integrations a-c to extend SensorEntity (#48210) 2021-03-22 12:37:16 +01:00