Skip to content

Commit

Permalink
Update __init__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
wills106 authored Jan 5, 2025
1 parent 38828b4 commit 26bf1ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/solax_modbus/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,10 @@ def __init__(
)
elif interface == "tcp":
if tcp_type == "rtu":
self._client = AsyncModbusTcpClient(host=host, port=port, timeout=5, framer=ModbusRtuFramer, retries=6)
self._client = AsyncModbusTcpClient(host=host, port=port, timeout=5, framer=FramerType.Rtu, retries=6)
elif tcp_type == "ascii":
self._client = AsyncModbusTcpClient(
host=host, port=port, timeout=5, framer=ModbusAsciiFramer, retries=6
host=host, port=port, timeout=5, framer=FramerType.Ascii, retries=6
)
else:
self._client = AsyncModbusTcpClient(host=host, port=port, timeout=5, retries=6)
Expand Down

0 comments on commit 26bf1ab

Please sign in to comment.