3.1 KiB
Live Environment Validation
Validate that code changes work correctly against the live Home Assistant instance using MCP tools.
Triggers
Use when:
- The user says "validate", "check live", "smoke test", "verify live environment"
- After deploying or restarting the app daemon
- After modifying any Monitor/Manager service and wanting to confirm it works
- When the live-validation rule fires (after editing monitor service files)
Prerequisites
- The Home Assistant instance must be running and reachable
- The
homeassistantMCP server must be connected in Cursor
Validation Workflow
Step 1: Build Verification
Run dotnet build for the solution or affected project to confirm compilation succeeds.
dotnet build HomeAssistantSDK.sln --no-restore
If the build fails, stop and fix compilation errors before proceeding.
Step 2: API Health Check
Use the homeassistant MCP tool check_api to verify the HA instance is reachable.
If the API is unreachable, report the failure and stop — no further validation is possible.
Step 3: Smoke Test
Use the homeassistant MCP tool RunSmokeTest to run a full environment check:
- Pass the relevant domains based on what was changed
- Check the
overallfield for PASS/FAIL - Review any unhealthy entities
Domain mapping for changed services:
- BoilerMonitor →
switch,sensor,binary_sensor,number,text - LightMonitor →
light,person,sun - NordPool →
sensor - PowerMonitor →
sensor - ShowerMonitor →
sensor,switch
Step 4: Entity-Specific Validation
Based on which service was changed, validate its critical entities using the ValidateEntities MCP tool:
BoilerMonitor entities:
sensor.boilermonitor_statussensor.boilermonitor_water_readysensor.boilermonitor_estimated_temperaturesensor.boilermonitor_heating_percentage
LightMonitor entities:
light.sonoff_1002214d40sun.sunperson.marius,person.erika
NordPool entities:
sensor.nordpool_current_price
PowerMonitor entities:
- Power sensor entities configured in the system
Step 5: Behavioral Validation (Optional)
For deeper validation, use the get_logbook MCP tool filtered to the relevant entity with a 30-minute window to confirm the service is producing expected state changes.
Use get_entity_history for trend validation — verify values are within expected ranges.
Step 6: Report
Summarize results:
- Build status (pass/fail)
- API health (reachable/unreachable)
- Smoke test result (PASS/FAIL with details)
- Entity validation results (list any failures)
- Logbook activity summary (if performed)
If everything passes, confirm with a brief "Live validation passed" message. If anything fails, list specific failures with entity IDs and current states.
Browser Validation (HistoryReplay UI)
If the HomeAssistant.HistoryReplay Blazor app is running, use the cursor-ide-browser MCP to:
- Navigate to the dashboard URL
- Take a screenshot to verify charts render correctly
- Check console for JavaScript errors
This is optional and only applies when HistoryReplay changes are involved.