16 lines
537 B
C#
16 lines
537 B
C#
namespace BoilerMonitorManager.Models;
|
|
|
|
public record BoilerMonitorConfig
|
|
{
|
|
public string? BoilerPowerEntityId { get; init; }
|
|
public string? BoilerSwitchEntityId { get; init; }
|
|
public int? PollIntervalSeconds { get; init; }
|
|
public double? HeatingPowerThresholdWatts { get; init; }
|
|
|
|
public bool IsFullyConfigured =>
|
|
!string.IsNullOrWhiteSpace(BoilerPowerEntityId) &&
|
|
!string.IsNullOrWhiteSpace(BoilerSwitchEntityId) &&
|
|
PollIntervalSeconds is > 0 &&
|
|
HeatingPowerThresholdWatts is > 0;
|
|
}
|