diff --git a/custom_components/vesync/__init__.py b/custom_components/vesync/__init__.py index 46689f1..fa66779 100644 --- a/custom_components/vesync/__init__.py +++ b/custom_components/vesync/__init__.py @@ -62,7 +62,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b for p, vs_p in PLATFORMS.items(): hass.data[DOMAIN][config_entry.entry_id][vs_p] = [] - if device_dict[VS_SWITCHES]: + if device_dict[vs_p]: hass.data[DOMAIN][config_entry.entry_id][vs_p].extend(device_dict[vs_p]) hass.async_create_task(forward_setup(config_entry, p))