feat: add PowerCostCalculationService with per-device cost accumulators

Made-with: Cursor
This commit is contained in:
Marius
2026-03-17 12:55:25 +02:00
parent b0fd790ba6
commit 7f0ebcf826
3 changed files with 379 additions and 0 deletions
@@ -0,0 +1,15 @@
using PowerMonitorManager.Models;
namespace PowerMonitorManager.Interface;
public interface IPowerCostCalculationService
{
void RecordCosts(PowerCalculationResult calculation, double nordPoolPrice, int pollIntervalSeconds, DateTime now);
CostSnapshot GetTotalCostSnapshot();
CostSnapshot GetOtherCostSnapshot();
CostSnapshot GetDeviceCostSnapshot(string entityId);
IReadOnlyDictionary<string, CostSnapshot> GetAllDeviceCostSnapshots();
double LastKnownPrice { get; }
string PriceSource { get; }
void SetPrice(double price);
}