mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Remove unnecessary calls to async_update_entry
from async_migrate_entry
(#90575)
This commit is contained in:
parent
1ca7f0dc6a
commit
3467f4674e
@ -380,7 +380,6 @@ async def async_migrate_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
entry.version = version
|
entry.version = version
|
||||||
hass.config_entries.async_update_entry(entry)
|
|
||||||
|
|
||||||
LOGGER.info("Migration to version %s successful", version)
|
LOGGER.info("Migration to version %s successful", version)
|
||||||
|
|
||||||
|
@ -117,7 +117,6 @@ async def async_migrate_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||||||
en_reg.async_clear_config_entry(entry.entry_id)
|
en_reg.async_clear_config_entry(entry.entry_id)
|
||||||
|
|
||||||
version = entry.version = 2
|
version = entry.version = 2
|
||||||
hass.config_entries.async_update_entry(entry)
|
|
||||||
|
|
||||||
LOGGER.info("Migration to version %s successful", version)
|
LOGGER.info("Migration to version %s successful", version)
|
||||||
|
|
||||||
|
@ -51,7 +51,6 @@ async def async_migrate_entry(hass: HomeAssistant, config_entry: ConfigEntry) ->
|
|||||||
if config_entry.version != 3:
|
if config_entry.version != 3:
|
||||||
# Home Assistant 2023.2
|
# Home Assistant 2023.2
|
||||||
config_entry.version = 3
|
config_entry.version = 3
|
||||||
hass.config_entries.async_update_entry(config_entry)
|
|
||||||
|
|
||||||
_LOGGER.info("Migration to version %s successful", config_entry.version)
|
_LOGGER.info("Migration to version %s successful", config_entry.version)
|
||||||
|
|
||||||
|
@ -67,7 +67,6 @@ async def async_migrate_entry(hass: HomeAssistant, config_entry: ConfigEntry) ->
|
|||||||
await async_migrate_entries(
|
await async_migrate_entries(
|
||||||
hass, config_entry.entry_id, update_entity_unique_id
|
hass, config_entry.entry_id, update_entity_unique_id
|
||||||
)
|
)
|
||||||
hass.config_entries.async_update_entry(config_entry)
|
|
||||||
|
|
||||||
_LOGGER.info("Migration to version %s successful", config_entry.version)
|
_LOGGER.info("Migration to version %s successful", config_entry.version)
|
||||||
|
|
||||||
|
@ -340,7 +340,6 @@ async def async_migrate_entry(hass: HomeAssistant, config_entry: ConfigEntry) ->
|
|||||||
en_reg.async_clear_config_entry(config_entry.entry_id)
|
en_reg.async_clear_config_entry(config_entry.entry_id)
|
||||||
|
|
||||||
version = config_entry.version = 2
|
version = config_entry.version = 2
|
||||||
hass.config_entries.async_update_entry(config_entry)
|
|
||||||
LOGGER.debug("Migration to version %s successful", version)
|
LOGGER.debug("Migration to version %s successful", version)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
@ -210,8 +210,6 @@ async def async_migrate_entry(hass: HomeAssistant, config_entry: ConfigEntry) ->
|
|||||||
await hass.async_add_executor_job(shutil.rmtree, cache_path)
|
await hass.async_add_executor_job(shutil.rmtree, cache_path)
|
||||||
# set the new version
|
# set the new version
|
||||||
config_entry.version = 2
|
config_entry.version = 2
|
||||||
# update the entry
|
|
||||||
hass.config_entries.async_update_entry(config_entry)
|
|
||||||
|
|
||||||
_LOGGER.debug("Migration to version %s successful", config_entry.version)
|
_LOGGER.debug("Migration to version %s successful", config_entry.version)
|
||||||
return True
|
return True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user