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>
This commit is contained in:
Robert SvenssonandMartin Hjelmare authored and GitHub committed 2020-01-31 20:23:25 +01:00
1 parent 06c8e53323
commit 958a867c11
14 files changed
+296 -377

No files matched your search

+3 -1
View File
@@ -1,7 +1,7 @@
"""Support for devices connected to UniFi POE."""
import voluptuous as vol
from homeassistant.const import CONF_HOST
from homeassistant.const import CONF_HOST, EVENT_HOMEASSISTANT_STOP
from homeassistant.core import callback
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC
@@ -96,6 +96,8 @@ async def async_setup_entry(hass, config_entry):
# sw_version=config.raw['swversion'],
)
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, controller.shutdown)
return True