Refactor UniFi DPI switch entities (#80761)
* Refactor UniFi DPI switch entities * Remove dpi presence from items_added
This commit is contained in:
parent
d75834cd1e
commit
03bf37e12c
3 changed files with 105 additions and 108 deletions
|
@ -9,12 +9,7 @@ from typing import Any
|
|||
|
||||
from aiohttp import CookieJar
|
||||
import aiounifi
|
||||
from aiounifi.interfaces.messages import (
|
||||
DATA_CLIENT_REMOVED,
|
||||
DATA_DPI_GROUP,
|
||||
DATA_DPI_GROUP_REMOVED,
|
||||
DATA_EVENT,
|
||||
)
|
||||
from aiounifi.interfaces.messages import DATA_CLIENT_REMOVED, DATA_EVENT
|
||||
from aiounifi.models.event import EventKey
|
||||
from aiounifi.websocket import WebsocketSignal, WebsocketState
|
||||
import async_timeout
|
||||
|
@ -247,14 +242,6 @@ class UniFiController:
|
|||
self.hass, self.signal_remove, data[DATA_CLIENT_REMOVED]
|
||||
)
|
||||
|
||||
elif DATA_DPI_GROUP in data:
|
||||
async_dispatcher_send(self.hass, self.signal_update)
|
||||
|
||||
elif DATA_DPI_GROUP_REMOVED in data:
|
||||
async_dispatcher_send(
|
||||
self.hass, self.signal_remove, data[DATA_DPI_GROUP_REMOVED]
|
||||
)
|
||||
|
||||
@property
|
||||
def signal_reachable(self) -> str:
|
||||
"""Integration specific event to signal a change in connection status."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue