Fix unhandled exception in Ambient PWS config entry (#21278)

This commit is contained in:
Aaron Bach 2019-02-21 13:27:34 -07:00 committed by Paulus Schoutsen
parent e3d29ad26a
commit df5b17d139

View File

@ -263,7 +263,8 @@ async def async_setup_entry(hass, config_entry):
Client( Client(
config_entry.data[CONF_API_KEY], config_entry.data[CONF_API_KEY],
config_entry.data[CONF_APP_KEY], session), config_entry.data[CONF_APP_KEY], session),
hass.data[DOMAIN][DATA_CONFIG].get(CONF_MONITORED_CONDITIONS, [])) hass.data[DOMAIN].get(DATA_CONFIG, {}).get(
CONF_MONITORED_CONDITIONS, []))
hass.loop.create_task(ambient.ws_connect()) hass.loop.create_task(ambient.ws_connect())
hass.data[DOMAIN][DATA_CLIENT][config_entry.entry_id] = ambient hass.data[DOMAIN][DATA_CLIENT][config_entry.entry_id] = ambient
except WebsocketError as err: except WebsocketError as err: