diff --git a/custom_components/enet/device.py b/custom_components/enet/device.py index bb19944..dfe9eb1 100644 --- a/custom_components/enet/device.py +++ b/custom_components/enet/device.py @@ -10,7 +10,7 @@ async def async_setup_devices(coordinator): - """Manage setup of devices from Hue devices.""" + """Manage setup of devices from Enet devices.""" entry = coordinator.config_entry hass = coordinator.hass dev_reg = device_registry.async_get(hass) @@ -22,8 +22,7 @@ def add_device(enet_device): params = enet_device.get_device_info() return dev_reg.async_get_or_create(config_entry_id=entry.entry_id, **params) - # create/update all current devices found in controller + # create/update all current devices found in controller ensuring devices that only generate events also gets registered for enet_device in coordinator.hub.devices: - if all([not isinstance(c, ActuatorChannel) for c in enet_device.channels]): - hass_device_entry = add_device(enet_device) - enet_device.hass_device_entry = hass_device_entry + hass_device_entry = add_device(enet_device) + enet_device.hass_device_entry = hass_device_entry