f919d6b25b
- Wrap using directives in `#region` blocks across the Battery, Boiler and NordPool sources and tests - Expand single-statement guards and loops into braced blocks - Realign wrapped method arguments, chained calls and continuations - Replace target-typed `new()` with explicit generic construction and empty string literals with `string.Empty` - Flatten the boiler config expression and reindent the remaining touched files
27 lines
1.2 KiB
C#
27 lines
1.2 KiB
C#
#region
|
|
|
|
using PowerMonitorManager.Models.Consts;
|
|
|
|
#endregion
|
|
|
|
namespace PowerMonitorManager.Models;
|
|
|
|
public sealed class PowerMonitorOptions
|
|
{
|
|
public const string SectionName = "PowerMonitor";
|
|
|
|
public bool Enabled { get; init; }
|
|
public string MainMeterEntityId { get; set; } = string.Empty;
|
|
public int PollIntervalSeconds { get; init; } = PowerMonitorConsts.DefaultPollIntervalSeconds;
|
|
public int SmoothingWindowSize { get; init; } = PowerMonitorConsts.DefaultSmoothingWindowSize;
|
|
public double AnomalyThresholdWatts { get; init; } = PowerMonitorConsts.DefaultAnomalyThresholdWatts;
|
|
public string[] ExcludedSensorPatterns { get; set; } = [];
|
|
public double HighPowerThresholdWatts { get; init; } = PowerMonitorConsts.DefaultHighPowerThresholdWatts;
|
|
|
|
public bool EnforceLimitEnabled { get; set; } = true;
|
|
public double PowerLimitWatts { get; set; } = PowerMonitorConsts.DefaultPowerLimitWatts;
|
|
public int RecoverySeconds { get; set; } = PowerMonitorConsts.DefaultRecoverySeconds;
|
|
public int LimitCooldownSeconds { get; set; } = PowerMonitorConsts.DefaultLimitCooldownSeconds;
|
|
public string[] EnforceSwitchOffEntityIds { get; set; } = [];
|
|
public string[] PauseAndRestoreEntityIds { get; set; } = [];
|
|
} |