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
-46
View File
@@ -1,46 +0,0 @@
---
description: Require live environment validation after modifying monitor services
globs:
- "BoilerMonitor.Manager/**/*.cs"
- "BoilerMonitor.Models/**/*.cs"
- "LightMonitor.Manager/**/*.cs"
- "LightMonitor.Models/**/*.cs"
- "NordPool.Manager/**/*.cs"
- "NordPool.Models/**/*.cs"
- "PowerMonitor.Manager/**/*.cs"
- "PowerMonitor.Models/**/*.cs"
- "ShowerMonitor.Manager/**/*.cs"
- "ShowerMonitor.Models/**/*.cs"
- "HomeAssistant.McpServer/**/*.cs"
alwaysApply: false
---
# Live Validation Required
After modifying any Monitor service, Manager, or Models code, the agent MUST validate the change works in the live Home Assistant environment before considering the task complete.
## Mandatory Steps
1. **Build** — run `dotnet build` on the affected project to confirm compilation.
2. **Smoke test** — use the `RunSmokeTest` MCP tool (from the `homeassistant` MCP server) with domains relevant to the changed service.
3. **Entity check** — use `ValidateEntities` to confirm critical entities for the changed service are not `unavailable` or `unknown`.
## Domain Mapping
| Service Changed | MCP Domains to Check |
|---|---|
| BoilerMonitor | `switch,sensor,binary_sensor` |
| LightMonitor | `light,person,sun` |
| NordPool | `sensor` |
| PowerMonitor | `sensor` |
| ShowerMonitor | `sensor,switch` |
## When to Skip
- If the Home Assistant instance is offline (check via `check_api` first)
- If changes are purely to unit tests, documentation, or non-runtime code
- If the user explicitly says to skip validation
## On Failure
Report the specific entities that failed validation and their current states. Do not silently proceed.