Skip to content

Commit 71b3ebd

Browse files
authored
Cleanup reolink update entity migration (home-assistant#153492)
1 parent b87910e commit 71b3ebd

File tree

2 files changed

+1
-29
lines changed

2 files changed

+1
-29
lines changed

homeassistant/components/reolink/__init__.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
device_registry as dr,
2626
entity_registry as er,
2727
)
28-
from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC, format_mac
28+
from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC
2929
from homeassistant.helpers.event import async_call_later
3030
from homeassistant.helpers.typing import ConfigType
3131
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed
@@ -497,16 +497,6 @@ def migrate_entity_ids(
497497
entity_reg = er.async_get(hass)
498498
entities = er.async_entries_for_config_entry(entity_reg, config_entry_id)
499499
for entity in entities:
500-
# Can be removed in HA 2025.1.0
501-
if entity.domain == "update" and entity.unique_id in [
502-
host.unique_id,
503-
format_mac(host.api.mac_address),
504-
]:
505-
entity_reg.async_update_entity(
506-
entity.entity_id, new_unique_id=f"{host.unique_id}_firmware"
507-
)
508-
continue
509-
510500
if host.api.supported(None, "UID") and not entity.unique_id.startswith(
511501
host.unique_id
512502
):

tests/components/reolink/test_init.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -338,24 +338,6 @@ async def test_remove_chime(*args, **key_args):
338338
"support_ch_uid",
339339
),
340340
[
341-
(
342-
TEST_MAC,
343-
f"{TEST_MAC}_firmware",
344-
f"{TEST_MAC}",
345-
f"{TEST_MAC}",
346-
Platform.UPDATE,
347-
False,
348-
False,
349-
),
350-
(
351-
TEST_MAC,
352-
f"{TEST_UID}_firmware",
353-
f"{TEST_MAC}",
354-
f"{TEST_UID}",
355-
Platform.UPDATE,
356-
True,
357-
False,
358-
),
359341
(
360342
f"{TEST_MAC}_0_record_audio",
361343
f"{TEST_UID}_0_record_audio",

0 commit comments

Comments
 (0)