Skip to content

Commit

Permalink
fix: issue while migration forgot to fetch new data
Browse files Browse the repository at this point in the history
  • Loading branch information
fwmarcel committed Mar 27, 2024
1 parent 9258608 commit 4057189
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion custom_components/divera/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,14 @@ async def async_migrate_entry(hass, config_entry: ConfigEntry):
new[CONF_ACCESSKEY] = accesskey

fullname: str = new[CONF_NAME]
new.pop(CONF_API_KEY)
new.pop(CONF_NAME)
new[CONF_FULLNAME] = fullname

divera_data: DiveraData = DiveraData(hass, accesskey)
await divera_data.async_update()
if not divera_data.success:
_LOGGER.debug("Migration to version %s.%s failed.", config_entry.version, config_entry.minor_version)
return False
ucr_id = divera_data.get_active_ucr()
new[CONF_UCRS] = [ucr_id]
new[CONF_CLUSTERS] = {}
Expand Down

0 comments on commit 4057189

Please sign in to comment.