Remove the MCP server and split NordPool today/tomorrow fetch decisions
- Drop the HomeAssistant.McpServer wiring from opencode.json along with the Cursor live-validation hook, rule and skill; update AGENTS.md and README - Rename ShouldFetchNewPrices to ShouldFetchTodaysPrices and add a separate ShouldFetchTomorrowPrice that waits until the CET publish hour (TomorrowPricesPublishHour) - Inject TimeProvider into NordPoolPriceService, use the CET zone for the current date and record fetch timestamps from it - Rework the NordPool tests around FakeTimeProvider and cover fetching only today before the publish hour
This commit is contained in:
@@ -56,7 +56,7 @@ public class NordPoolInitTests
|
||||
.Returns(Task.CompletedTask);
|
||||
|
||||
_priceServiceMock.Setup(p => p.GetCurrentPrice()).Returns(0.0);
|
||||
_priceServiceMock.Setup(p => p.ShouldFetchNewPrices(It.IsAny<DateOnly>())).Returns(false);
|
||||
_priceServiceMock.Setup(p => p.ShouldFetchTodaysPrices(It.IsAny<DateOnly>())).Returns(false);
|
||||
_priceServiceMock.SetupGet(p => p.DayQuartersIndex).Returns(0);
|
||||
_priceServiceMock.SetupGet(p => p.TodayNordPoolPrice).Returns((NordPoolPrice?)null);
|
||||
_priceServiceMock.SetupGet(p => p.TomorrowNordPoolPrice).Returns((NordPoolPrice?)null);
|
||||
|
||||
Reference in New Issue
Block a user