Commit graph

76 commits

Author SHA1 Message Date
epenet
9557386b6e
Move huawei_lte base entity to separate module (#126098) 2024-09-17 15:41:03 +02:00
Ville Skyttä
3b938e592f
Add additional Huawei LTE 5G sensors (#108928)
* Add some Huawei LTE 5G sensor descriptions

Closes https://github.com/home-assistant/core/issues/105786

* Mark cqi1 and nrcqi1 as diagnostic
2024-05-28 09:59:28 +02:00
Marc Mueller
905adb2431
Update codespell ignore list (#118018) 2024-05-24 10:24:34 +02:00
Ville Skyttä
a27cc24da2
Filter out HTML greater/less than entities from huawei_lte sensor values (#117209) 2024-05-18 13:45:42 +02:00
Sid
6587ee20db
Enable Ruff TRY300 (#114437)
* Enable Ruff TRY300

* Update validation.py

* Address review comments
2024-03-30 10:37:59 +01:00
Joost Lekkerkerker
761933acfe
Improve lists in integrations [G-H] (#113168) 2024-03-13 17:25:27 +01:00
Marc Mueller
8809d3aa88
Add empty line after module docstring [g-i] (#112699) 2024-03-08 08:52:48 -05:00
Erik Montnemery
922cef2884
Don't make huawei_lte entity classes dataclasses (#106160) 2023-12-22 14:27:28 +01:00
Erik Montnemery
0c2485bc03
Freeze integration entity descriptions (#105984)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-18 16:28:13 -10:00
Ville Skyttä
afc3f1d933
Make huawei_lte operator search and preferred network modes translatable (#104673) 2023-11-29 10:07:54 +01:00
Ville Skyttä
21d842cb58
Fix human readable huawei_lte sensor names (#104672)
Regression from 7c85d84133, #98631
2023-11-28 23:44:35 +02:00
Joost Lekkerkerker
7c85d84133
Add entity translations to Huawei LTE (#98631) 2023-10-08 15:15:19 +02:00
Ville Skyttä
2794ab1782
Fix huawei_lte current month up/download sensor error on delete (#100506)
Deleting one of them prematurely deleted the last reset item
subscription that is shared between the two.
2023-09-17 18:11:44 +02:00
Erik Montnemery
d1afcd773f
Revert "Cache entity properties that are never expected to change in the base class" (#100422)
Revert "Cache entity properties that are never expected to change in the base class (#95315)"

This reverts commit 042776ebb8.
2023-09-15 11:25:24 +02:00
J. Nick Koston
042776ebb8
Cache entity properties that are never expected to change in the base class (#95315) 2023-09-14 17:48:48 -05:00
Erik Montnemery
2406b235b4
Name unnamed binary sensors by their device class (#92940)
* Name unnamed binary sensors by their device class

* Update type annotations

* Fix loading of entity component translations

* Add test

* Update integrations

* Set abode and rfxtrx binary_sensor name to None

* Revert changes in homekit_controller
2023-06-13 19:48:54 +02:00
Franck Nijhof
ed3c1d9b59
Fix incorrect entity category for huawei_lte sensors (#92235) 2023-04-29 20:21:38 -04:00
Ville Skyttä
93f23e7523
Do not round Huawei LTE LTE frequency values (#88127)
Suggest display precision 0 instead.

While at it, fix source info in frequency formatter docstring.
2023-02-15 15:28:35 +01:00
Erik Montnemery
cc564026fa
Move EntityCategory to homeassistant.const (#87792)
* Move EntityCategory to homeassistant.const

* Fix more imports
2023-02-09 20:15:37 +01:00
Ville Skyttä
f0e6f45e43
Remove signal strength state class from Huawei LTE transmit power sensor (#85973)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-01-16 23:24:50 +01:00
Ville Skyttä
a5a079fb06
Huawei LTE sensor improvements (#84019)
* Use `None` for unknown states consistently

* Use huawei_lte_api NetworkModeEnum instead of magic strings

* Recognize some new sensor items

* Exclude current day duration sensor

* Fix current month upload/download types

* Add current day transfer

* Extract lambdas used in multiple spots to named functions

* Formatter naming consistency improvements
2023-01-13 18:27:57 +01:00
Ville Skyttä
4c31317c06
Key Huawei LTE routers in hass.data by config entry rather than unique id (#85788)
Key routers in hass.data by config entry rather than unique id

There's no particular reason to key them by the unique id; the config
entry id is a stronger, always available guarantee, and a much more
common convention across the HA codebase.

At some point, we might conceivably support devices we can't find a
proper unique id for; this would work for that purpose as well.
2023-01-13 09:20:24 +01:00
epenet
b7b7cdcfcf
Refactor Huawei LTE to use Entity Description (#83904)
* Refactor Huawei LTE to use Entity Description

* Apply suggestions from code review

Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>

Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>
2022-12-13 19:48:46 +01:00
epenet
535aba10ee
Use DataRate unit and device class in integrations (#83610) 2022-12-10 11:41:44 +01:00
Bram Kragten
41f6383957
Update icons for breaking changes in MDI 7.0.96 (#75560) 2022-07-21 12:24:29 +02:00
Ville Skyttä
b749622c01
Migrate Huawei LTE to new entity naming style (#75303) 2022-07-20 22:28:53 +03:00
Ville Skyttä
a9c97e5d3a
Sort huawei_lte sensor meta dict, add section separators (#74782) 2022-07-09 17:08:40 +02:00
Paulus Schoutsen
2b4bb49eb7
Make device tracker entities work better (#63328)
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-01-04 23:16:43 -08:00
Ville Skyttä
3e3fb52dfa
Huawei LTE simplifications (#62770)
* Use enum types rather than strs in sensor type hints

* Name sensor meta fields same as in SensorEntityDescription

* Make integration shared state a NamedTuple

* Use dataclasses instead of attr
2021-12-26 09:17:59 +02:00
epenet
cec43fe868
Use new enums in huawei-lte (#61771)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-14 12:59:00 +01:00
Ville Skyttä
4273e5b507
Huawei LTE sensor updates (#59374)
* Add human readable name for eNodeB ID

* Mark various config and diagnostic sensors' entity category as such

* Add uptime sensor
2021-11-10 08:49:50 +02:00
Ville Skyttä
1a9bb47f78
Add more Huawei LTE sensor state classes (#57983) 2021-10-24 17:01:50 +03:00
Ville Skyttä
4c854a06d9
Add some huawei_lte sensor state classifications (#55601) 2021-09-30 11:27:52 +02:00
Marc Mueller
565a9fea6b
Import Callable from collections.abc (2) (#56776) 2021-09-29 14:06:51 +02:00
Ville Skyttä
4e1e7a4a71
Protect Huawei LTE against None ltedl/ulfreq (#54411)
Refs https://github.com/home-assistant/core/issues/54400
2021-09-05 21:42:22 +03:00
Erik Montnemery
6de6a5dc14
Move temperature conversions to sensor base class (3/8) (#54469)
* Move temperature conversions to entity base class (3/8)

* Fix FritzBox sensor

* Fix tests
2021-08-12 14:23:56 +02:00
Marc Mueller
fd2f15b7c7
Add new unit constants (#53258)
* Add new unit constant - MHz

* Add new unit constants - precipitation (in, in/h)
2021-07-21 12:14:47 -06:00
Ville Skyttä
91a2b96da0
Implement stable unique id for Huawei LTE, requires credentials on setup (#49878) 2021-07-11 21:25:00 -07:00
Ruslan Sayfutdinov
0301706fc6
Define AddEntitiesCallback type (#49812) 2021-04-29 12:28:14 +02:00
Olivér Falvai
46ef85f471
Add new Huawei LTE sensor metadata, improve icons (#49436) 2021-04-24 18:41:15 +03:00
jan iversen
017e32a0cb
Integrations h*: Rename HomeAssistantType to HomeAssistant. (#49590) 2021-04-23 09:49:02 +02:00
Marc Mueller
c07646db5d
Update typing syntax (#49480)
* Update typing syntax

* Replace typing imports with ones from collections where possible

* Changes after review
2021-04-20 17:40:41 +02:00
Ville Skyttä
4149cc9662
Huawei LTE cleanups (#48959) 2021-04-09 17:08:13 -07:00
Erik Montnemery
339a56e434
Migrate integrations f-h to extend SensorEntity (#48212) 2021-03-22 19:45:17 +01:00
Marc Mueller
5cdd945f44
Update typing 08 (#48058) 2021-03-18 09:25:40 +01:00
Ville Skyttä
4cc6eee1ac
Mark Huawei LTE sensors with None value as unavailable (#41667) 2020-10-14 22:11:48 +03:00
Ville Skyttä
50468c4c8c
Add Huawei LTE battery sensor (#41668) 2020-10-14 22:11:18 +03:00
Ville Skyttä
cf83c6bf00
Complete Huawei LTE type hints, make mypy check them (#41503) 2020-10-08 21:02:47 +02:00
Ville Skyttä
56f0a68c49
Add and fix some Huawei LTE type hints (#41196) 2020-10-05 11:21:48 +02:00
Ville Skyttä
5bbddb5b26
Use NamedTuple for Huawei LTE sensor metadata (#40655) 2020-09-28 20:33:32 +03:00