File tree Expand file tree Collapse file tree
packages/modules/devices/kostal/kostal_plenticore Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,17 +31,22 @@ def initialize(self) -> None:
3131 self .client : ModbusTcpClient_ = self .kwargs ['client' ]
3232 self .store = get_inverter_value_store (self .component_config .id )
3333 self .fault_state = FaultState (ComponentInfo .from_component_config (self .component_config ))
34- self .sim_counter = SimCounter (self .__device_id , self .component_config .id , prefix = "pv " )
34+ self .sim_counter = SimCounter (self .kwargs [ 'device_id' ] , self .component_config .id , prefix = "Wechselrichter " )
3535
3636 def update (self ) -> None :
3737 power = self .client .read_holding_registers (
3838 575 , ModbusDataType .INT_16 , unit = self .modbus_id , wordorder = self .endianess ) * - 1
3939 exported = self .client .read_holding_registers (
4040 320 , ModbusDataType .FLOAT_32 , unit = self .modbus_id , wordorder = self .endianess )
41+ dc_power = self .client .read_holding_registers (
42+ 1066 , ModbusDataType .FLOAT_32 , unit = self .modbus_id , wordorder = self .endianess ) * - 1
43+ imported , _ = self .sim_counter .sim_count (power )
4144
4245 inverter_state = InverterState (
4346 power = power ,
44- exported = exported
47+ exported = exported ,
48+ dc_power = dc_power ,
49+ imported = imported
4550 )
4651 self .store .set (inverter_state )
4752
You can’t perform that action at this time.
0 commit comments