Commit Graph

25 Commits (3d308e0599a4c968bf19853ff6e33302f6cc623a)

Author SHA1 Message Date
Robert Svensson 785b8d2bd1
UniFi - Sites don't declare role on UniFiOS 1.7.0 beta (#35555)
* New way to identify role, compatible with standalone controller or as part of unifios

* Remove error

* Bump dependency to v22

* Remove unused import
2020-05-13 00:37:16 +02:00
Paulus Schoutsen ec47216388
Use built-in test helpers on 3.8 (#34901) 2020-04-30 13:29:50 -07:00
Robert Svensson c3689d7416
UniFi - Store controller in config_entry.entry_id (#34553)
* Store controller in config_entry.entry_id

* Clean up imports
2020-04-23 16:48:24 +02:00
Robert Svensson e5a861dc90
UniFi - refactor entity management (#34367)
* Move removal of sensor entities into a base class

* Fix martins comments on sensors

* Reflect sensor changes on device_tracker platform

* Reflect sensor changes on switch platform

* Improve layering

* Make sure to clean up entity and device registry when removing entities

* Fix martins comments
2020-04-19 21:30:06 +02:00
Robert Svensson 374fe47809
UniFi - Support automatic removal of clients (#34307) 2020-04-16 15:08:53 -07:00
Robert Svensson 15ab63a4c2
UniFi: Add UDM/P (UniFi OS) support (#33766)
* Fix get_controller and all tests:wq

* Bump dependency to v16
2020-04-08 23:19:39 +02:00
Robert Svensson 374a8157e7
Remove manual configuration support (#32699) 2020-03-12 11:56:50 +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 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
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
Christian Clauss df7d2b3aeb
Fix typos found by codespell (#31243)
* Fix typos found by codespell

* Fix typos found by codespell

* codespell: Furture  ==> Future

* Update test_config_flow.py

* Update __init__.py

* Spellcheck: successfull  ==> successful

* Codespell: unsuccesful  ==> unsuccessful

* Codespell: cant  ==> can't

* Codespell: firware ==> firmware

* Codespell: mimick  ==> mimic
2020-01-31 08:33:00 -08:00
Robert Svensson 2b26af89df Improve tests based on Martins feedback from Axis improve tests (#30442) 2020-01-03 12:23:17 -06:00
Robert Svensson 41d2d1f309 Handle wired bug on restart (#30276) 2019-12-30 12:40:52 -06:00
Bas Nijholt 2da3848f89 Sort imports according to PEP8 for unifi (#29656) 2019-12-09 12:19:33 +01: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
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
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
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 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
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07: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 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
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
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