fix pv input current not showing

This commit is contained in:
djnitehawk 2025-03-14 08:21:16 +05:30
parent 7dd3915159
commit 2d989ad1b1
2 changed files with 1 additions and 2 deletions

View File

@ -41,7 +41,6 @@ public class Endpoint : EndpointWithoutRequest<object>
BatteryVoltage = Random.Shared.Next(24),
BatteryChargeCurrent = Random.Shared.Next(20),
BatteryDischargeCurrent = Random.Shared.Next(300),
PVInputCurrent = Random.Shared.Next(300),
PVInputVoltage = Random.Shared.Next(300),
PVInputWatt = Random.Shared.Next(1000),
PV_MaxCapacity = 1000,

View File

@ -53,7 +53,7 @@ public class InverterStatus
public double OutputVoltage { get; set; }
[JsonPropertyName("q")]
public double PVInputCurrent { get; set; }
public double PVInputCurrent => PVInputWatt == 0 ? 0 : PVInputWatt / PVInputVoltage;
[JsonPropertyName("r")]
public double PVInputVoltage { get; set; }