Commit Graph

33 Commits (441c304f115674d386130cb032e9d7679f04bb74)

Author SHA1 Message Date
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
Ville Skyttä 4ca7b8569b
Remove pre-0.102 Huawei LTE setup noop warnings (#40654) 2020-09-27 18:02:44 +02:00
Ville Skyttä e06f2a89ea
Add Huawei LTE SMS storage full and unread sensors (#40021) 2020-09-24 20:18:55 +03:00
Ville Skyttä e3f9818af5
Add more Huawei LTE sensor metadata (#39988) 2020-09-24 17:32:44 +03:00
Franck Nijhof 1c2ebdf307
Upgrade black to 20.8b1 (#39287) 2020-08-27 13:56:20 +02:00
Bram Kragten 9ecaa10e51
Adjust icons for MDI bump (#37730) 2020-07-14 22:17:14 +02:00
Fabian Peter Hammerle 8ccdaf2927
Add huawei_lte sensor for number of unread sms (#35665) 2020-06-03 11:59:06 +02:00
Ville Skyttä da7c5518f3
Add Huawei LTE operator and network related sensors (#32485)
* Add Huawei LTE operator and network related sensors

Adds "Operator search mode", "Operator name", "Operator code", and "Preferred mode" sensors

* Blackify

* Blackify "Add Huawei LTE operator and network related sensors"
2020-03-05 21:29:53 +02:00
Paulus Schoutsen 9a8017aadd
Add more Huawei LTE sensors (#32123)
* Add Huawei LTE WiFi client count and DNS server sensors

* Add Huawei LTE current month statistics sensors
2020-03-04 14:56:37 -08:00
springstan a85808e325
Add and use time related constants (#32065)
* Add and use time related constants

* Sort time constants and reuse them in data rate constants

* Fix greeneyemonitor import

* Fix greeneyemonitor import V2

* Fix failing here_travel_time test

* Add TIME_MONTHS and TIME_YEARS

* Use TIME_MINUTES in opentherm_gw and isy994

* Add and use TIME_MILLISECONDS

* Change inconsistent ones

* Add TIME_MICROSECONDS and TIME_WEEKS

* Use constants in apcupsd and travisci

* Fix import error in upnp sensor.py

* Fix isy994 sensor.py using TIME_YEARS

* Fix dyson tests

* Use TIME_SECONDS in more places

* Use TIME_DAYS in google wifi
2020-02-23 22:09:24 +02:00
Ville Skyttä 3e23a3a860
Add and use bunch of data size and rate related constants (#31781)
Also fix a few units to match the corresponding data.
2020-02-13 08:52:57 -08:00
Bas Nijholt 80c344d3a8 Sort imports according to PEP8 for huawei_lte (#29664) 2019-12-09 19:06:25 +01:00
Ville Skyttä f504ac8c65 Drop < 0.97 Huawei LTE sensor unique id migration workaround (#29060) 2019-11-25 16:06:10 +01:00
Ville Skyttä 643b3a98ee Huawei LTE sensor metadata update (#28187) 2019-10-24 16:42:54 -07:00
Ville Skyttä fc09702cc3
Modernize Huawei LTE (#26675)
* Modernization rework

- config entry support, with override support from huawei_lte platform in YAML
- device tracker entity registry support
- refactor for easier addition of more features
- internal code cleanups

* Remove log level dependent subscription/data debug hack

No longer needed, because pretty much all keys from supported
categories are exposed as sensors.

Closes https://github.com/home-assistant/home-assistant/issues/23819

* Upgrade huawei-lte-api to 1.4.1

https://github.com/Salamek/huawei-lte-api/releases

* Add support for access without username and password

* Use subclass init instead of config_entries.HANDLERS

* Update huawei-lte-api to 1.4.3 (#27269)

* Convert device state attributes to snake_case

* Simplify scanner entity initialization

* Remove not needed hass reference from Router

* Return explicit None from unsupported old device tracker setup

* Mark unknown connection errors during config as such

* Drop some dead config flow code

* Run config flow sync I/O in executor

* Parametrize config flow login error tests

* Forward entry unload to platforms

* Async/sync fixups

* Improve data subscription debug logging

* Implement on the fly add of new and tracking of seen device tracker entities

* Handle device tracker entry unload cleanup in component

* Remove unnecessary _async_setup_lte, just have code in async_setup_entry

* Remove time tracker on unload

* Fix to not use same mutable default subscription set for all routers

* Pylint fixes

* Remove some redundant defensive device tracker code

* Add back explicit get_scanner None return, hush pylint

* Adjust approach to set system_options on entry create

* Enable some sensors on first add instead of disabling everything

* Fix SMS notification recipients default value

* Add option to skip new device tracker entities

* Fix SMS notification recipient option default

* Work around https://github.com/PyCQA/pylint/issues/3202

* Remove unrelated type hint additions

* Change async_add_new_entities to a regular function

* Remove option to disable polling for new device tracker entries
2019-10-24 19:31:49 +03:00
Franck Nijhof f9edec19ad Use literal string interpolation in integrations H-J (f-strings) (#26380) 2019-09-03 17:27:14 +02:00
Ville Skyttä 0c49c82015 Huawei LTE misc improvements (#26203)
* Constant and whitespace cleanups

* Upgrade huawei_lte_api to 1.3.0

https://github.com/Salamek/huawei-lte-api/releases

* Hush traceback if device does not support logout
2019-08-26 10:32:50 +02:00
flebourse 45aec2ea40 huawei_lte: support out of range values in default sensor formatter (#26052)
* Update sensor.py

Change regexp to cope with out of range values, ie "rssi" : ">=-51dBm".

* Add tests for format_default

* Fix black formatting
2019-08-19 20:34:33 +03:00
Ville Skyttä 9dff2e188b
Tone down huawei_lte logging (#26020)
* Tone down huawei_lte logging

Refs https://github.com/home-assistant/home-assistant/pull/23809

* Fix import order
2019-08-17 21:50:41 +03:00
Ville Skyttä c2556d90ea
Huawei LTE sensor unique id improvements (#25609)
* Convert sensor setup to async

* Improve sensor unique ids

* Save some indent levels, use f-string formatting

* Require getmac in tests

* Fix RouterData init in tests

* Make discovery_info optional in async_setup_platform signature
2019-08-01 19:22:04 +03:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Ville Skyttä f07c714c01
Huawei LTE misc improvements (#25377)
* Rename traffic_statistics to monitoring_traffic_statistics

For better consistency with huawei-lte-api.

* Add default device name for sensors

In case the actual device name cannot be accessed for some reason.

* Support device class in sensor metadata

* Mark known signal strength sensors as such
2019-07-24 07:24:22 +03:00
Ville Skyttä b9a72034f9 huawei_lte: handle icons for None sensor values gracefully (#23649) 2019-05-06 10:15:28 -07:00
Ville Skyttä 0a75a2c080
Clean up redundant same-package ..package imports (#23587) 2019-05-02 20:11:37 +03:00
cgtobi 2c07bfb9e0 Remove dependencies and requirements (#23024)
* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit fe7171b4cd.

* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit 391355ee2c.

* Remove dependencies and requirements

* Fix flake8 complaints

* Fix more flake8 complaints

* Revert non-component removals
2019-04-12 10:13:30 -07:00
Fabian Affolter 3736120c6a
Update file header (#21061)
* Update file header

* Fix lint issue

* Fix lint issue
2019-02-14 16:01:46 +01:00
Paulus Schoutsen e2d3c27e85
Embed all platforms into components (#20677)
* Consolidate all components with platforms

* Organize tests

* Fix more tests

* Fix Verisure tests

* one final test fix

* Add change

* Fix coverage
2019-02-02 07:13:16 -08:00