Skip to content

Commit 389dfcd

Browse files
Fix config migrate warning
1 parent c83b62e commit 389dfcd

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

custom_components/battery_notes/__init__.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ async def async_remove_entry(hass: HomeAssistant, config_entry: ConfigEntry) ->
225225
)
226226

227227

228-
async def async_migrate_entry(hass, config_entry: ConfigEntry):
228+
async def async_migrate_entry(hass: HomeAssistant, config_entry: ConfigEntry):
229229
"""Migrate old config."""
230230
new_version = CONFIG_VERSION
231231

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

252-
config_entry.version = new_version
253-
254252
hass.config_entries.async_update_entry(
255-
config_entry, title=config_entry.title, data=new_data
253+
config_entry, version=new_version, title=config_entry.title, data=new_data
256254
)
257255

258256
_LOGGER.info(

0 commit comments

Comments
 (0)