From ca6f18fba15f49169aded9304e9e723740598ea3 Mon Sep 17 00:00:00 2001 From: LKuemmel Date: Fri, 11 Aug 2023 07:16:22 +0200 Subject: [PATCH] fix sungrow --- packages/modules/devices/sungrow/device.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/modules/devices/sungrow/device.py b/packages/modules/devices/sungrow/device.py index f00c00d5d..be3de2246 100644 --- a/packages/modules/devices/sungrow/device.py +++ b/packages/modules/devices/sungrow/device.py @@ -95,12 +95,12 @@ def read_legacy(ip_address: str, dev.update() -def read_legacy_bat(ip_address: str, modbus_id: int): - read_legacy(ip_address, modbus_id, bat.component_descriptor.configuration_factory(id=None)) +def read_legacy_bat(ip_address: str, port: int, modbus_id: int): + read_legacy(ip_address, port, modbus_id, bat.component_descriptor.configuration_factory(id=None)) -def read_legacy_counter(ip_address: str, modbus_id: int, version: int): - read_legacy(ip_address, modbus_id, counter.component_descriptor.configuration_factory( +def read_legacy_counter(ip_address: str, port: int, modbus_id: int, version: int): + read_legacy(ip_address, port, modbus_id, counter.component_descriptor.configuration_factory( id=None, configuration=SungrowCounterConfiguration(version=Version(version))))