Commit Graph

439 Commits (cbb3d48bd9417fe855820b33ca61ea3d9350a4dc)

Author SHA1 Message Date
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
Marc Mueller 87bb7ced79
Use PEP 695 for simple type aliases (#117633) 2024-05-17 14:42:21 +02:00
Sid 2cc916db6d
Replace pylint broad-except with Ruff BLE001 (#116250) 2024-05-07 14:00:27 +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
Joost Lekkerkerker fed40a89ca
Remove entity description mixin in Huawei LTE (#112777) 2024-03-09 14:41:08 +02:00
Marc Mueller 8809d3aa88
Add empty line after module docstring [g-i] (#112699) 2024-03-08 08:52:48 -05:00
Erik Montnemery e06446d0fa
Migrate integrations e-h to generic flowhandler (#111862) 2024-02-29 20:07:36 +01:00
Joost Lekkerkerker e28f551cb0
Add icon translations to Huawei LTE (#111724)
* Add icon translations to Huawei LTE

* Add icon translations to Huawei LTE
2024-02-28 16:35:47 +01:00
J. Nick Koston 303bb99da0
Migrate huawei_lte to use async_update_entry to alter config entries (#110309) 2024-02-12 08:28:54 +01:00
J. Nick Koston 3531444e2e
Avoid linear search of entity registry in huawei_lte (#109637) 2024-02-04 21:13:06 +01:00
Jan-Philipp Benecke 28281523ec
Add pylint plugin to check for sorted platforms list (#108115) 2024-01-16 09:47:53 +01:00
Jan-Philipp Benecke 3141b92027
Remove deprecated services from Huawei LTE (#107578) 2024-01-09 18:39:05 +01: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ä a29695e622
Add Huawei LTE network mode select (#104614)
* Convert network mode from sensor to select for huawei_lte

This also introduces the select platform to huawei_lte integration.

* Move (networkmode, str) mapping to const

Also, rebase on top of the current dev

* Fix variable naming, initialize name

* Fix wrong key for router access

* Typing fixes

* Adapt to current way of registering subscriptions

* Simplify option management, make translatable

* Make use of custom entity description

* Add icon

* Revert sensor formatting changes, move to another PR

* Improve entity class naming

* Add test

* Make sure entity descriptions define a setter function

---------

Co-authored-by: Teemu Rytilahti <tpr@iki.fi>
2023-12-06 14:23:26 +02: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
Ville Skyttä e594c19c1e
Upgrade huawei-lte-api to 1.7.3 (#104613) 2023-11-27 22:05:46 +01:00
Ville Skyttä 2a4ab3d53d
Support HTTPS connections to Huawei LTE devices (#86119)
* Support HTTPS connections to Huawei LTE devices

Not all devices support HTTPS, so we default to plain HTTP still.

Ones that do are very likely to have certificates that do not pass
hostname verification, and are either self signed or issued by an
untrusted CA. Add option to use unverified HTTPS to make it possible to
connect to these, and when in effect, filter urllib3's related warnings
about insecure connections to the hostname in question.

* Use common config key and strings for certificate verification settings

Even though the wording might be slightly suboptimal here, it's better
to be consistent across the codebase than to finetune on this level.

This also switches the default the other way around: verification is
now disabled by default. This is not a good general default, but for
this particular case setups where the verification would succeed would
be so rare and require considerable local setup that it's very
unlikely to happen in practice.

* Add config flow tests

* Mock logout for better test coverage

* Set up custom requests session only when using unverified https

* Add https config flow test case

* Make better use of verify SSL default
2023-11-27 18:03:29 +01:00
Ville Skyttä 616f6aab76
Add Huawei LTE restart and clear traffic statistics buttons (#91967)
* Add Huawei LTE restart and clear traffic statistics buttons

Deprecate corresponding services in favour of these.

* Change to be removed service warnings to issues

* Add tests

* Update planned service remove versions
2023-11-23 19:35:35 +01: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
J. Nick Koston 6a7d5a0fd4
Use more shorthand attributes in huawei_lte binary_sensor (#100211) 2023-09-12 19:45:44 +02:00
Ville Skyttä c287bd1a3b
Remove pylint configs flagged by useless-suppression (#99081) 2023-08-26 17:46:03 +03: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
Erik Montnemery 5b93017740
Correct huawei_lte device info (#96481) 2023-07-13 12:15:28 -04:00
Paulus Schoutsen 7859be6481
Add deduplicate translations script (#96384)
* Add deduplicate script

* Fix forecast_solar incorrect key with space

* Fix utf-8

* Do not create references to other arbitrary other integrations

* Add commented code to only allow applying to referencing integrations

* Tweak

* Bug fix

* Add command line arg for limit reference

* never suggest to update common keys

* Output of script

* Apply suggestions from code review

Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>

---------

Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>
2023-07-13 11:52:50 -04:00
Ville Skyttä 127fbded18
Fix huawei_lte suspend_integration service URL description (#96450)
Copy-pasto from resume_integration.
2023-07-12 22:04:18 -04:00
Franck Nijhof 7bc90297d2
Migrate integration services (G-H) to support translations (#96372) 2023-07-12 12:31:26 +02: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 c3936e6f14
Replace isort with ruff (#94302) 2023-06-08 23:43:56 +02:00
Ville Skyttä e949344dd9
Huawei LTE connection management cleanups (#85929)
* Disconnect rather than just logout at end of config flow

Neither the connection or the requests session will be reused, so
there's no reason just to logout. Do all of the connection closure
so we get all of huawei-lte-api's cleanups explicitly done.

* Name connect functions consistently, analoguous to disconnect
2023-05-16 20:34:03 +03:00
Franck Nijhof ed3c1d9b59
Fix incorrect entity category for huawei_lte sensors (#92235) 2023-04-29 20:21:38 -04:00
epenet 42b74e7f56
Adjust entity registry access in integrations (3) (#88948) 2023-03-01 08:24:56 +01: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
Erik Montnemery 899adef590
Sort manifests 4 (#87025) 2023-02-08 20:27:05 +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
Franck Nijhof ca1a12898c
Enable Ruff D212 (#87347) 2023-02-03 23:08:48 +01:00
GitHub Action ce79b26ab6 [ci skip] Translation update 2023-02-03 00:25:31 +00:00
GitHub Action 0f80932709 [ci skip] Translation update 2023-02-02 00:25:01 +00:00
GitHub Action 0f6f63da64 [ci skip] Translation update 2023-01-29 00:26:29 +00:00
GitHub Action 072f228e4d [ci skip] Translation update 2023-01-28 00:23:36 +00:00
Franck Nijhof e738924780
Enable Ruff SIM105 (#86759)
* Enable Ruff SIM105

* Adjust existing cases
2023-01-26 21:06:22 -05:00
GitHub Action 71d7098530 [ci skip] Translation update 2023-01-27 00:25:12 +00:00