Revert "Add ability to ignore devices for UniFi Protect" (#77916)
This commit is contained in:
parent
5632e33426
commit
dbb556a812
12 changed files with 75 additions and 258 deletions
|
@ -23,7 +23,7 @@ from pyunifiprotect.test_util.anonymize import random_hex
|
|||
|
||||
from homeassistant.const import Platform
|
||||
from homeassistant.core import HomeAssistant, split_entity_id
|
||||
from homeassistant.helpers import device_registry as dr, entity_registry as er
|
||||
from homeassistant.helpers import entity_registry as er
|
||||
from homeassistant.helpers.entity import EntityDescription
|
||||
import homeassistant.util.dt as dt_util
|
||||
|
||||
|
@ -229,13 +229,3 @@ async def adopt_devices(
|
|||
ufp.ws_msg(mock_msg)
|
||||
|
||||
await hass.async_block_till_done()
|
||||
|
||||
|
||||
def get_device_from_ufp_device(
|
||||
hass: HomeAssistant, device: ProtectAdoptableDeviceModel
|
||||
) -> dr.DeviceEntry | None:
|
||||
"""Return all device by type."""
|
||||
registry = dr.async_get(hass)
|
||||
return registry.async_get_device(
|
||||
identifiers=set(), connections={(dr.CONNECTION_NETWORK_MAC, device.mac)}
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue