Migrate xbox to use modern device registry API when moving devices

This commit is contained in:
Erik
2026-08-03 08:43:53 +02:00
parent e5aa33502c
commit 2cfa1f1b4a
+2 -3
View File
@@ -165,9 +165,8 @@ async def async_migrate_entry(hass: HomeAssistant, entry: XboxConfigEntry) -> bo
):
dev_reg.async_update_device(
device.id,
remove_config_entry_id=entry.entry_id,
add_config_subentry_id=subentry.subentry_id,
add_config_entry_id=entry.entry_id,
new_config_entry_id=entry.entry_id,
new_config_subentry_id=subentry.subentry_id,
)
if device := dev_reg.async_get_device_by_identifier(
(DOMAIN, "xbox_live"), entry.entry_id