* Improve restoring data and better handling when the restore data is empty
Improve readability of some logic related to POE clients
* There is no need to check clients_all in Switch platform
* Add better tests when restoring state
* Port except handling shouldn't be needed anymore
* Walrusify get_last_state
* 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
* A platform is not a component
* Fix dynalite
* SUPPORTED_PLATFORMS --> PLATFORMS
* In tests
* In tests 2
* Fix SmartThings
* Fix ZHA test
* Fix Z-Wave
* Revert Z-Wave
* Use PLATFORMS const in ambient_station
* Fix ihc comment
* Simplify configuration structure by removing the controller key
* Fix flake8
* Fix review comments
* Don't use migrate_entry mechanism to flatten configuration
Keep legacy configuration when creating new entries as well
* Do less inside try statements
* Replace controller id with config entry id since it doesn't serve a purpose anymore
* Improve how controller connection state is communicated in the client and device tracker
Remove the need to disable arguments-differ lint
* Remove broad exception handling from config flow
I'm not sure there ever was a reason for this more than to catch all exceptions
* Replace site string with constant for SSDP title_placeholders
* Unload platforms in the defacto way
* Noone reads the method descriptions
* Improve file descriptions
* 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>
* Discover devices from device_trackers with router sources
* Update homeassistant/components/dhcp/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* fix stop being called on the wrong context
* clean
* move it to base
* cleanup was too agressive
* Update homeassistant/components/dhcp/__init__.py
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
* coverage
* revert legacy changes
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
With 250 clients, there were about 18000 timers updated every
minute. To avoid this, we check which entities should be set
to not_home only once every second.
* 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>
* 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
* 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
* 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