Commit Graph

336 Commits (3488b7836521f9d5963b77cff5614cec9f92968c)

Author SHA1 Message Date
Robert Svensson 015e779d56
UniFi - Client tracker schedules update on disconnect event (#32655) 2020-03-11 09:24:52 -07:00
Robert Svensson 16d7f84be7
UniFi - Fix block functionality (#32625)
* Fix block functionality

* Remove unrelated changes

* Bump dependency to v15

* Run requirement script
2020-03-10 18:27:25 +01:00
Paulus Schoutsen d216c1f2ac
UniFi - Add block network access control to config option (#32004)
* Add block network access control to config option

* Clean up
2020-03-04 21:55:56 -08:00
Robert Svensson 02c8cd07f3
UniFi - Fix websocket bug (#32449) 2020-03-03 17:32:13 -08:00
Robert Svensson f17462b159
UniFi - Temporary workaround to get device tracker to mark cli… (#32321) 2020-02-28 10:28:03 -08:00
Jens Nistler ecd076c5e4
Mark clients away if they have never been seen. (#32222) 2020-02-27 11:50:34 -08:00
HomeAssistant Azure ed461a0ad8 [ci skip] Translation update 2020-02-26 00:31:47 +00:00
HomeAssistant Azure a9e061270b [ci skip] Translation update 2020-02-25 00:32:13 +00:00
Robert Svensson 1007283da5
UniFi - Add unit of measurement to bandwidth sensors (#32114) 2020-02-23 19:17:26 +01:00
HomeAssistant Azure 8257165562 [ci skip] Translation update 2020-02-23 00:31:50 +00:00
HomeAssistant Azure dc15b9c28e [ci skip] Translation update 2020-02-22 00:31:49 +00:00
HomeAssistant Azure a12c4da0ca [ci skip] Translation update 2020-02-21 00:33:51 +00:00
HomeAssistant Azure 5839df39b5 [ci skip] Translation update 2020-02-20 00:31:46 +00:00
HomeAssistant Azure 4b3f9ecc2d [ci skip] Translation update 2020-02-19 00:31:49 +00:00
Robert Svensson 774c892ee6
UniFi config option SSID filter (#31842)
* Draft

* Use new multi_select config validation

* Bump dependency to v13

* Improve options flow

* Add title to config options

* Add config option descriptions

* Fix martins comment
2020-02-18 23:24:21 +01:00
HomeAssistant Azure 2e5161997f [ci skip] Translation update 2020-02-18 00:31:41 +00:00
Robert Svensson 4cac0443e2
UniFi - Change handling of updated options (#31762)
* Change handling of updated options

* Add tests
2020-02-12 16:15:08 -08:00
HomeAssistant Azure a2bea2cab8 [ci skip] Translation update 2020-02-09 00:31:39 +00:00
CHAZICLE 967b02073e
Remove stray debug from unifi integration (#31634) 2020-02-08 16:07:17 +01: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 Svensson 1edaae34c5
UniFi - Log better information than a backtrace when poor switch data is involved (#31382) 2020-02-01 20:48:23 +01:00
Robert Svensson 958a867c11
UniFi integration move to push messaging (#31086)
* Rewrite UniFi integration to use push messaging

* Add signalling for new clients/devices

* Update list of known wireless clients when we get events of them connecting

* Reconnection logic for websocket

* Fix failing tests

* Bump requirement to v12

* Add new tests

* Update homeassistant/components/unifi/controller.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>
2020-01-31 20:23:25 +01:00
Robert Svensson a8374cf423
UniFi - Try to discover local controller (#31326)
* Its working

* Use "unifi" as default host if a controller can be found

* Fix tests

* Make a fixture of patching the discovery function
2020-01-30 23:06:43 +01:00
HomeAssistant Azure 2c02334c1f [ci skip] Translation update 2020-01-29 00:31:54 +00:00
HomeAssistant Azure 6c84c126ea [ci skip] Translation update 2020-01-19 00:32:00 +00:00
Robert Svensson ff5f890e79 Fix problem with restoring POE control (#30597) 2020-01-08 22:33:51 +01:00
Franck Nijhof 0e9b414c26
Migrate Integration Quality Scale from docs to manifest (#30579) 2020-01-08 14:19:42 +01:00
Franck Nijhof b4d6d238e5 Correct names in manifests (T-Z) (#30546) 2020-01-07 14:31:18 +01:00
Franck Nijhof a84741392b
Format all manifests with prettier (#30521) 2020-01-06 21:28:23 +01:00
Robert Svensson 41d2d1f309 Handle wired bug on restart (#30276) 2019-12-30 12:40:52 -06:00
HomeAssistant Azure 13116d8d3f [ci skip] Translation update 2019-12-30 00:32:19 +00:00
Robert Svensson 856dd63680 Add more logging to help future debug situations (#29800) 2019-12-11 15:45:21 +01:00
Robert Svensson 99328bd4c1
UniFi - honor detection time when UniFi wire bug happens (#29820) 2019-12-10 20:05:18 +01:00
Robert Svensson 47e5142ddb
UniFi - Handle disabled switches (#29824) 2019-12-10 20:04:48 +01:00
Robert Svensson db0baab692 Only update disabled_by when enabled default and entity enabled states differ (#29643) 2019-12-10 11:02:26 +01:00
HomeAssistant Azure 12f273eb11 [ci skip] Translation update 2019-12-10 00:32:16 +00:00
Bas Nijholt 2da3848f89 Sort imports according to PEP8 for unifi (#29656) 2019-12-09 12:19:33 +01:00
HomeAssistant Azure 1968a88336 [ci skip] Translation update 2019-11-22 00:32:10 +00:00
HomeAssistant Azure aef808d2bf [ci skip] Translation update 2019-11-18 00:32:22 +00:00
HomeAssistant Azure 4863face69 [ci skip] Translation update 2019-11-02 00:31:48 +00:00
HomeAssistant Azure 0e4331e922 [ci skip] Translation update 2019-10-29 00:32:16 +00:00
Paulus Schoutsen 23289459ca Update translations 2019-10-23 13:36:38 -07:00
HomeAssistant Azure 9e8c391c81 [ci skip] Translation update 2019-10-19 00:32:15 +00:00
HomeAssistant Azure b8e00925e7 [ci skip] Translation update 2019-10-16 00:32:17 +00:00
HomeAssistant Azure d8e3255603 [ci skip] Translation update 2019-10-15 00:31:44 +00:00
HomeAssistant Azure 768bb00177 [ci skip] Translation update 2019-10-09 00:32:17 +00:00
Robert Svensson d345b58ce6 Improve UniFi config flow tests and add options flow test (#27340) 2019-10-08 14:44:33 -07:00
HomeAssistant Azure 1087abd3b5 [ci skip] Translation update 2019-10-08 00:32:12 +00:00
Robert Svensson 6565c17828
UniFi - Improve controller tests (#27261)
* Improve controller tests and harmonize setup_unifi_integration to one
* Store listeners to dispatchers to be used during reset
2019-10-07 21:55:35 +02:00
HomeAssistant Azure 073bdd672a [ci skip] Translation update 2019-10-07 00:32:19 +00:00
Robert Svensson c7c88b2b68 UniFi - Bandwidth sensors (#27229)
* First draft of UniFi bandwidth sensors

* Clean up

* Add tests for sensors
2019-10-06 08:17:40 -07:00
HomeAssistant Azure 2c6a869bc6 [ci skip] Translation update 2019-10-06 00:32:15 +00:00
Robert Svensson 09c5b9feb3
UniFi - Try to handle when UniFi erroneously marks offline client as wired (#26960)
* Add controls to catch when client goes offline and UniFi bug marks client as wired
* Device trackers shouldn't jump between going away and home
* POE control shouldn't add normally wireless clients as POE control switches
2019-10-02 21:43:14 +02:00
Franck Nijhof c7da781efc Update documentation link URL for integrations in all manifests (#27114) 2019-10-02 09:25:44 -07:00
Robert Svensson e2d7a01d65 Remove last of device tracker scanner (#27082) 2019-09-30 21:19:51 -07:00
HomeAssistant Azure 513d2652e4 [ci skip] Translation update 2019-10-01 00:32:19 +00:00
HomeAssistant Azure cdb469f711 [ci skip] Translation update 2019-09-30 00:32:17 +00:00
HomeAssistant Azure b04a70995e [ci skip] Translation update 2019-09-27 00:32:12 +00:00
HomeAssistant Azure ba92d781b4 [ci skip] Translation update 2019-09-26 00:32:13 +00:00
HomeAssistant Azure d162e39ec9 [ci skip] Translation update 2019-09-23 00:32:13 +00:00
HomeAssistant Azure 24cbae6ec3 [ci skip] Translation update 2019-09-21 00:32:16 +00:00
HomeAssistant Azure fccbaf3805 [ci skip] Translation update 2019-09-19 00:32:15 +00:00
HomeAssistant Azure 771c674e90 [ci skip] Translation update 2019-09-17 00:32:14 +00:00
HomeAssistant Azure 10f742d552 [ci skip] Translation update 2019-09-13 00:33:08 +00:00
Robert Svensson 0221d136de Remove support of UniFi device tracker configuration import (#26587) 2019-09-11 13:35:30 -06:00
HomeAssistant Azure 53a3f2e83d [ci skip] Translation update 2019-09-11 00:33:50 +00:00
HomeAssistant Azure 9df5c0ab86 [ci skip] Translation update 2019-09-10 00:32:37 +00:00
HomeAssistant Azure e204d22a9e [ci skip] Translation update 2019-09-08 00:32:16 +00:00
HomeAssistant Azure 0b1f389c76 [ci skip] Translation update 2019-09-07 00:32:45 +00:00
HomeAssistant Azure 1cbb895d20 [ci skip] Translation update 2019-09-05 10:11:41 +00:00
HomeAssistant Azure 1bd22a129b [ci skip] Translation update 2019-09-05 00:32:29 +00:00
HomeAssistant Azure 3b1a4a52e9 [ci skip] Translation update 2019-09-04 07:41:09 +00:00
Franck Nijhof ef0e9431b6 Use literal string interpolation in integrations T-W (f-strings) (#26394) 2019-09-03 21:12:51 +02:00
Paulus Schoutsen 385a496944 Update translations 2019-09-01 22:30:09 -07:00
Robert Svensson b5426761f4
UniFi - Simplify getting controller from config entry (#26335)
* Simplify getting controller from config entry

* Lint ignore no longer needed

* Fix tests
2019-09-01 17:57:25 +02:00
Robert Svensson 6102eb9f1c
Migrate Axis, deCONZ and UniFi to use config entry subclass (#26173)
* Use init_subclass for Config Entries

* Pylint cant handle subclass being the only user of imports
2019-09-01 13:15:48 +02:00
Robert Svensson d9ef92f6d2
UniFi - use entity registry disabled_by to control available entities (#26141)
* Move ignoring logic to entity registry enabled default

* Handle config to option import better

* Properly enable and disable entity registry entries on changes from config entry options

* Fix balloobs comments

* Fix some tests

* Fix tests

* Simplify updating disable on entities

* Simplify device tracker update function

* Local entity disabled replaced on rebase

* Only alter entities with changed options

* Proper tracking of changed options

* Back to straightforward updating of disabled
2019-08-31 22:04:04 +02:00
Robert Svensson 0d7326168e UniFi - dont schedule updates on disabled entities (#26278)
* Dont schedule updates on disabled entities

* Use entity enabled since it is available
2019-08-29 14:04:01 -07:00
Paulus Schoutsen 36312bdef1 Add translations 2019-08-29 12:32:15 -07:00
Paulus Schoutsen e69953fe2d Update translations 2019-08-28 12:45:48 -07:00
Robert Svensson 588eac82c7
UniFi config entry options (#26113)
Introduce config entry options for Unifi integration
Allow configuration.yaml options to be imported to new options
2019-08-21 22:22:42 +02:00
Robert Svensson 5ca6c990cf
UniFi - add ap_mac to attributes (#26004) 2019-08-16 20:29:38 +02:00
Robert Svensson ab7db5fbd0
UniFi - Use state to know if device is online (#25876) 2019-08-11 22:40:44 +02:00
jjlawren 8f2f770837 Don't track unstable attributes (#25787) 2019-08-08 14:43:53 -05:00
Robert Svensson c76531a366 Fix last seen not available on certain devices (#25735) 2019-08-06 14:55:36 -07:00
Robert Svensson 7ff7c7b9f5
UniFi - handle device not having a name (#25713)
* Handle device not having a name
2019-08-06 07:00:06 +02:00
Robert Svensson 576291779e
UniFi - reverse connectivity logic (#25691)
* Make connectivity control in line with other implementations
2019-08-04 16:57:36 +02:00
Robert Svensson 5a90b49e27
In some circumstances device.last_seen can be None (#25690) 2019-08-04 16:12:16 +02:00
Robert Svensson 93dfd613aa
Options to not track wired clients (#25669) 2019-08-02 23:51:06 +02:00
Robert Svensson 39257164a9
UniFi - allow configuration to not track clients or devices (#25642)
* Allow configuration to not track clients or devices
2019-08-02 10:13:00 +02:00
Robert Svensson ceac35797e
Handle disabled devices (#25625) 2019-08-01 17:22:08 +02:00
Paulus Schoutsen 37d78af42c Add translations 2019-07-31 16:16:40 -07:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Robert Svensson 35900964cb
UniFi - Track devices (#25570) 2019-07-30 10:05:51 +02:00
Robert Svensson 891f19b43f
UniFi device tracker restore clients (#25532) 2019-07-29 23:13:04 +02:00
Robert Svensson dc722adbb5
UniFi POE control restore clients (#25558)
* Restore POE controls on restart
2019-07-29 19:48:38 +02:00
Robert Svensson b6934f0cd0
UniFi block clients (#25478)
* Allow blocking clients on UniFi networks
2019-07-25 16:56:56 +02:00
Robert Svensson 01b890f426
Merge UniFi device tracker to config entry (#24367)
* Move device tracker to use config entry

* Remove monitored conditions attributes based on ADR0003

* Add support for import of device tracker config to be backwards compatible

* Remove unnecessary configuration options from device tracker

* Add component configuration support
2019-07-14 21:57:09 +02:00
Robert Svensson e9b0f54a43
UniFi simplify update (#24304) 2019-06-15 17:38:22 +02:00
Paulus Schoutsen 14c0ada9ac Update translations 2019-06-04 08:50:48 -07:00
Robert Svensson 4d4fd19f87
Replace pyunifi with aiounifi in UniFi device tracker (#24149)
* Replace pyunifi with aiounifi

* Fix tests

* Add sslcontext

* Fix tests

* Fix import order
2019-06-02 18:24:13 +02:00
Paulus Schoutsen 1e22c8daca
Automatically generate config flow list (#23802)
* Add config flow to manifest.json

* Still load config flows via config flow platform

* Fix typo

* Lint

* Update config_flows.py"

* Catch import error when setting up entry

* Lint

* Fix tests

* Fix imports

* Lint

* Fix Unifi tests

* Fix translation test

* Add homekit_controller config flow
2019-05-13 01:16:55 -07:00
Steven Looman 6e7a7ba4a0 Fix upnp logger name (#23724)
* Fix upnp logger name

* Fix more loggers
2019-05-07 15:52:48 -07: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 0d2646ba25 Update translations 2019-04-09 08:34:20 -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
Tobias Sauerwein 048b100eea Clean up docstrings (#22679)
* Clean up docstrings

* Fix long lines

* Fix more docstrings

* Fix more docstrings

* Fix more docstrings
2019-04-03 17:40:03 +02:00
Paulus Schoutsen 9d21afa444 Update translations 2019-03-27 21:32:58 -07:00
Paulus Schoutsen 72bb94de96 Update translations 2019-03-21 12:57:20 -07:00
Paulus Schoutsen 4b1de61110
Use relative imports inside integrations (#22235)
* Use relative imports inside integrations

* Lint

* Fix automation tests

* Fix scene imports
2019-03-20 22:56:46 -07:00
Penny Wood f195ecca4b Consolidate all platforms that have tests (#22109)
* Moved climate components with tests into platform dirs.

* Updated tests from climate component.

* Moved binary_sensor components with tests into platform dirs.

* Updated tests from binary_sensor component.

* Moved calendar components with tests into platform dirs.

* Updated tests from calendar component.

* Moved camera components with tests into platform dirs.

* Updated tests from camera component.

* Moved cover components with tests into platform dirs.

* Updated tests from cover component.

* Moved device_tracker components with tests into platform dirs.

* Updated tests from device_tracker component.

* Moved fan components with tests into platform dirs.

* Updated tests from fan component.

* Moved geo_location components with tests into platform dirs.

* Updated tests from geo_location component.

* Moved image_processing components with tests into platform dirs.

* Updated tests from image_processing component.

* Moved light components with tests into platform dirs.

* Updated tests from light component.

* Moved lock components with tests into platform dirs.

* Moved media_player components with tests into platform dirs.

* Updated tests from media_player component.

* Moved scene components with tests into platform dirs.

* Moved sensor components with tests into platform dirs.

* Updated tests from sensor component.

* Moved switch components with tests into platform dirs.

* Updated tests from sensor component.

* Moved vacuum components with tests into platform dirs.

* Updated tests from vacuum component.

* Moved weather components with tests into platform dirs.

* Fixed __init__.py files

* Fixes for stuff moved as part of this branch.

* Fix stuff needed to merge with balloob's branch.

* Formatting issues.

* Missing __init__.py files.

* Fix-ups

* Fixup

* Regenerated requirements.

* Linting errors fixed.

* Fixed more broken tests.

* Missing init files.

* Fix broken tests.

* More broken tests

* There seems to be a thread race condition.
I suspect the logger stuff is running in another thread, which means waiting until the aio loop is done is missing the log messages.
Used sleep instead because that allows the logger thread to run. I think the api_streams sensor might not be thread safe.

* Disabled tests, will remove sensor in #22147

* Updated coverage and codeowners.
2019-03-18 23:07:39 -07:00
Paulus Schoutsen d635111e4f Update translations 2019-03-12 11:31:17 -07:00
Paulus Schoutsen 78217fa9b0 Update translations 2019-02-27 16:34:13 -08:00
Paulus Schoutsen 3fcbc36abe Update translations 2019-02-21 16:40:25 -08:00
Paulus Schoutsen 882f5ed079
Don't directly update config entries (#20877)
* Don't directly update config entries

* Use ConfigEntryNotReady

* Fix tests

* Remove old test

* Lint
2019-02-13 20:36:06 -08:00
Paulus Schoutsen 02f207ea8e Update translations 2019-02-13 15:44:18 -08:00
Fabian Affolter 127c55e0c1
Update file header (#21023)
* Update file header

* Update file header

* Update file header

* Update file header

* Update file header

* Fix lint issues
2019-02-13 21:21:14 +01:00
Paulus Schoutsen ec57db78b5
Consolidate config flow components (#20635)
* Consolidate config flow components

* Fix tests

* Fix tests

* Put unifi back

* Fix reqs

* Update coveragerc
2019-02-01 15:45:44 -08:00
Alok Saboo a011048a4e Change Unifi timeout (#20606) 2019-01-30 18:40:40 +01:00
Robert Svensson d3f2854c89
UniFi - Fix issue with POE switch reset switch config (#20021)
* Fix issue when controlling POE would reset configuration for all other ports on same device
2019-01-12 17:59:44 +01:00
Paulus Schoutsen 9aed40a88d Update translations 2019-01-09 15:29:31 -08:00
Paulus Schoutsen 57ee514d70 Update translations 2018-12-19 15:01:02 +01:00
Paulus Schoutsen fe2d24c240 Update translations 2018-12-10 09:54:12 +01:00
Paulus Schoutsen 83311df933 Add translations 2018-12-06 00:30:33 +01:00
Paulus Schoutsen 3c92aa9ecb Update translations 2018-11-26 14:30:21 +01:00
Paulus Schoutsen 49121f2347 Update translations 2018-11-21 20:18:56 +01:00
Paulus Schoutsen 75bb78d440 Update translations 2018-11-15 14:30:37 +01:00
Paulus Schoutsen 00c1b40940 Add translations 2018-11-07 10:45:29 +01:00
Paulus Schoutsen 20fb7b59ef Update translations 2018-10-30 11:35:40 +01:00
Robert Svensson b03e6050c5 Fix controller not being stored when setup fails and sequentially fails the retry functionality (#17927) 2018-10-29 19:09:54 +01:00
Paulus Schoutsen c00da509a1 Update translations 2018-10-26 10:18:10 +02:00
Paulus Schoutsen 398ea40189 Update translations 2018-10-23 14:04:25 +02:00
Paulus Schoutsen 355005114b Update translations 2018-10-21 20:34:28 +02:00
Paulus Schoutsen a5b9f5040f Update translations 2018-10-17 14:12:41 +02:00
Robert Svensson a795093705 UniFi POE control (#17011)
* First commit

* Feature complete?

* Add dependency

* Move setting poe mode logic to library

* Use guard clauses

* Bump requirement to 2

* Simplify saving switches with poe off

* Store and use poe mode

* Fix indentation

* Fix flake8

* Configuration future proofing

* Bump dependency to v3

* Add first test

* Proper use of defaults with config flow (thanks helto)

* Appease hound

* Make sure there can't be duplicate entries of combination host+site

* More tests

* More tests

* 98% coverage of controller

* Fix hound comments

* Config flow step init not necessary

* Use async_current_entries to check if host and site for controller is used

* Remove storing/restoring poe off devices to slim PR

* First batch of switch tests

* More switch tests.

* Small improvements and clean up

* Make tests pass
Don't name device in device registry

* Dont process clients that belong to non-UniFi POE switches

* Allow selection of site from a list in config flow

* Fix double blank lines in method

* Update codeowners
2018-10-16 10:35:35 +02:00