diff --git a/csharp/Lib/Devices/Battery48TL/Battery48TlRecords.cs b/csharp/Lib/Devices/Battery48TL/Battery48TlRecords.cs index 6db267887..06b6ac12e 100644 --- a/csharp/Lib/Devices/Battery48TL/Battery48TlRecords.cs +++ b/csharp/Lib/Devices/Battery48TL/Battery48TlRecords.cs @@ -13,9 +13,10 @@ public class Battery48TlRecords Eoc = !empty && records.All(r => r.Eoc); Warnings = records.SelectMany(r => r.Warnings).Distinct().ToList(); Alarms = records.SelectMany(r => r.Alarms).Distinct().ToList(); - Soc = empty ? 0 : records.Min(r => r.Soc.Value); - Temperature = records.Any() ? records.Average(b => b.Temperatures.Cells.Average.Value) : 0; - HeatingCurrent = records.Any() ? records.Sum(b => b.HeatingCurrent) : 0; + Soc = empty ? 0 : records.Average(r => r.Soc.Value); + CurrentMinSoc = empty ? 0 : records.Min(r => r.Soc.Value); + Temperature = records.Any() ? records.Average(b => b.Temperatures.Cells.Average.Value) : 0; + HeatingCurrent = records.Any() ? records.Sum(b => b.HeatingCurrent) : 0; Dc = empty ? DcBus.FromVoltageCurrent(0, 0) @@ -31,6 +32,7 @@ public class Battery48TlRecords public IReadOnlyList Warnings { get; init; } public IReadOnlyList Alarms { get; init; } public Percent Soc { get; init; } + public Percent CurrentMinSoc { get; init; } public Temperature Temperature { get; init; } public Current HeatingCurrent { get; init; }