using System.Text.Json.Nodes; using InnovEnergy.Lib.Devices.Battery48TL; using InnovEnergy.Lib.StatusApi; namespace InnovEnergy.SaliMax.Log; public static class Battery48Tl { public static JsonObject? Log(this Battery48TLStatus? s) { if (s is null) return null; return DeviceType .Battery .CreateDevice("48TL Battery") .AddDc48Connection(s.Dc.Current.Round3(),s.Dc.Voltage.Round3()) .AddAlarms(s.Alarms) .AddWarnings(s.Warnings) .AddProp("Soc", s.Soc.Round3()) .AddProp("HeaterOn", s.HeaterOn) .AddProp("EocReached", s.EocReached) .AddProp("BatteryCold", s.BatteryCold) .AddProp("Temperature", s.Temperature); } }