From 4dd5c7a870e56d5c72dd35b17c3e4e284f480811 Mon Sep 17 00:00:00 2001 From: djnitehawk Date: Fri, 14 Mar 2025 09:59:40 +0530 Subject: [PATCH] fix pv potential progress bar not showing --- src/InverterMon.sln | 6 ++++++ src/Shared/Models/InverterStatus.cs | 2 +- src/changelog.md | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/InverterMon.sln b/src/InverterMon.sln index af369b9..04877f5 100644 --- a/src/InverterMon.sln +++ b/src/InverterMon.sln @@ -10,6 +10,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "InverterMon.Shared", "Share EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "InverterMonWindow", "InverterMonWindow\InverterMonWindow.csproj", "{9DC94527-CBD8-4807-B6AA-2E079D5C8CA0}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{494240DD-DB58-4718-8D05-83CD1E686288}" + ProjectSection(SolutionItems) = preProject + changelog.md = changelog.md + ..\README.md = ..\README.md + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/src/Shared/Models/InverterStatus.cs b/src/Shared/Models/InverterStatus.cs index 69a2417..525b038 100644 --- a/src/Shared/Models/InverterStatus.cs +++ b/src/Shared/Models/InverterStatus.cs @@ -81,7 +81,7 @@ public class InverterStatus public int PV_MaxCapacity { get; set; } [JsonPropertyName("v")] - public int PVPotential => PVInputWatt > 0 ? Convert.ToInt32(PVInputWatt / PV_MaxCapacity * 100) : 0; + public int PVPotential => PVInputWatt > 0 ? Convert.ToInt32(Convert.ToDouble(PVInputWatt) / PV_MaxCapacity * 100) : 0; int pvInputWatt; DateTime pvInputWattHourLastComputed; diff --git a/src/changelog.md b/src/changelog.md index 02c56bb..79dc415 100644 --- a/src/changelog.md +++ b/src/changelog.md @@ -1,3 +1,3 @@ ## changelog -- fix pv input current not showing \ No newline at end of file +- fix pv potential progress bar not showing \ No newline at end of file