mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-23 01:06:30 +00:00
Update ConfigEntry migration to follow current best practices (#1123)
This commit is contained in:
parent
a23255ff52
commit
92b171187e
@ -213,9 +213,8 @@ async def async_migrate_entry(hass, config_entry: ConfigEntry):
|
|||||||
new = {**config_entry.data}
|
new = {**config_entry.data}
|
||||||
# TODO: modify Config Entry data
|
# TODO: modify Config Entry data
|
||||||
|
|
||||||
config_entry.data = {**new}
|
|
||||||
|
|
||||||
config_entry.version = 2
|
config_entry.version = 2
|
||||||
|
hass.config_entries.async_update_entry(config_entry, data=new)
|
||||||
|
|
||||||
_LOGGER.info("Migration to version %s successful", config_entry.version)
|
_LOGGER.info("Migration to version %s successful", config_entry.version)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user