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:
2026-12-01 13:46:19 +02:00
parent f919d6b25b
commit a9f329ffcd
14 changed files with 124 additions and 330 deletions
+6
View File
@@ -39,6 +39,12 @@ public static class NordPoolConsts
/// </summary>
public const string FetchPricesButtonEntityId = "button.nordpool_fetch_prices";
/// <summary>
/// NordPool publishes tomorrow's prices in the afternoon; before this CET hour the API
/// has nothing to return for tomorrow, so polling it is pointless.
/// </summary>
public const int TomorrowPricesPublishHour = 13;
/// <summary>
/// Maximum number of retry attempts when fetching prices from the NordPool API.
/// </summary>