Commit Graph

264 Commits (faf5c2eb40df5fbd11f6a7d7a8ad40f52f09216a)

Author SHA1 Message Date
HomeAssistant Azure 78f846d532 [ci skip] Translation update 2020-05-03 00:02:26 +00:00
HomeAssistant Azure f4f2aff5b6 [ci skip] Translation update 2020-05-02 00:04:57 +00:00
HomeAssistant Azure 5d37eb8eeb [ci skip] Translation update 2020-04-30 00:03:17 +00:00
Erik Montnemery 066e921a8b
Rename SwitchDevice to SwitchEntity (#34673) 2020-04-26 18:50:37 +02:00
Erik Montnemery b022e08db9
Rename BinarySensorDevice to BinarySensorEntity (#34462)
* Rename BinarySensorDevice to BinarySensorEntity

* Tweak

* Move deprecation warning to __new__, add test

* Move deprecation warning back to __init__

* Move deprecation warning to __init_subclass
2020-04-23 21:57:07 +02:00
HomeAssistant Azure da87ec8499 [ci skip] Translation update 2020-04-23 00:05:07 +00:00
Joakim Sørensen 730a257f3c
Rename translations dir for integrations (#34494) 2020-04-21 16:11:05 -07:00
Paulus Schoutsen 0d60d40512 Update translations 2020-04-16 13:00:10 -07:00
Paulus Schoutsen 55dfca7467
Drop title from translations if brand name (#34306) 2020-04-16 12:52:53 -07:00
Paulus Schoutsen f06aeea385 Update translations 2020-04-15 09:51:07 -07:00
Paulus Schoutsen d36204a968
Move title translation to root (#33850) 2020-04-15 09:41:18 -07:00
Fabian Affolter 2dc6ba0ab4
Upgrade getmac to 0.8.2 (#34013) 2020-04-11 12:47:13 +02:00
HomeAssistant Azure ad619817c6 [ci skip] Translation update 2020-04-08 00:08:19 +00:00
Franck Nijhof 39336d3ea3
Add prettier (in pre-commit and CI) (#33693)
* Add prettier (in pre-commit and CI)

* Make all file prettier

* Change order

* Add to Azure Pipelines

* Fix a YAML file prettier caught as invalid

* Remove flow mapping using curly braces from all YAML service files
2020-04-05 17:27:16 +02:00
Franck Nijhof 7653dc947a
Enable pylint unnecessary-pass (#33650)
* Enable pylint unnecessary-pass

* Process review suggestions

* Fix smhi tests
2020-04-05 10:33:07 +02:00
Paulus Schoutsen f1d3c0d19b
Remove unused manifest fields (#33595) 2020-04-03 12:58:19 -07:00
HomeAssistant Azure 2cfa0af532 [ci skip] Translation update 2020-04-01 00:05:04 +00:00
HomeAssistant Azure 5bedc4ede2 [ci skip] Translation update 2020-03-29 00:04:45 +00:00
Ville Skyttä 433b89de50
Add Huawei LTE WiFi status binary sensors (#32553) 2020-03-17 19:04:01 +02:00
Ville Skyttä d04479044c
Upgrade huawei-lte-api to 1.4.11 (#32791)
https://github.com/Salamek/huawei-lte-api/releases/tag/1.4.11
2020-03-14 11:37:44 +01: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
Martin Hjelmare e9978e77bd
Upgrade huawei-lte-api to 1.4.10 (#32472)
https://github.com/Salamek/huawei-lte-api/releases/tag/1.4.8
https://github.com/Salamek/huawei-lte-api/releases/tag/1.4.9
https://github.com/Salamek/huawei-lte-api/releases/tag/1.4.10
2020-03-04 20:51:56 +01:00
springstan 157f972d72
Use f-strings in integrations starting with "H" - "L" (#32265)
* Use f-strings in integrations starting with "H"

* Use f-strings in integrations starting with "I"

* Use f-strings in integrations starting with "J"

* Use f-strings in integrations starting with "K"

* Use f-strings in integrations starting with "L"

* Fix lint error

* Use join instead of f-string in homekit_controller

* Use local variables with f-strings

* Fix lint error

* Escape the characters in f-string

* Sort imports with isort in homeworks light

* Fix pylint error

* Fix broken tests

* Fix broken tests v2
2020-02-28 12:39:29 +01:00
HomeAssistant Azure fefbe02d44 [ci skip] Translation update 2020-02-28 00:31:47 +00: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
HomeAssistant Azure 84e4ef510e [ci skip] Translation update 2020-02-17 00:31:56 +00: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
Ville Skyttä d1b0ab736d
Improve Huawei LTE timeouting/stalling request behavior (#31710)
* Suppress data get timeout exceptions for 30s after notify attempts

At least SMS send failures may put the API in a state where it times out
some (but not all) data get operations for some time, e.g. 25s.

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

* Do not pile up duplicate data requests

Do not add another request for a piece of data for which a previous
request is still in progress. For example failing SMS sends are known to
stall some (but not all) requests for some time, and firing up more is
not going to help.
2020-02-11 17:54:19 -08:00
HomeAssistant Azure a2bea2cab8 [ci skip] Translation update 2020-02-09 00:31:39 +00:00
HomeAssistant Azure 5483de7e25 [ci skip] Translation update 2020-02-08 00:31:45 +00:00
HomeAssistant Azure 274cf23269 [ci skip] Translation update 2020-02-07 00:31:50 +00:00
Robert Chmielowiec 24e9a638d5
Fix migrating huawei_lte entry without recipient (#31522) 2020-02-06 16:53:16 +02:00
HomeAssistant Azure a958418ef1 [ci skip] Translation update 2020-02-02 00:31:45 +00:00
Paulus Schoutsen e9e44dbd97
Fix callback and async (#31281)
* Fix callback and async

* Fix a return

* Fix test

* Fix mqtt tests

* Fix some more callbacks
2020-01-29 13:59:45 -08:00
HomeAssistant Azure 2c02334c1f [ci skip] Translation update 2020-01-29 00:31:54 +00:00
Ville Skyttä 8fff6462a1
Upgrade huawei-lte-api to 1.4.7 (#31155)
https://github.com/Salamek/huawei-lte-api/releases/tag/1.4.7
2020-01-27 08:50:01 +02:00
Ville Skyttä 98ac84349c
Fix Huawei LTE SMS recipient setting from options UI (#31117)
* Fix Huawei LTE SMS recipient setting from options UI

Refs https://github.com/home-assistant/home-assistant/issues/30827

* Use core interfaces in tests

* ...more
2020-01-25 13:09:43 +02:00
HomeAssistant Azure 0534153ae7 [ci skip] Translation update 2020-01-13 00:31:54 +00:00
Ville Skyttä 4a66eb0a69 Upgrade huawei-lte-api to 1.4.6 (#30683)
https://github.com/Salamek/huawei-lte-api/releases/tag/1.4.6
https://github.com/Salamek/huawei-lte-api/releases/tag/1.4.5
2020-01-11 23:36:40 +01:00
HomeAssistant Azure d6512c8a9f [ci skip] Translation update 2020-01-11 00:31:55 +00:00
HomeAssistant Azure 8c70fb5463 [ci skip] Translation update 2020-01-07 00:32:07 +00:00
Franck Nijhof a84741392b
Format all manifests with prettier (#30521) 2020-01-06 21:28:23 +01:00
HomeAssistant Azure d1ed67f44a [ci skip] Translation update 2020-01-06 00:32:11 +00:00
HomeAssistant Azure 075d3f6e32 [ci skip] Translation update 2020-01-04 00:32:23 +00:00
HomeAssistant Azure bb2d8e3f7d [ci skip] Translation update 2020-01-01 00:32:22 +00:00
HomeAssistant Azure ae51331d49 [ci skip] Translation update 2019-12-31 00:32:20 +00:00
HomeAssistant Azure 13116d8d3f [ci skip] Translation update 2019-12-30 00:32:19 +00:00
HomeAssistant Azure 5d8dda4f68 [ci skip] Translation update 2019-12-29 00:32:14 +00:00
Ville Skyttä 4e50a402c7 Note Huawei LTE notify service change requires restart (#30223)
Refs https://github.com/home-assistant/home-assistant/issues/30222
2019-12-28 16:31:42 +01:00
Ville Skyttä c5a280c064 Huawei LTE: Fix YAML options overriding ones set from GUI (#30249)
Closes https://github.com/home-assistant/home-assistant/issues/30221
2019-12-28 16:27:49 +01:00
Ville Skyttä e4cda9ae0b Fix Huawei LTE error message on service call without URL and routers (#30250) 2019-12-28 12:55:45 +01:00
HomeAssistant Azure 2e07902999 [ci skip] Translation update 2019-12-28 00:32:22 +00:00
HomeAssistant Azure 39d38923b7 [ci skip] Translation update 2019-12-27 00:32:13 +00:00
HomeAssistant Azure 169c4089ff [ci skip] Translation update 2019-12-26 00:32:16 +00:00
Ville Skyttä 50a87bbe18 Add Huawei LTE integration suspend and resume services (#30207)
Useful e.g. if accessing the router web interface from another source
such as a web browser is temporarily required.
2019-12-25 12:43:51 +01:00
Ville Skyttä a5c4508571
Make Huawei LTE notify service name configurable (#30208)
* Default Huawei LTE notify service name to notify.huawei_lte, make configurable

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

* Set default notify service name for uninvoked options flow
2019-12-25 13:42:28 +02:00
Ville Skyttä d236a19139
Include all SSDP data in discovery info (#28197)
* Include all SSDP data in discovery info

* Use UPnP device description as discovery info, inject some SSDP attrs

* Clean up attribute names

* Adapt existing SSDP flows to changed attribute names

* Prefix all SSDP UPnP attribute name constants with ATTR_UPNP, tweak a bit
2019-12-19 19:28:03 +02:00
Ville Skyttä 899f6cf1a3
Re-authorize Huawei LTE on login required error (#29597)
* Re-authorize Huawei LTE on login required error

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

* Eliminate one indented "else" block

* Convert get_data from inline to instance method

* Use .get instead of [] for checking subscriptions for clarity
2019-12-10 22:41:29 +02:00
Bas Nijholt 80c344d3a8 Sort imports according to PEP8 for huawei_lte (#29664) 2019-12-09 19:06:25 +01:00
Ville Skyttä ef4515ed70 Add Huawei LTE reboot and clear traffic statistics services (#29594)
* Add clear traffic statistics service

* Add reboot service

* Register services as admin ones

* Make URL optional when there's only one router configured

* Eliminate one if/else indent level

* Remove unnecessary .keys() with sorted()
2019-12-08 12:21:48 +01:00
Ville Skyttä 31c71989e9 Huawei LTE device tracker fixes (#29551)
* Include MAC address in device state attributes for absent devices too

* Use MAC address as default name whether device is connected or not

* Fix initialization of known entities

Closes https://github.com/home-assistant/home-assistant/issues/29354
2019-12-06 21:53:26 +01:00
Ville Skyttä ebc9d17558 Fix setup of Huawei LTE for which we can't get a MAC address (#29455)
Closes https://github.com/home-assistant/home-assistant/issues/29188
2019-12-04 21:19:25 -08:00
HomeAssistant Azure a1a131334a [ci skip] Translation update 2019-12-04 00:32:11 +00:00
HomeAssistant Azure d5ee34e504 [ci skip] Translation update 2019-12-03 00:32:23 +00:00
Ville Skyttä a9baa24fda Improve naming and attrs of hostnameless Huawei LTE device tracker entities (#29281) 2019-12-01 20:58:31 +01:00
Ville Skyttä 5c8a8a631c Add Huawei LTE binary sensor support, mobile connection sensor (#28226)
* Add Huawei LTE binary sensor support, mobile connection sensor

* Improve mobile connection sensor icon docstring

* Remove device class for permission to use a more descriptive icon
2019-11-30 22:09:08 -08:00
HomeAssistant Azure 8dc366c75b [ci skip] Translation update 2019-11-29 00:32:07 +00:00
HomeAssistant Azure f6dd51a7fb [ci skip] Translation update 2019-11-28 00:32:18 +00:00
Ville Skyttä 5bc8ef962b Upgrade huawei-lte-api to 1.4.4 (#29130)
https://github.com/Salamek/huawei-lte-api/releases/tag/1.4.4

Closes https://github.com/home-assistant/home-assistant/issues/28922
2019-11-26 20:18:24 -08:00
Ville Skyttä f504ac8c65 Drop < 0.97 Huawei LTE sensor unique id migration workaround (#29060) 2019-11-25 16:06:10 +01:00
HomeAssistant Azure aef808d2bf [ci skip] Translation update 2019-11-18 00:32:22 +00:00
HomeAssistant Azure 08d662c0a5 [ci skip] Translation update 2019-11-14 00:32:16 +00:00
HomeAssistant Azure d2d9f09f13 [ci skip] Translation update 2019-11-13 00:32:12 +00:00
HomeAssistant Azure 25b0631264 [ci skip] Translation update 2019-11-12 00:32:11 +00:00
HomeAssistant Azure 0ac8b297cd [ci skip] Translation update 2019-11-11 00:32:13 +00:00
HomeAssistant Azure 45b53c8e82 [ci skip] Translation update 2019-11-09 00:32:20 +00:00
Ville Skyttä 4f56f4e7e9 Add Huawei LTE device registry support (#28594) 2019-11-08 09:19:59 +01:00
HomeAssistant Azure 64166583b3 [ci skip] Translation update 2019-11-08 00:32:12 +00:00
HomeAssistant Azure 265c390b65 [ci skip] Translation update 2019-11-07 00:32:16 +00:00
HomeAssistant Azure ade60742d4 [ci skip] Translation update 2019-11-05 00:31:48 +00:00
Ville Skyttä 6a7b5657ac
Support Huawei LTE SSDP discovery (#28214)
* Support Huawei LTE SSDP discovery

* Avoid KeyError on simultaneous user initiated flow

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Format code

* Add already configured check

* Initialize context in test flows

* Move deviceType match to manifest

* Update generated.ssdp

* Add SSDP config flow test case

* Remove stale debug print from tests
2019-11-04 19:56:49 +02:00
HomeAssistant Azure 0973f1961d [ci skip] Translation update 2019-11-04 00:32:38 +00:00
Ville Skyttä b904a2c5ad Handle Huawei LTE timeouts (#28465) 2019-11-02 21:28:38 -07:00
HomeAssistant Azure f71527d5db [ci skip] Translation update 2019-11-03 00:31:44 +00:00
HomeAssistant Azure 4863face69 [ci skip] Translation update 2019-11-02 00:31:48 +00:00
HomeAssistant Azure bb6a617a6f [ci skip] Translation update 2019-11-01 00:32:13 +00:00
HomeAssistant Azure e700384cce [ci skip] Translation update 2019-10-30 00:32:11 +00:00
HomeAssistant Azure 0e4331e922 [ci skip] Translation update 2019-10-29 00:32:16 +00:00
HomeAssistant Azure 72dee7dd21 [ci skip] Translation update 2019-10-28 00:32:16 +00:00
HomeAssistant Azure 868f88a4e0 [ci skip] Translation update 2019-10-27 00:32:10 +00:00
Ville Skyttä 2baee4ac3e
Add Huawei LTE mobile data switch support (#28188)
* Add Huawei LTE mobile data switch support

* Remove stale comment

* Do HA state updates in base entity
2019-10-26 13:29:36 +03:00
HomeAssistant Azure 7096826d1d [ci skip] Translation update 2019-10-26 00:32:20 +00:00
HomeAssistant Azure 95295791bd [ci skip] Translation update 2019-10-25 00:32:15 +00: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 c7da781efc Update documentation link URL for integrations in all manifests (#27114) 2019-10-02 09:25:44 -07: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ä a54ade1189 Spelling fixes (#25666) 2019-08-02 23:20:06 +02: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ä f379bb4016 huawei_lte: try unsupported data retrievals only once (#25524)
* huawei_lte: try unsupported data retrievals only once

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

* Move huawei_lte_api imports to top level
2019-07-29 10:08:49 +02: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
chmielowiec 1b543cf538 Upgrade huawei-lte-api to 1.2.0 (#24165) 2019-05-28 19:51:07 -07: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
Paulus Schoutsen cfe4cf30ad
Add manifests (#22699)
* Add manifests

* Update auto name

* Update codeowners

* Add requirements from platforms

* Minor cleanup

* Incorporate changes from awarecan PR
2019-04-03 21:14:45 -07:00
Ville Skyttä dfd9f7ccf3 Upgrade huawei-lte-api to 1.1.5 (#21791) 2019-03-08 09:28:53 +01: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