Skip to content

Commit

Permalink
Don't error on missing hub information, for old Config Flow entries (#…
Browse files Browse the repository at this point in the history
…518)

* Fix #514

* Fix
  • Loading branch information
iMicknl authored Aug 11, 2021
1 parent 19069fc commit 21a2c67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/tahoma/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ async def async_migrate_entry(hass: HomeAssistant, config_entry: ConfigEntry):
}

entry_data = {**config_entry.data}
old_hub = entry_data[CONF_HUB]
entry_data[CONF_HUB] = MAPPING[entry_data[CONF_HUB]]
old_hub = entry_data.get(CONF_HUB, "Somfy TaHoma")
entry_data[CONF_HUB] = MAPPING[old_hub]

_LOGGER.debug("Migrated %s to %s", old_hub, entry_data[CONF_HUB])

Expand Down

0 comments on commit 21a2c67

Please sign in to comment.