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
This commit is contained in:
Robert Svensson 2020-05-04 19:29:49 +02:00 committed by GitHub
parent dbf383f713
commit c5ce95ff06
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 312 additions and 109 deletions

View file

@ -1,7 +1,7 @@
"""UniFi sensor platform tests."""
from copy import deepcopy
from aiounifi.controller import MESSAGE_CLIENT_REMOVED
from aiounifi.controller import MESSAGE_CLIENT, MESSAGE_CLIENT_REMOVED
from aiounifi.websocket import SIGNAL_DATA
from homeassistant.components.device_tracker import DOMAIN as TRACKER_DOMAIN
@ -99,7 +99,7 @@ async def test_sensors(hass):
clients[1]["rx_bytes"] = 2345000000
clients[1]["tx_bytes"] = 6789000000
event = {"meta": {"message": "sta:sync"}, "data": clients}
event = {"meta": {"message": MESSAGE_CLIENT}, "data": clients}
controller.api.message_handler(event)
await hass.async_block_till_done()