mirror of
https://github.com/home-assistant/core
synced 2024-10-03 01:18:01 +00:00
Migrate openweathermap to use async_update_entry to alter config entries (#110372)
Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
parent
fc1c513f33
commit
a1f0e9015b
|
@ -78,10 +78,11 @@ async def async_migrate_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
mode = FORECAST_MODE_ONECALL_DAILY
|
||||
|
||||
new_data = {**data, CONF_MODE: mode}
|
||||
version = entry.version = CONFIG_FLOW_VERSION
|
||||
config_entries.async_update_entry(entry, data=new_data)
|
||||
config_entries.async_update_entry(
|
||||
entry, data=new_data, version=CONFIG_FLOW_VERSION
|
||||
)
|
||||
|
||||
_LOGGER.info("Migration to version %s successful", version)
|
||||
_LOGGER.info("Migration to version %s successful", CONFIG_FLOW_VERSION)
|
||||
|
||||
return True
|
||||
|
||||
|
|
Loading…
Reference in a new issue