Revert "Add ability to ignore devices for UniFi Protect" (#77916)

This commit is contained in:
Franck Nijhof 2022-09-06 20:13:01 +02:00 committed by GitHub
parent 5632e33426
commit dbb556a812
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 75 additions and 258 deletions

View file

@ -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)}
)