Skip to content

Commit bc70959

Browse files
authored
Merge pull request #362 from jacauc/patch-1
Update hub.py to be compatible with PyModbus >=3.10 and HA 2025.9
2 parents afe1180 + d2c7e51 commit bc70959

File tree

1 file changed

+2
-2
lines changed
  • custom_components/victron

1 file changed

+2
-2
lines changed

custom_components/victron/hub.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@ def disconnect(self):
8080
def write_register(self, unit, address, value):
8181
"""Write a register."""
8282
slave = int(unit) if unit else 1
83-
return self._client.write_register(address=address, value=value, slave=slave)
83+
return self._client.write_register(address=address, value=value, device_id=slave)
8484

8585
def read_holding_registers(self, unit, address, count):
8686
"""Read holding registers."""
8787
slave = int(unit) if unit else 1
8888
return self._client.read_holding_registers(
89-
address=address, count=count, slave=slave
89+
address=address, count=count, device_id=slave
9090
)
9191

9292
def calculate_register_count(self, registerInfoDict: OrderedDict):

0 commit comments

Comments
 (0)