Skip to content

Commit

Permalink
Merge pull request #1078 from LKuemmel/powerdog
Browse files Browse the repository at this point in the history
fix powerdog
  • Loading branch information
LKuemmel authored Aug 4, 2023
2 parents 71b93de + bddf740 commit 25e6664
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/modules/devices/powerdog/counter.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ def __init__(self,
def update(self, inverter_power: float):
with self.__tcp_client:
if self.component_config.configuration.position_evu:
power = self.__tcp_client.read_input_registers(40000, ModbusDataType.INT_32, unit=1) * -1
export_power = self.__tcp_client.read_input_registers(40000, ModbusDataType.INT_32, unit=1) * -1
import_power = self.__tcp_client.read_input_registers(40024, ModbusDataType.INT_32, unit=1)
power = export_power + import_power
else:
home_consumption = self.__tcp_client.read_input_registers(40026, ModbusDataType.INT_32, unit=1)
power = home_consumption + inverter_power
Expand Down

0 comments on commit 25e6664

Please sign in to comment.