From 26bf1abb3bb430c9b87e7d976f5ec03dfdfa6a17 Mon Sep 17 00:00:00 2001 From: wills106 Date: Sun, 5 Jan 2025 10:33:27 +0000 Subject: [PATCH] Update __init__.py --- custom_components/solax_modbus/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/solax_modbus/__init__.py b/custom_components/solax_modbus/__init__.py index 8ce442b3..c2c3e754 100644 --- a/custom_components/solax_modbus/__init__.py +++ b/custom_components/solax_modbus/__init__.py @@ -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)