diff --git a/src/Server/Endpoints/GetStatus/Endpoint.cs b/src/Server/Endpoints/GetStatus/Endpoint.cs index d0acb3f..32f75e4 100644 --- a/src/Server/Endpoints/GetStatus/Endpoint.cs +++ b/src/Server/Endpoints/GetStatus/Endpoint.cs @@ -41,7 +41,6 @@ public class Endpoint : EndpointWithoutRequest 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, diff --git a/src/Shared/Models/InverterStatus.cs b/src/Shared/Models/InverterStatus.cs index b5c5d28..69a2417 100644 --- a/src/Shared/Models/InverterStatus.cs +++ b/src/Shared/Models/InverterStatus.cs @@ -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; }