diff --git a/homeassistant/components/vesync/light.py b/homeassistant/components/vesync/light.py index 53dfdc5f0a9..b98c87e5a7f 100644 --- a/homeassistant/components/vesync/light.py +++ b/homeassistant/components/vesync/light.py @@ -33,23 +33,22 @@ async def async_setup_entry(hass, config_entry, async_add_entities): hass.data[DOMAIN][VS_DISPATCHERS].append(disp) _async_setup_entities(hass.data[DOMAIN][VS_LIGHTS], async_add_entities) - return True @callback def _async_setup_entities(devices, async_add_entities): """Check if device is online and add entity.""" - dev_list = [] + entities = [] for dev in devices: if DEV_TYPE_TO_HA.get(dev.device_type) == "light": - dev_list.append(VeSyncDimmerHA(dev)) + entities.append(VeSyncDimmerHA(dev)) else: _LOGGER.debug( "%s - Unknown device type - %s", dev.device_name, dev.device_type ) continue - async_add_entities(dev_list, update_before_add=True) + async_add_entities(entities, update_before_add=True) class VeSyncDimmerHA(VeSyncDevice, LightEntity):