Expand room planning management
This commit is contained in:
@@ -127,6 +127,22 @@ def _install_service(tmp_path: Path) -> None:
|
||||
area_name="Abstellkammer",
|
||||
state="off",
|
||||
),
|
||||
HaEntitySummary(
|
||||
entity_id="fan.bad_luefter",
|
||||
domain="fan",
|
||||
friendly_name="Bad Lüfter",
|
||||
area_name="Bad",
|
||||
),
|
||||
HaEntitySummary(
|
||||
entity_id="sensor.bad_luftfeuchtigkeit",
|
||||
domain="sensor",
|
||||
device_class="humidity",
|
||||
state_class="measurement",
|
||||
unit_of_measurement="%",
|
||||
friendly_name="Bad Luftfeuchtigkeit",
|
||||
area_name="Bad",
|
||||
state="68",
|
||||
),
|
||||
HaEntitySummary(
|
||||
entity_id="sensor.pfsense_interface_vpn_inbytes",
|
||||
domain="sensor",
|
||||
@@ -516,7 +532,7 @@ def test_dashboard_overview_uses_cache_without_ha_roundtrip(tmp_path: Path) -> N
|
||||
assert reader.read_entities_calls == calls_before
|
||||
payload = response.json()
|
||||
assert payload["cache"]["available"] is True
|
||||
assert payload["cache"]["entity_count"] == 4
|
||||
assert payload["cache"]["entity_count"] == 6
|
||||
assert payload["actuators"][0]["friendly_name"] == "Abstellkammer Licht"
|
||||
assert payload["discovery_groups"]
|
||||
assert payload["jobs"]["jobs"][-1]["kind"] == "discovery"
|
||||
@@ -618,7 +634,7 @@ def test_dashboard_system_and_start_do_not_materialize_entity_cache(
|
||||
|
||||
assert system_response.status_code == 200
|
||||
assert system_response.json()["actuators"] == []
|
||||
assert system_response.json()["cache"]["entity_count"] == 4
|
||||
assert system_response.json()["cache"]["entity_count"] == 6
|
||||
assert start_response.status_code == 200
|
||||
assert start_response.json()["actuators"][0]["friendly_name"] == "Abstellkammer Licht"
|
||||
|
||||
@@ -639,8 +655,15 @@ def test_room_management_overview_groups_actuators_with_sensors_and_rules(tmp_pa
|
||||
assert actuator["actuator_entity_id"] == "light.abstellkammer"
|
||||
assert actuator["sensors"]
|
||||
assert actuator["prediction_rules"]
|
||||
assert room["suggested_actions"]
|
||||
assert room["sensor_count"] >= 2
|
||||
assert any(sensor["entity_id"] == "binary_sensor.abstellkammer_motion" for sensor in room["sensors"])
|
||||
|
||||
bad = next(item for item in payload["rooms"] if item["room"] == "Bad")
|
||||
assert bad["actuator_count"] == 1
|
||||
assert bad["actuators"][0]["lifecycle_status"] == "unconfigured"
|
||||
assert any(action["category"] == "belueftung" for action in bad["suggested_actions"])
|
||||
|
||||
|
||||
def test_actuator_detail_uses_compact_payload(tmp_path: Path) -> None:
|
||||
with TestClient(app) as client:
|
||||
|
||||
Reference in New Issue
Block a user