Skip to content

Commit

Permalink
Migrate utility_meter to use async_update_entry to alter config entri…
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Feb 12, 2024
1 parent 4d1e3cd commit 332db50
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions homeassistant/components/utility_meter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 332db50

Please sign in to comment.