Fix migrating huawei_lte entry without recipient (#31522)

This commit is contained in:
Robert Chmielowiec authored and GitHub committed 2020-02-06 16:53:16 +02:00
1 parent d3e99f13dd
commit 24e9a638d5
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