mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Migrate utility_meter to use async_update_entry to alter config entries (#110394)
This commit is contained in:
parent
4d1e3cdf49
commit
332db5093f
@ -266,8 +266,7 @@ async def async_migrate_entry(hass: HomeAssistant, config_entry: ConfigEntry) ->
|
|||||||
if config_entry.version == 1:
|
if config_entry.version == 1:
|
||||||
new = {**config_entry.options}
|
new = {**config_entry.options}
|
||||||
new[CONF_METER_PERIODICALLY_RESETTING] = True
|
new[CONF_METER_PERIODICALLY_RESETTING] = True
|
||||||
config_entry.version = 2
|
hass.config_entries.async_update_entry(config_entry, options=new, version=2)
|
||||||
hass.config_entries.async_update_entry(config_entry, options=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