v1.59.0-rc.1: optimize plans and polish editor feedback
Validate / hacs (push) Failing after 7s
Validate / hassfest (push) Failing after 6s
Validate / frontend (push) Successful in 3m12s
Validate / backend (push) Failing after 8m53s
Validate / smoke (push) Failing after 13m51s

This commit is contained in:
Matysh
2026-08-06 10:14:52 +03:00
parent d2bec266ed
commit e0f6746d7f
43 changed files with 2052 additions and 568 deletions
+11 -2
View File
@@ -1319,8 +1319,8 @@ def test_decor_furniture_does_not_disturb_the_other_kinds():
{"id": "z", "kind": "hologram", "x": 0, "y": 0, "w": 1, "h": 1}]}]})
def test_space_walls_thickness():
"""docs/WALL-THICKNESS.md: optional walls[{key,cm}]; absent = today's plan;
cm bounded 1..100; key a bounded string; list capped like openings."""
"""docs/WALL-THICKNESS.md: exact endpoints are optional/backward compatible;
cm, keys, points and the list itself remain bounded."""
base = {"id": "s1", "title": "S", "view_box": [0, 0, 1, 1], "rooms": []}
# no walls -- byte-compatible
assert "walls" not in v.CONFIG_SCHEMA({"spaces": [base]})["spaces"][0]
@@ -1329,6 +1329,15 @@ def test_space_walls_thickness():
out = v.CONFIG_SCHEMA({"spaces": [{**base, "walls": [ok]}]})
assert out["spaces"][0]["walls"] == [ok]
exact = {**ok, "a": [0.2, 0.1], "b": [0.2, 0.4]}
out = v.CONFIG_SCHEMA({"spaces": [{**base, "walls": [exact]}]})
assert out["spaces"][0]["walls"] == [exact]
with pytest.raises(vol.Invalid):
v.CONFIG_SCHEMA({"spaces": [{**base, "walls": [{**ok, "a": [0.2, 0.1]}]}]})
for bad in ([0.2], [0.2, 0.4, 0.6], [float("inf"), 0.4], [5001, 0.4]):
with pytest.raises(vol.Invalid):
v.CONFIG_SCHEMA({"spaces": [{**base, "walls": [{**ok, "a": bad}]}]})
with pytest.raises(vol.Invalid):
v.CONFIG_SCHEMA({"spaces": [{**base, "walls": [{"key": ok["key"], "cm": 0}]}]})
with pytest.raises(vol.Invalid):