Cleanup unifiprotect discovery name (#64389)
This commit is contained in:
parent
9e33a3014c
commit
8aec26d105
4 changed files with 81 additions and 8 deletions
|
@ -19,6 +19,7 @@ from homeassistant.helpers.service import async_extract_referenced_entity_ids
|
|||
|
||||
from .const import ATTR_MESSAGE, DOMAIN
|
||||
from .data import ProtectData
|
||||
from .utils import _async_unifi_mac_from_hass
|
||||
|
||||
SERVICE_ADD_DOORBELL_TEXT = "add_doorbell_text"
|
||||
SERVICE_REMOVE_DOORBELL_TEXT = "remove_doorbell_text"
|
||||
|
@ -48,12 +49,6 @@ def _async_all_ufp_instances(hass: HomeAssistant) -> list[ProtectApiClient]:
|
|||
]
|
||||
|
||||
|
||||
@callback
|
||||
def _async_unifi_mac_from_hass(mac: str) -> str:
|
||||
# MAC addresses in UFP are always caps
|
||||
return mac.replace(":", "").upper()
|
||||
|
||||
|
||||
@callback
|
||||
def _async_get_macs_for_device(device_entry: dr.DeviceEntry) -> list[str]:
|
||||
return [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue