Skip to content

Commit

Permalink
fix powerdog
Browse files Browse the repository at this point in the history
  • Loading branch information
LKuemmel committed Aug 4, 2023
1 parent 71b93de commit bddf740
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 bddf740

Please sign in to comment.