Commit Graph

23 Commits (87c36d6b6b8e6d68a1777eeaf97588ff696f9fb4)

Author SHA1 Message Date
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
J. Nick Koston b68c287ff1
Add SSDP discovery to unifi (#45364) 2021-01-21 11:03:54 -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
Jason Hunter 5a4c1dbcc4
Add DPI Restriction switch to UniFi integration (#42499)
* initial implementation for controlling DPI restrictions

* address PR review comments and add DataUpdateCoordinator

* fix existing tests against new lib version

* add tests for DPI switches

* bump aiounifi

* listen to events instead of polling

* fix tests

* remove useless test

* bump aiounifi

* rename device to UniFi Controller per PR feedback
2020-11-03 08:36:37 +01:00
springstan c00915a6a7
Add ssl and verify_ssl to base strings for config flows (#40944)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-10-03 16:06:45 +02:00
timkoers 46b86f4a2f
Add UniFi Uptime sensor (#40058)
* Added UniFi Uptime sensor

Added the UniFi uptime data as a sensor. Untested.

* Update sensor.py

Updated code as a result of the tests.

* Changed timestamp format and device class

Converted state to iso timestamp and changed device class to DEVICE_CLASS_TIMESTAMP.

* Updated unit of measurement to None

* Added import

* Update homeassistant/components/unifi/sensor.py

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

* Removed whitespace

* Added the uptime sensors option to the config flow

* All the unit tests should be there now

* Whoops

* Fixed translation

* Properly formatted the code

* Flake8 really has angel eyes

* Black should also be satisfied now

* Should have satisfied all static code analysis tools

* Fixed add uptime sensor function

* Fixed overintendation

* Fixed unit tests

* Made a spelling mistake during editing of unit tests

* Test verifies if utc time is correct

* Converted to iso format

* Converted unit test to iso format

* Unit test sensor json had the wrong uptime name

* Added options_updated handler

* Fixed remove sensors unit test

* Update homeassistant/components/unifi/sensor.py

Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>

* Update homeassistant/components/unifi/sensor.py

Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>

* Update test_device_tracker.py

Removed uptime from the devices

* Fixed black formatting issue

* I think the code coverage should be good now

* Trying to add the sensors again

* Using signals to hopefully trigger the controller to add them again

* Forgot import

* Sorted components

* fixed isort comments

* Removed CLASS and DEVICE_CLASS

* Added TYPE again

* Removed double underscores

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
2020-09-18 19:33:37 +02:00
Robert Svensson 064321c21e
UniFi - Remove unused string definition, pointed out by Bram (#35678) 2020-05-15 23:43:00 +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 2f5c4b81ba
UniFi - Use more common strings for config flow (#35399)
* Use more common strings for config flow

* Remove unused strings
2020-05-09 22:22:53 +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 72e7beeb76
UniFi - Add simple options flow (#34990) 2020-04-30 22:33:22 -07: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 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
Paulus Schoutsen 55dfca7467
Drop title from translations if brand name (#34306) 2020-04-16 12:52:53 -07:00
Paulus Schoutsen 1ffc3a00e7
Add translations check script (#34272) 2020-04-15 16:58:20 -07:00
Paulus Schoutsen d36204a968
Move title translation to root (#33850) 2020-04-15 09:41:18 -07: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
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 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 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 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 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