Fix detection of DLI sockets in wemo (#112485)

This commit is contained in:
J. Nick Koston 2024-03-05 23:34:18 -10:00 committed by GitHub
parent 72ac2f127f
commit 87a82e0562
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -244,7 +244,7 @@ class DeviceCoordinator(DataUpdateCoordinator[None]): # pylint: disable=hass-en
def _create_device_info(wemo: WeMoDevice) -> DeviceInfo: def _create_device_info(wemo: WeMoDevice) -> DeviceInfo:
"""Create device information. Modify if special device.""" """Create device information. Modify if special device."""
_dev_info = _device_info(wemo) _dev_info = _device_info(wemo)
if wemo.model_name == "DLI emulated Belkin Socket": if wemo.model_name.lower() == "dli emulated belkin socket":
_dev_info[ATTR_CONFIGURATION_URL] = f"http://{wemo.host}" _dev_info[ATTR_CONFIGURATION_URL] = f"http://{wemo.host}"
_dev_info[ATTR_IDENTIFIERS] = {(DOMAIN, wemo.serial_number[:-1])} _dev_info[ATTR_IDENTIFIERS] = {(DOMAIN, wemo.serial_number[:-1])}
return _dev_info return _dev_info