Fix migrating huawei_lte entry without recipient (#31522)

This commit is contained in:
Robert Chmielowiec authored and Paulus Schoutsen committed 2020-02-06 11:08:12 -08:00
1 parent 1e81d14822
commit 60c5ef5b34
1 file changed
+1 -1
@@ -510,7 +510,7 @@ async def async_migrate_entry(hass: HomeAssistantType, config_entry: ConfigEntry
"""Migrate config entry to new version."""
if config_entry.version == 1:
options = config_entry.options
recipient = options[CONF_RECIPIENT]
recipient = options.get(CONF_RECIPIENT)
if isinstance(recipient, str):
options[CONF_RECIPIENT] = [x.strip() for x in recipient.split(",")]
config_entry.version = 2