1
mirror of https://github.com/home-assistant/core synced 2024-08-31 05:57:13 +02:00
Commit Graph

323 Commits

Author SHA1 Message Date
J. Nick Koston
4b74c57285
Reduce config entry setup/unload boilerplate T-U (#49786) 2021-04-27 22:19:57 +02:00
HomeAssistant Azure
69c1721c2a [ci skip] Translation update 2021-04-22 00:02:50 +00:00
Robert Svensson
63616a9e36
Use config_entry.on_unload rather than local listener implementation in UniFi (#49496) 2021-04-20 08:50:42 -10:00
J. Nick Koston
7db5d50ce4
Fix memory leak in unifi on reload (#49456) 2021-04-20 09:13:07 -07:00
Franck Nijhof
055cdc64c0
Add support for IoT class in manifest (#46935) 2021-04-15 10:21:38 +02:00
J. Nick Koston
4cd7f9bd8b
Raise ConfigEntryAuthFailed during setup or coordinator update to start reauth (#48962) 2021-04-09 19:41:29 -10:00
Robert Svensson
6ce96dcb63
Don't care about DPI entries when looking for clients to be restored from UniFi (#48579)
* DPI switches shouldnt be restored, they're not part of clients to be restored

* Only care about Block and POE switch entries
2021-04-01 18:02:28 +02:00
Franck Nijhof
8d5ce53098
Merge of nested IF-IF cases - S-W (#48372) 2021-03-27 10:54:59 +01:00
Erik Montnemery
783b453bbe
Migrate integrations t-v to extend SensorEntity (#48216) 2021-03-22 19:47:44 +01:00
Franck Nijhof
8a56dbf587
Add flake8 comprehensions checks to pre-commit & CI (#48111) 2021-03-19 13:41:09 +01:00
Marc Mueller
b67b9b94f9
Update typing 13 (#48077) 2021-03-18 14:43:52 +01:00
HomeAssistant Azure
f625e324dd [ci skip] Translation update 2021-03-18 00:07:07 +00:00
HomeAssistant Azure
4306c8fbb4 [ci skip] Translation update 2021-03-17 00:03:55 +00:00
HomeAssistant Azure
c11b85af2f [ci skip] Translation update 2021-03-16 00:04:36 +00:00
Robert Svensson
597bf67f5a
UniFi has changed to not report uptime in epoch form (#47492) 2021-03-12 11:55:11 -08:00
Erik Montnemery
1fc8e32d86
Update integrations t-z to override extra_state_attributes() (#47760) 2021-03-11 20:16:26 +01:00
Robert Svensson
50d3aae418
Improve restoring UniFi POE entity state (#47148)
* Improve restoring data and better handling when the restore data is empty
Improve readability of some logic related to POE clients

* There is no need to check clients_all in Switch platform

* Add better tests when restoring state

* Port except handling shouldn't be needed anymore

* Walrusify get_last_state
2021-03-05 22:09:05 +01:00
Robert Svensson
793929f2ea
Increase test coverage of UniFi integration (#46347)
* Increase coverage of init

* Increase coverage of config_flow

* Improve coverage of controller

* Minor improvement to switch test

* Fix review comment

* Mock websocket class

* Replace the rest of the old websocket event tests

* Improve websocket fixture for cleaner tests

* Fix typing

* Improve connection state signalling based on Martins feedback

* Improve tests of reconnection_mechanisms based on Martins review comments

* Fix unload entry

* Fix isort issue after rebase

* Fix martins comment on not using caplog

* Fix wireless clients test

* Fix martins comments on wireless clients test
2021-03-05 21:28:41 +01:00
Quentame
198ecb0945
Uniformize platform setup (#47101)
* A platform is not a component

* Fix dynalite

* SUPPORTED_PLATFORMS --> PLATFORMS

* In tests

* In tests 2

* Fix SmartThings

* Fix ZHA test

* Fix Z-Wave

* Revert Z-Wave

* Use PLATFORMS const in ambient_station

* Fix ihc comment
2021-03-02 21:43:59 +01:00
HomeAssistant Azure
44ed6cda40 [ci skip] Translation update 2021-03-01 00:09:01 +00:00
HomeAssistant Azure
9159f54900 [ci skip] Translation update 2021-02-24 00:04:14 +00:00
HomeAssistant Azure
580d25c622 [ci skip] Translation update 2021-02-23 00:05:06 +00:00
HomeAssistant Azure
0cb1f61deb [ci skip] Translation update 2021-02-21 00:07:04 +00:00
HomeAssistant Azure
fd60d4273b [ci skip] Translation update 2021-02-20 00:08:25 +00:00
HomeAssistant Azure
d9ce7db554 [ci skip] Translation update 2021-02-19 00:03:06 +00:00
HomeAssistant Azure
1bb535aa67 [ci skip] Translation update 2021-02-16 00:03:57 +00:00
Franck Nijhof
bc1daf1802
None optional hass typing in FlowHandler (#46462)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-02-13 13:21:37 +01:00
HomeAssistant Azure
8bacfcec50 [ci skip] Translation update 2021-02-13 00:03:13 +00:00
Paulus Schoutsen
9e07910ab0
Mark entities as unavailable when they are removed but are still registered (#45528)
* Mark entities as unavailable when they are removed but are still registered

* Add sync_entity_lifecycle to collection helper

* Remove debug print

* Lint

* Fix tests

* Fix tests

* Update zha

* Update zone

* Fix tests

* Update hyperion

* Update rfxtrx

* Fix tests

* Pass force_remove=True from integrations

Co-authored-by: Erik <erik@montnemery.com>
2021-02-08 10:45:46 +01:00
Robert Svensson
618fcda821
Simplify UniFi entry configuration data (#45759)
* Simplify configuration structure by removing the controller key

* Fix flake8

* Fix review comments

* Don't use migrate_entry mechanism to flatten configuration
Keep legacy configuration when creating new entries as well
2021-02-06 21:32:18 +01:00
HomeAssistant Azure
ce159d7db3 [ci skip] Translation update 2021-02-06 00:07:22 +00:00
Robert Svensson
0d620eb7c3
Add unique id to UniFi config entries using the unique id of the site it is controlling (#45737)
* Add unique id to UniFi config entries using the unique id of the site it is controlling

* Fix failing test
2021-02-05 19:38:08 +01:00
HomeAssistant Azure
c6bd5b1b71 [ci skip] Translation update 2021-02-05 00:03:54 +00:00
Paulus Schoutsen
959ed6d077 Update translations 2021-02-03 11:46:49 +01:00
Robert Svensson
83a75b02ea
Code quality improvements to UniFi integration (#45794)
* Do less inside try statements

* Replace controller id with config entry id since it doesn't serve a purpose anymore

* Improve how controller connection state is communicated in the client and device tracker
Remove the need to disable arguments-differ lint

* Remove broad exception handling from config flow
I'm not sure there ever was a reason for this more than to catch all exceptions

* Replace site string with constant for SSDP title_placeholders

* Unload platforms in the defacto way

* Noone reads the method descriptions

* Improve file descriptions
2021-02-01 17:55:16 +01:00
J. Nick Koston
88c4031e57
Fix exception when a unifi config entry is ignored (#45735)
* Fix exception when a unifi config entry is ignored

* Fix existing test
2021-01-30 16:45:46 +01:00
Robert Svensson
97fd05eb9f
Allow new UniFi flows to update existing entries if host and site match (#45668) 2021-01-29 18:14:39 +01:00
Robert Svensson
26764a805b
Don't parse previous messages when UniFi connection state change to available (#45544)
* Don't parse previous messages when connection state change to available

* Disable pylint for arguments-differ W0221 message
2021-01-26 16:41:28 +01:00
J. Nick Koston
b68c287ff1
Add SSDP discovery to unifi (#45364) 2021-01-21 11:03:54 -06:00
J. Nick Koston
536e835b39
Switch frequently used unifi controller properties to attributes (#45365) 2021-01-20 16:58:02 -06:00
Robert Svensson
da4404e8cf
Introduce reauthentication flow to UniFi integration (#45360)
* Improve site selection

* Reauth flow and tests
Add **kwargs to mock_aiohttp_client create_session to support inputting verify_ssl and cookie_jar

* Update homeassistant/components/unifi/config_flow.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Minor improvements

* Improve coverage

Co-authored-by: J. Nick Koston <nick@koston.org>
2021-01-20 22:10:40 +01:00
J. Nick Koston
41e7d960ee
Use dispatcher for unifi heartbeat tracking (#45211)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-01-17 03:10:52 +01:00
J. Nick Koston
5e01b828af
Discover devices from device_trackers with router sources (#45160)
* Discover devices from device_trackers with router sources

* Update homeassistant/components/dhcp/__init__.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* fix stop being called on the wrong context

* clean

* move it to base

* cleanup was too agressive

* Update homeassistant/components/dhcp/__init__.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* coverage

* revert legacy changes

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-01-16 01:01:37 +01:00
J. Nick Koston
b450d4c135
Improve unifi performance with many devices (#45006)
With 250 clients, there were about 18000 timers updated every
minute. To avoid this, we check which entities should be set
to not_home only once every second.
2021-01-10 20:12:21 +01:00
Robert Svensson
9651d1bcfa
Support more errors to better do retries in UniFi (#44108) 2020-12-10 21:25:50 +01:00
HomeAssistant Azure
848224262c [ci skip] Translation update 2020-12-10 00:03:01 +00:00
HomeAssistant Azure
42f00cff30 [ci skip] Translation update 2020-12-04 00:05:42 +00:00
springstan
d5efb3e3de
Remove temporary variable by only retrieving needed value (#42522) 2020-11-29 00:44:25 +01:00
Erik Montnemery
a5e5c5c7e6
Exclude disabled entities from async_entries_for_device (#43665) 2020-11-27 09:03:44 +01:00
HomeAssistant Azure
43955d3aa8 [ci skip] Translation update 2020-11-21 00:08:32 +00:00