feat: add fresh-water cascades with independent stations and buffer links
This commit is contained in:
1 parent
a2a119d3ee
commit
992c3e18f2
30 files changed
+2199
-1578
No files matched your search
@@ -38,6 +38,37 @@ def test_charging_station_links_formats_and_clearing_survive_validation() -> Non
|
||||
FURNITURE_SCHEMA({**FURN, "charging": invalid})
|
||||
|
||||
|
||||
def test_freshwater_cascade_station_links_buffer_reference_and_limits() -> None:
|
||||
station = {
|
||||
"id": "s1",
|
||||
"name": "Station 1",
|
||||
"flow": "cover.1",
|
||||
"return": "light.2",
|
||||
"hot_water": "climate.3",
|
||||
"cold_water": "cover.4",
|
||||
"power": "sensor.5",
|
||||
"pump": {"command": "light.6", "feedback": "cover.7"},
|
||||
"valve": {"feedback": "climate.8"},
|
||||
"has_valve": True,
|
||||
}
|
||||
hydraulic = {
|
||||
"stations": [{**station, "id": f"s{i}"} for i in range(4)],
|
||||
"buffer_id": "buffer",
|
||||
"circulation": {"feedback": "cover.9"},
|
||||
}
|
||||
assert FURNITURE_SCHEMA({**FURN, "hydronic": hydraulic})["hydronic"] == hydraulic
|
||||
legacy = {"flow": "cover.1", "return": "light.2", "hot_water": "sensor.3", "pump": {"feedback": "cover.4"}}
|
||||
assert FURNITURE_SCHEMA({**FURN, "hydronic": legacy})["hydronic"] == legacy
|
||||
for invalid in (
|
||||
{"stations": []},
|
||||
{"stations": [station] * 17},
|
||||
{"stations": [{**station, "power": 123}]},
|
||||
{"buffer_id": 123},
|
||||
):
|
||||
with pytest.raises(vol.Invalid):
|
||||
FURNITURE_SCHEMA({**FURN, "hydronic": invalid})
|
||||
|
||||
|
||||
def test_explicit_room_meters_accept_native_refs_and_clear_without_changing_the_area() -> None:
|
||||
room = {**ROOM, "area_id": "symcon-category-100"}
|
||||
meters = {"electricity": {"power": "cover.123", "energy": "sensor.456"}, "water": {"energy": None}}
|
||||
|
||||
Reference in new issue
Block a user