Enable PowerMonitor limit enforcement and prune unused boiler/replay code
PowerMonitor now ships enabled with power-limit enforcement settings: watt limit, recovery and cooldown windows, and switch-off plus pause/restore entity lists. Remove the unused BoilerRunTimeTracker, its DI registration and tests, the StatusCleanedUp constant, and the boiler replay runner; simplify BoilerConfigReader, control-service logging and entity parsing. Switch CostAccumulator to System.Threading.Lock, update the Shower exhaust fan service and tests, drop the legacy HistoryReplay/McpServer sources and reporting tooling, and expand AGENTS.md with the current project wiring and DI notes.
This commit is contained in:
@@ -25,6 +25,7 @@ public sealed class PowerMonitorEntityService(
|
||||
private const string AnomalyEntityId = "binary_sensor.powermonitor_anomaly";
|
||||
private const string StatusEntityId = "sensor.powermonitor_status";
|
||||
private const string RediscoverButtonEntityId = "button.powermonitor_rediscover_sensors";
|
||||
private const string TriggerLimitBreachButtonEntityId = "button.powermonitor_trigger_limit_breach";
|
||||
|
||||
private static readonly string[] SystemEntityIds =
|
||||
[
|
||||
@@ -34,7 +35,8 @@ public sealed class PowerMonitorEntityService(
|
||||
OtherCost15MinEntityId, OtherCost1HEntityId, OtherCostDailyEntityId, OtherCostMonthlyEntityId,
|
||||
AnomalyEntityId,
|
||||
StatusEntityId,
|
||||
RediscoverButtonEntityId
|
||||
RediscoverButtonEntityId,
|
||||
TriggerLimitBreachButtonEntityId
|
||||
];
|
||||
|
||||
public async Task CreateSystemEntitiesAsync(CancellationToken cancellationToken = default)
|
||||
@@ -199,6 +201,10 @@ public sealed class PowerMonitorEntityService(
|
||||
new("button", "powermonitor_rediscover_sensors", "Rediscover power sensors")
|
||||
{
|
||||
AdditionalConfig = new { icon = "mdi:refresh" }
|
||||
},
|
||||
new("button", "powermonitor_trigger_limit_breach", "Trigger power limit breach (debug)")
|
||||
{
|
||||
AdditionalConfig = new { icon = "mdi:flash-alert" }
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user