Skip to content

Commit

Permalink
Fix config migrate warning
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-codechimp committed Aug 29, 2024
1 parent c83b62e commit 389dfcd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions custom_components/battery_notes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ async def async_remove_entry(hass: HomeAssistant, config_entry: ConfigEntry) ->
)


async def async_migrate_entry(hass, config_entry: ConfigEntry):
async def async_migrate_entry(hass: HomeAssistant, config_entry: ConfigEntry):
"""Migrate old config."""
new_version = CONFIG_VERSION

Expand All @@ -249,10 +249,8 @@ async def async_migrate_entry(hass, config_entry: ConfigEntry):
new_data[CONF_BATTERY_TYPE] = _type
new_data[CONF_BATTERY_QUANTITY] = _qty

config_entry.version = new_version

hass.config_entries.async_update_entry(
config_entry, title=config_entry.title, data=new_data
config_entry, version=new_version, title=config_entry.title, data=new_data
)

_LOGGER.info(
Expand Down

0 comments on commit 389dfcd

Please sign in to comment.