feat: add BatteryMonitor implementation with discovery, notification, and scheduling services
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
using NetDaemon.HassModel;
|
||||
using ShowerMonitor.Models.Enums;
|
||||
|
||||
namespace ShowerMonitorManager.Interface;
|
||||
|
||||
public interface IExhaustFanControlService
|
||||
{
|
||||
void Evaluate(ShowerState state, DateTimeOffset timestamp, IHaContext haContext);
|
||||
void Reset(IHaContext haContext);
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace ShowerMonitorManager.Interface;
|
||||
|
||||
public interface IHumidityRateCalculator
|
||||
{
|
||||
void RecordReading(double humidity, DateTimeOffset timestamp);
|
||||
double GetRatePerMinute();
|
||||
void Reset();
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using ShowerMonitor.Models;
|
||||
using ShowerMonitor.Models.Enums;
|
||||
|
||||
namespace ShowerMonitorManager.Interface;
|
||||
|
||||
public interface IShowerDetectionService
|
||||
{
|
||||
ShowerState CurrentState { get; }
|
||||
ShowerSession? CurrentSession { get; }
|
||||
ShowerSession? LastCompletedSession { get; }
|
||||
int TodaySessionCount { get; }
|
||||
|
||||
ShowerState Evaluate(double bathroomHumidity, double mainHomeHumidity, DateTimeOffset timestamp);
|
||||
void ResetDailyCounters();
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using ShowerMonitorManager.Models;
|
||||
|
||||
namespace ShowerMonitorManager.Interface;
|
||||
|
||||
public interface IShowerMonitorEntityService
|
||||
{
|
||||
Task CreateEntitiesAsync(CancellationToken cancellationToken = default);
|
||||
Task UpdateEntitiesAsync(ShowerMonitorUpdateContext context, CancellationToken cancellationToken = default);
|
||||
Task ResetEntitiesAsync(CancellationToken cancellationToken = default);
|
||||
Task CleanupEntitiesAsync(CancellationToken cancellationToken = default);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace ShowerMonitorManager.Interface;
|
||||
|
||||
public interface IShowerMonitorInit
|
||||
{
|
||||
Task InitializeAsync();
|
||||
Task CleanupEntitiesAsync(CancellationToken cancellationToken = default);
|
||||
}
|
||||
Reference in New Issue
Block a user