diff --git a/custom_components/smartthinq_sensors/wideq/device.py b/custom_components/smartthinq_sensors/wideq/device.py index 3cb05784..fd61d416 100644 --- a/custom_components/smartthinq_sensors/wideq/device.py +++ b/custom_components/smartthinq_sensors/wideq/device.py @@ -875,8 +875,7 @@ def _get_control(self, key): return value def init_device_info(self): - if self._device_info.platform_type == PlatformType.UNKNOWN: - return False + """Initialize the information for the device""" if self._model_info is None: if self._model_data is None: diff --git a/custom_components/smartthinq_sensors/wideq/factory.py b/custom_components/smartthinq_sensors/wideq/factory.py index 2d5ee91c..1d0274d2 100644 --- a/custom_components/smartthinq_sensors/wideq/factory.py +++ b/custom_components/smartthinq_sensors/wideq/factory.py @@ -7,15 +7,24 @@ from .styler import StylerDevice from .washer import WasherDevice -from .device import UNIT_TEMP_CELSIUS, DeviceInfo, DeviceType, NetworkType +from .device import( + UNIT_TEMP_CELSIUS, + DeviceInfo, + DeviceType, + NetworkType, + PlatformType, +) def get_lge_device(client, device: DeviceInfo, temp_unit=UNIT_TEMP_CELSIUS): """Return a device based on the device type.""" device_type = device.type + platform_type = device.platform_type network_type = device.network_type + if platform_type == PlatformType.UNKNOWN: + return None if network_type != NetworkType.WIFI: return None