Migrate utility_meter to use async_update_entry to alter config entries (#110394)
This commit is contained in:
parent
4d1e3cdf49
commit
332db5093f
1 changed files with 1 additions and 2 deletions
|
@ -266,8 +266,7 @@ async def async_migrate_entry(hass: HomeAssistant, config_entry: ConfigEntry) ->
|
|||
if config_entry.version == 1:
|
||||
new = {**config_entry.options}
|
||||
new[CONF_METER_PERIODICALLY_RESETTING] = True
|
||||
config_entry.version = 2
|
||||
hass.config_entries.async_update_entry(config_entry, options=new)
|
||||
hass.config_entries.async_update_entry(config_entry, options=new, version=2)
|
||||
|
||||
_LOGGER.info("Migration to version %s successful", config_entry.version)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue