diff --git a/devices/clients/opcua_client.py b/devices/clients/opcua_client.py
index dc85a6f4fe645fdb9b7c47e46e2e78a42bbcf41f..ac66f470613194101c41784adea6889003cc1cfb 100644
--- a/devices/clients/opcua_client.py
+++ b/devices/clients/opcua_client.py
@@ -227,6 +227,7 @@ class ProtocolAttribute:
 
         try:
             self.node.set_data_value(opcua.ua.uatypes.Variant(value=value, varianttype=self.ua_type))
+            raise TypeError
         except (TypeError, opcua.ua.uaerrors.BadTypeMismatch) as e:
             # A type conversion went wrong or there is a type mismatch.
             #