Skip to content

Commit 1abcce6

Browse files
committed
fix sn / modbus base init
1 parent 750a832 commit 1abcce6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

classes/transports/modbus_base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ def init_after_connect(self):
8585
self.update_identifier()
8686

8787
def connect(self):
88-
# Base class connect method - subclasses should override this
89-
# to establish the actual hardware connection
90-
pass
88+
if self.connected and self.first_connect:
89+
self.first_connect = False
90+
self.init_after_connect()
9191

9292
def read_serial_number(self) -> str:
9393
# First try to read "Serial Number" from input registers (for protocols like EG4 v58)

0 commit comments

Comments
 (0)