feat: add BatteryMonitor implementation with discovery, notification, and scheduling services
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
using ShowerMonitor.Models;
|
||||
|
||||
namespace ShowerMonitorManager.Models;
|
||||
|
||||
public sealed class ShowerMonitorOptions
|
||||
{
|
||||
public const string SectionName = "ShowerMonitor";
|
||||
|
||||
public bool Enabled { get; set; }
|
||||
public bool CleanupEntitiesOnStartup { get; set; }
|
||||
public string BathroomHumidityEntityId { get; set; } = ShowerMonitorConsts.BathroomHumidityEntityId;
|
||||
public string MainHomeHumidityEntityId { get; set; } = ShowerMonitorConsts.MainHomeHumidityEntityId;
|
||||
public string BathroomTemperatureEntityId { get; set; } = ShowerMonitorConsts.BathroomTemperatureEntityId;
|
||||
public string ExhaustFanEntityId { get; set; } = ShowerMonitorConsts.ExhaustFanEntityId;
|
||||
public int PollIntervalSeconds { get; set; } = ShowerMonitorConsts.DefaultPollIntervalSeconds;
|
||||
public double SpikeRateThreshold { get; set; } = ShowerMonitorConsts.DefaultSpikeRateThreshold;
|
||||
public double MinDifferentialHumidity { get; set; } = ShowerMonitorConsts.DefaultMinDifferentialHumidity;
|
||||
public double PeakHumidityThreshold { get; set; } = ShowerMonitorConsts.DefaultPeakHumidityThreshold;
|
||||
public int ConfirmationWindowMinutes { get; set; } = ShowerMonitorConsts.DefaultConfirmationWindowMinutes;
|
||||
public double RecoveryDifferentialThreshold { get; set; } = ShowerMonitorConsts.DefaultRecoveryDifferentialThreshold;
|
||||
public int MaxShowerDurationMinutes { get; set; } = (int)ShowerMonitorConsts.DefaultMaxShowerDuration.TotalMinutes;
|
||||
public int FanRunAfterShowerMinutes { get; set; } = (int)ShowerMonitorConsts.DefaultFanRunAfterShower.TotalMinutes;
|
||||
public int RateWindowSize { get; set; } = ShowerMonitorConsts.DefaultRateWindowSize;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using ShowerMonitor.Models;
|
||||
using ShowerMonitor.Models.Enums;
|
||||
|
||||
namespace ShowerMonitorManager.Models;
|
||||
|
||||
public sealed class ShowerMonitorUpdateContext
|
||||
{
|
||||
public required ShowerState State { get; init; }
|
||||
public required double BathroomHumidity { get; init; }
|
||||
public required double MainHomeHumidity { get; init; }
|
||||
public required double Differential { get; init; }
|
||||
public required double HumidityRate { get; init; }
|
||||
public required int TodaySessionCount { get; init; }
|
||||
public ShowerSession? LastCompletedSession { get; init; }
|
||||
public ShowerSession? CurrentSession { get; init; }
|
||||
}
|
||||
Reference in New Issue
Block a user