Skip to content

Commit

Permalink
ruff finding
Browse files Browse the repository at this point in the history
  • Loading branch information
sfstar committed Feb 28, 2025
1 parent 1382cbb commit bdcd67e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions custom_components/victron/hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,9 @@ def read_holding_registers(self, unit, address, count):
"""Read holding registers."""
try:
slave = int(unit) if unit else 1
result = self._client.read_holding_registers(
return self._client.read_holding_registers(
address=address, count=count, slave=slave
)
return result
except BrokenPipeError:
self.__handle_broken_pipe_error()
return None
Expand Down

0 comments on commit bdcd67e

Please sign in to comment.