From 395af28a0f85a1c8af284cc9f8a06a9c12099a30 Mon Sep 17 00:00:00 2001 From: Lutz Bender Date: Thu, 9 Jan 2025 07:45:22 +0100 Subject: [PATCH] fix bat power direction --- packages/modules/devices/sungrow/sungrow/bat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/modules/devices/sungrow/sungrow/bat.py b/packages/modules/devices/sungrow/sungrow/bat.py index 14c25212f..32bdd5205 100644 --- a/packages/modules/devices/sungrow/sungrow/bat.py +++ b/packages/modules/devices/sungrow/sungrow/bat.py @@ -32,7 +32,7 @@ def update(self) -> None: soc = int(self.__tcp_client.read_input_registers(13022, ModbusDataType.UINT_16, unit=unit) / 10) if Firmware(self.device_config.configuration.firmware) == Firmware.v2: - bat_power = self.__tcp_client.read_input_registers(13021, ModbusDataType.INT_16, unit=unit) + bat_power = self.__tcp_client.read_input_registers(13021, ModbusDataType.INT_16, unit=unit) * -1 else: bat_power = self.__tcp_client.read_input_registers(13021, ModbusDataType.UINT_16, unit=unit)