|
@@ -45,7 +45,7 @@ class TuyaLocalSwitch(TuyaLocalEntity, SwitchEntity):
|
|
|
dclass = self._config.device_class
|
|
dclass = self._config.device_class
|
|
|
try:
|
|
try:
|
|
|
return SwitchDeviceClass(dclass)
|
|
return SwitchDeviceClass(dclass)
|
|
|
- except:
|
|
|
|
|
|
|
+ except ValueError:
|
|
|
if dclass:
|
|
if dclass:
|
|
|
_LOGGER.warning(
|
|
_LOGGER.warning(
|
|
|
"%s/%s: Unrecognised switch device class of %s ignored",
|
|
"%s/%s: Unrecognised switch device class of %s ignored",
|