Filter autopilot actuator candidates

This commit is contained in:
2026-06-18 18:43:53 +02:00
parent 8057751c11
commit bf832b49f4
6 changed files with 46 additions and 9 deletions

View File

@@ -19,7 +19,7 @@ def test_health_and_backup_roundtrip(tmp_path, monkeypatch) -> None: # type: ig
restore = client.post("/v2/backup/restore", json=backup.json())
assert health.status_code == 200
assert health.json()["version"] == "2.0.0-alpha.14"
assert health.json()["version"] == "2.0.0-alpha.15"
assert backup.status_code == 200
assert restore.status_code == 200
assert restore.json() == {"status": "restored"}
@@ -47,6 +47,12 @@ def test_dashboard_control_and_learning_endpoints(tmp_path, monkeypatch) -> None
state="off",
area_name="Storage",
),
"switch.storage_motion": EntityState(
entity_id="switch.storage_motion",
domain="switch",
state="off",
area_name="Storage",
),
}
)
)
@@ -162,6 +168,10 @@ def test_dashboard_control_and_learning_endpoints(tmp_path, monkeypatch) -> None
assert evaluations.json()
assert autopilot.status_code == 200
assert autopilot.json()["candidates"]
assert all(
candidate["actuator_entity_id"] != "switch.storage_motion"
for candidate in autopilot.json()["candidates"]
)
assert candidates.status_code == 200
assert accepted.status_code == 200
assert jobs.status_code == 200