Commit Graph

69 Commits (0146f35687216e4aa8c28b551f90e1c4d5715f2f)

Author SHA1 Message Date
Robert Svensson a3865fb383
UniFi - Increase time to mark UniFi devices as away (#36366) 2020-06-02 10:35:27 +02:00
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
Robert Svensson c71b6c8a71
UniFi - Update device registry after device has been upgraded (#35430)
* Update device registry if received event saying device has been updated

* Make sure event was the last updated
2020-05-10 17:14:45 +02:00
Robert Svensson c8deae6445
UniFi - Make clients proper push based (#35273)
* Improve client tracker to be more comprehensible and streamlined
Improve block switches
Improve tests

* Small clean up

* Add descriptions on ssid test

* Improve test

* Make polling default off, only POE clients left to verify

* Minor improvements

* On removal cancel scheduled updates

* POE works without polling now

* Combine else and if to an elif
2020-05-08 22:19:27 +02:00
Robert Svensson c19b222d5a
UniFi - Catch wlan_override without name key (#35366) 2020-05-08 09:51:10 -07:00
Robert Svensson 53f64bae09
UniFi - Make devices proper push based (#35152)
* Make devices proper push based

* Improve tests

* Bump dependency to v21
Update fix from #35295 to use library
2020-05-07 09:58:04 +02:00
Robert Svensson 5218b23fce
UniFi - Support SSID filter of SSIDs from access points with extra configuration (#35295) 2020-05-06 15:35:04 -07:00
Robert Svensson c5ce95ff06
UniFi - Improve signalling and handling of adding new entities (#34925)
* Change signalling and handling of adding devices

* Bump aiounifi to v19
Use the proper variable for roamradio
2020-05-04 19:29:49 +02:00
Robert Svensson a2048b4c7a
UniFi - Catch controllers running on UniFi OS that don't have a local user configured (#35060) 2020-05-02 14:16:45 -07:00
Robert Svensson 221b07595f
UniFi - Add support for 2.4/5 GHz separated SSIDs (#35062) 2020-05-02 14:16:18 -07:00
Robert Svensson 72e7beeb76
UniFi - Add simple options flow (#34990) 2020-04-30 22:33:22 -07:00
Paulus Schoutsen ec47216388
Use built-in test helpers on 3.8 (#34901) 2020-04-30 13:29:50 -07:00
Robert Svensson b578a76efa
UniFi - Move some preloading of unavailable clients earlier in setup phase (#34599)
Improve readability of setting up switch platform
2020-04-23 21:29:38 +02: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 193e9bec97
UniFi - Simplify config option of block clients to just a multi select drop down (#34514) 2020-04-21 20:45:48 -07: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 465eeab553
UniFi - Allow tracking of clients connected to third party APs (#34067)
* Allow disable wired bug work around

* Move small improvements from closed PR #34065

* Fix failing test

* Add new test

* Some extra logging

* Harmonize log outputs

* Add config flow string

* Fix Balloobs comments
2020-04-17 08:39:01 +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 314bc07cee
UniFi - Make POE control switches configurable (#32781)
* Allow control whether POE switches are to be created or not

* Fix options flow and test
2020-04-02 17:53:33 +02:00
Paulus Schoutsen 5123baba3f
Fix zone config (#32963)
* Fix zone config

* Add zone as dependency again to device tracker

* Fix tests
2020-03-18 18:14:25 -07:00
Paulus Schoutsen abd1909e2b
Make zone dependency of device tracker an after dep (#32880)
* Make zone dependency of device tracker an after dep

* Fix test
2020-03-17 06:59:39 -04:00
Robert Svensson fa63dc1e25
UniFi - Improve expected SSID filter behavior (#32785)
* Improve expected ssid filter behavior

* Fix tests
2020-03-16 12:10:45 +01: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
Jens Nistler ecd076c5e4
Mark clients away if they have never been seen. (#32222) 2020-02-27 11:50:34 -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 4cac0443e2
UniFi - Change handling of updated options (#31762)
* Change handling of updated options

* Add tests
2020-02-12 16:15:08 -08: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 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
Paulus Schoutsen 9aa02e35a7
Entity Component to no longer generate automatic groups (#23789) 2020-01-07 17:30:53 +01:00
Robert Svensson 2b26af89df Improve tests based on Martins feedback from Axis improve tests (#30442) 2020-01-03 12:23:17 -06:00
Jc2k fdfedd086b Rework FlowManager to use inheritance (#30133)
* Pull async_finish_flow/async_create_flow out of ConfigEntries

* Towards refactoring

* mypy fixes

* Mark Flow manager with abc.* annotations

* Flake8 fixes

* Mypy fixes

* Blacken data_entry_flow

* Blacken longer signatures caused by mypy changes

* test fixes

* Test fixes

* Fix typo

* Avoid protected member lint (W0212) in config_entries

* More protected member fixes

* Missing await
2020-01-03 11:52:01 +01:00
Robert Svensson 41d2d1f309 Handle wired bug on restart (#30276) 2019-12-30 12:40:52 -06:00
Robert Svensson 99328bd4c1
UniFi - honor detection time when UniFi wire bug happens (#29820) 2019-12-10 20:05:18 +01:00
Bas Nijholt 2da3848f89 Sort imports according to PEP8 for unifi (#29656) 2019-12-09 12:19:33 +01:00
Robert Svensson d345b58ce6 Improve UniFi config flow tests and add options flow test (#27340) 2019-10-08 14:44:33 -07: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 a8567a746b
UniFi - Improve switch tests (#27200)
* Continue rewriting tests for UniFi
2019-10-05 16:16:08 +02:00
Robert Svensson 565302ed34 Improve device tracker tests (#27159) 2019-10-03 13:23:25 -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 e2d7a01d65 Remove last of device tracker scanner (#27082) 2019-09-30 21:19:51 -07:00
Robert Svensson 0221d136de Remove support of UniFi device tracker configuration import (#26587) 2019-09-11 13:35:30 -06: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 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
Robert Svensson a2589f56e1 Add system options to config entries (#25926)
* Add system options to config entries

* For feedback

* Follow most of balloobs comments

* Fix balloobs comments

* Improvements

* Fix second round of Balloobs comments

* Fix third round

* Add system options to mock config entry

* Fix integration tests

* Fix the last failing tests

* Fix disabled string

* Fix failing disabled_by tests

* New tests

* Config entry WS API tests

* Fix comments
2019-08-17 21:34:11 -07:00
Robert Svensson ab7db5fbd0
UniFi - Use state to know if device is online (#25876) 2019-08-11 22:40:44 +02:00