Add conf_key check for LCN platform load (#21354)

pull/21363/head
Andre Lengwenus 2019-02-23 15:58:18 +01:00 committed by Martin Hjelmare
parent 197303b63e
commit f20195ba75
1 changed files with 4 additions and 4 deletions

View File

@ -184,10 +184,10 @@ async def async_setup(hass, config):
for component, conf_key in (('cover', CONF_COVERS),
('light', CONF_LIGHTS),
('switch', CONF_SWITCHES)):
hass.async_create_task(
async_load_platform(hass, component, DOMAIN,
config[DOMAIN][conf_key], config))
if conf_key in config[DOMAIN]:
hass.async_create_task(
async_load_platform(hass, component, DOMAIN,
config[DOMAIN][conf_key], config))
return True