diff --git a/custom_components/tuya_local/switch.py b/custom_components/tuya_local/switch.py index 8750f5dc2a..667625e075 100644 --- a/custom_components/tuya_local/switch.py +++ b/custom_components/tuya_local/switch.py @@ -45,7 +45,7 @@ def device_class(self): dclass = self._config.device_class try: return SwitchDeviceClass(dclass) - except: + except ValueError: if dclass: _LOGGER.warning( "%s/%s: Unrecognised switch device class of %s ignored",