feat: migrate boiler control implementation to BoilerMonitor namespace and add budget handling logic
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
using BoilerMonitor.Models.Enums;
|
||||
|
||||
namespace BoilerMonitorManager.Interface;
|
||||
|
||||
public interface IBoilerControlService
|
||||
{
|
||||
BoilerAction DetermineAction(bool isNowCheap, bool waterReady, string? currentSwitchState, bool budgetExhausted, bool budgetOverride);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using BoilerMonitorManager.Models;
|
||||
|
||||
namespace BoilerMonitorManager.Interface;
|
||||
|
||||
public interface IBoilerMonitorEntityService
|
||||
{
|
||||
Task CreateEntitiesAsync(CancellationToken cancellationToken = default);
|
||||
Task ResetEntitiesAsync(CancellationToken cancellationToken = default);
|
||||
Task ResetTransientEntitiesAsync(CancellationToken cancellationToken = default);
|
||||
Task UpdateEntitiesAsync(BoilerMonitorUpdateContext context, CancellationToken cancellationToken = default);
|
||||
Task CleanupEntitiesAsync(CancellationToken cancellationToken = default);
|
||||
Task SetStatusAsync(string status);
|
||||
PersistedBoilerState? ReadPersistedState();
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace BoilerMonitorManager.Interface;
|
||||
|
||||
public interface IBoilerMonitorInit
|
||||
{
|
||||
Task InitializeAsync();
|
||||
Task CleanupEntitiesAsync(CancellationToken cancellationToken = default);
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using BoilerMonitorManager.Models;
|
||||
|
||||
namespace BoilerMonitorManager.Interface;
|
||||
|
||||
public interface IBoilerRunTimeTracker
|
||||
{
|
||||
void RecordPollResult(bool isHeating, TimeSpan pollInterval);
|
||||
RunTimeSnapshot GetSnapshot();
|
||||
void Reset();
|
||||
void RestoreFromSnapshot(TimeSpan accumulatedRunTime, int sessionCount);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace BoilerMonitorManager.Interface;
|
||||
|
||||
public interface IWaterReadyService
|
||||
{
|
||||
bool IsWaterReady(string? switchState, double? powerWatts, double heatingThresholdWatts);
|
||||
bool IsInCooldown { get; }
|
||||
void NotifyTurnedOn();
|
||||
void ResetCooldown();
|
||||
}
|
||||
Reference in New Issue
Block a user