From 11596afdfc86a1174e94f2416af1f71a8f1322b4 Mon Sep 17 00:00:00 2001 From: Jonathan Keslin Date: Sat, 27 Mar 2021 09:50:35 -0700 Subject: [PATCH] Address late review of vesync light (#48130) --- homeassistant/components/vesync/light.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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):