From 92b171187ee648820289da9377f7605ebe237cc1 Mon Sep 17 00:00:00 2001 From: Allen Porter Date: Wed, 3 Nov 2021 23:43:27 -0700 Subject: [PATCH] Update ConfigEntry migration to follow current best practices (#1123) --- docs/config_entries_config_flow_handler.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/config_entries_config_flow_handler.md b/docs/config_entries_config_flow_handler.md index 56342d79..0ec6d30d 100644 --- a/docs/config_entries_config_flow_handler.md +++ b/docs/config_entries_config_flow_handler.md @@ -212,10 +212,9 @@ async def async_migrate_entry(hass, config_entry: ConfigEntry): new = {**config_entry.data} # TODO: modify Config Entry data - - config_entry.data = {**new} config_entry.version = 2 + hass.config_entries.async_update_entry(config_entry, data=new) _LOGGER.info("Migration to version %s successful", config_entry.version)