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 GitHub
parent a2877c4ea0
commit d0e88d9628
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -263,7 +263,8 @@ async def async_setup_entry(hass, config_entry):
Client(
config_entry.data[CONF_API_KEY],
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.data[DOMAIN][DATA_CLIENT][config_entry.entry_id] = ambient
except WebsocketError as err: