mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Don't care about DPI entries when looking for clients to be restored from UniFi (#48579)
* DPI switches shouldnt be restored, they're not part of clients to be restored * Only care about Block and POE switch entries
This commit is contained in:
parent
d26d2a8446
commit
6ce96dcb63
@ -29,6 +29,7 @@ import async_timeout
|
||||
from homeassistant.components.device_tracker import DOMAIN as TRACKER_DOMAIN
|
||||
from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN
|
||||
from homeassistant.components.switch import DOMAIN as SWITCH_DOMAIN
|
||||
from homeassistant.components.unifi.switch import BLOCK_SWITCH, POE_SWITCH
|
||||
from homeassistant.config_entries import SOURCE_REAUTH
|
||||
from homeassistant.const import (
|
||||
CONF_HOST,
|
||||
@ -347,7 +348,10 @@ class UniFiController:
|
||||
):
|
||||
if entry.domain == TRACKER_DOMAIN:
|
||||
mac = entry.unique_id.split("-", 1)[0]
|
||||
elif entry.domain == SWITCH_DOMAIN:
|
||||
elif entry.domain == SWITCH_DOMAIN and (
|
||||
entry.unique_id.startswith(BLOCK_SWITCH)
|
||||
or entry.unique_id.startswith(POE_SWITCH)
|
||||
):
|
||||
mac = entry.unique_id.split("-", 1)[1]
|
||||
else:
|
||||
continue
|
||||
|
Loading…
x
Reference in New Issue
Block a user