From 9db43b9d7fe36e6217cbc28bf75e5ae7644478f0 Mon Sep 17 00:00:00 2001 From: MartinRinas Date: Wed, 6 Mar 2024 19:04:34 +0000 Subject: [PATCH] read import/export, remove simcount --- packages/modules/devices/sma_sunny_boy/bat_smart_energy.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/modules/devices/sma_sunny_boy/bat_smart_energy.py b/packages/modules/devices/sma_sunny_boy/bat_smart_energy.py index 7b12f92410..ceabd5e766 100644 --- a/packages/modules/devices/sma_sunny_boy/bat_smart_energy.py +++ b/packages/modules/devices/sma_sunny_boy/bat_smart_energy.py @@ -40,7 +40,8 @@ def read(self) -> BatState: power = 0 else: power = current*voltage - imported, exported = self.sim_counter.sim_count(power) + exported = self.__tcp_client.read_holding_registers(31401, ModbusDataType.UINT_64, unit=3) + imported = self.__tcp_client.read_holding_registers(31397, ModbusDataType.UINT_64, unit=3) return BatState( power=power,