Fix clear config entry from registry in Samsung TV migration (#72004)
* Fix clear config entry from device registry * Fix clear config entry from entity registry
This commit is contained in:
parent
c67bbd06d4
commit
cba2fda93d
1 changed files with 2 additions and 2 deletions
|
@ -314,10 +314,10 @@ async def async_migrate_entry(hass: HomeAssistant, config_entry: ConfigEntry) ->
|
|||
# 1 -> 2: Unique ID format changed, so delete and re-import:
|
||||
if version == 1:
|
||||
dev_reg = await hass.helpers.device_registry.async_get_registry()
|
||||
dev_reg.async_clear_config_entry(config_entry)
|
||||
dev_reg.async_clear_config_entry(config_entry.entry_id)
|
||||
|
||||
en_reg = await hass.helpers.entity_registry.async_get_registry()
|
||||
en_reg.async_clear_config_entry(config_entry)
|
||||
en_reg.async_clear_config_entry(config_entry.entry_id)
|
||||
|
||||
version = config_entry.version = 2
|
||||
hass.config_entries.async_update_entry(config_entry)
|
||||
|
|
Loading…
Add table
Reference in a new issue