diff --git a/devices/devices/opcua_device.py b/devices/devices/opcua_device.py
index 4b7cb14496c7f69b567d40f593d2f3bcbad23b7c..d95a8426ed0dc260c0f6eb6d85149e3f5f0ec4ba 100644
--- a/devices/devices/opcua_device.py
+++ b/devices/devices/opcua_device.py
@@ -82,16 +82,6 @@ class opcua_device(hardware_device):
     # overloaded functions
     # --------
 
-    @log_exceptions()
-    def configure_for_off(self):
-        """ user code here. is called when the state is set to OFF """
-        try:
-            # disconnect
-            self.opcua_connection.stop()
-        except Exception as e:
-            self.warn_stream("Exception while stopping OPC ua connection in configure_for_off function: {}. Exception ignored".format(e))
-
-
     @log_exceptions()
     def configure_for_initialise(self):
         """ user code here. is called when the state is set to INIT """
@@ -113,3 +103,13 @@ class opcua_device(hardware_device):
                 self.warn_stream("error while setting the attribute {} read/write function. {}".format(i, e))
 
         self.opcua_connection.start()
+
+    @log_exceptions()
+    def configure_for_off(self):
+        """ user code here. is called when the state is set to OFF """
+        try:
+            # disconnect
+            self.opcua_connection.stop()
+        except Exception as e:
+            self.warn_stream("Exception while stopping OPC ua connection in configure_for_off function: {}. Exception ignored".format(e))
+