From 00a319cd3daaea7aae6078076172bfaf8805e05f Mon Sep 17 00:00:00 2001 From: Etienne Goossens Date: Sun, 5 Jan 2025 13:55:48 +0100 Subject: [PATCH] Updated FramerType to match the new version of pymodbus Changes the reference to enum FramerType to use capitalized naming in the new version of PyModbus --- 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 364778d6..62f8cb6a 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=FramerType.Rtu, 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=FramerType.Ascii, 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)