Fix migrating huawei_lte entry without recipient (#31522)

pull/31550/head
Robert Chmielowiec 2020-02-06 15:53:16 +01:00 committed by Paulus Schoutsen
parent 1e81d14822
commit 60c5ef5b34
1 changed files with 1 additions and 1 deletions

View File

@ -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