* Add Traffic Rule switches to UniFi Network
* Retrieve Fix unifi traffic rule switches
Poll for traffic rule updates; have immediate feedback in the UI for modifying traffic rules
* Remove default values for unifi entity; Remove unnecessary code
* Begin updating traffic rule unit tests
* For the mock get request, allow for meta and data properties to not be appended to support v2 api requests
Fix traffic rule unit tests;
* inspect path to determine json response instead of passing an argument
* Remove entity id parameter from tests; remove unused code; rename traffic rule unique ID prefix
* Remove parameter with default.
* More code removal;
* Rename copy/paste variable; remove commented code; remove duplicate default code
---------
Co-authored-by: ViViDboarder <ViViDboarder@gmail.com>
* Make sure all mock_device_registry are used with usefixtuers
* Make sure to use name with fixtures and rename functions to start with fixture_
* Streamline config_entry_setup
* Type all *_payload
* Mark @pytest.mark.usefixtures("mock_default_requests")
* Clean up unnecessary newlines after docstring
Fix unifi test_tracked_clients client
This test relied on the sensor platform getting set up and creating
the device before the device_tracker platform was setup since the
device_tracker platform will disable the entity because there is
not matching device entry for it via
4ee6735cbb/homeassistant/components/device_tracker/config_entry.py (L336)
There is no guarantee the sensor platform will get set up before
the device tracker platform so the test was subject to a race
where it would fail if the device tracker platform was setup first
* Renames various usages of UniFi to better indentify only UniFi Network
* Apply suggestions from code review
Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
* Missed renames
* Updates more locations
* Removes instances of application/controller
* Missed a spot
* Updates all UniFi Controller instances
* Fixes typo
* Reverts changes to translations
Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
* 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