mirror of
https://github.com/Matysh/houseplan-card
synced 2026-07-31 08:28:31 +00:00
feat v1.15.0: temperature room fill (blue/green/yellow) with editable comfort bounds
- fill_mode 'temp': below comfort → #4fc3f7, inside → #66d17a, above → #ffd45c; bounds default 20-25°C, editable in the space dialog (visible only for this mode), swapped bounds tolerated; rooms without a temperature reading unfilled - areaTemp(): average of the area devices' temperatures - tests: roomFillColor temp bands + bounds, spaceDisplayOf defaults, areaTemp, backend schema (fill_mode temp + temp_min/temp_max); smoke_temp_fill.mjs - TESTING.md updated in the same commit (policy)
This commit is contained in:
@@ -116,3 +116,12 @@ def test_space_display_settings():
|
||||
bad_mode = dict(ok, settings={"fill_mode": "rainbow"})
|
||||
with _pytest.raises(Exception):
|
||||
v.SPACE_SCHEMA(bad_mode)
|
||||
|
||||
|
||||
def test_space_temp_bounds():
|
||||
"""Temperature comfort bounds validate as floats; temp fill mode accepted."""
|
||||
ok = {
|
||||
"id": "f1", "title": "F", "aspect": 1.0, "view_box": [0, 0, 1, 1], "rooms": [],
|
||||
"settings": {"fill_mode": "temp", "temp_min": 19.5, "temp_max": "24"},
|
||||
}
|
||||
v.SPACE_SCHEMA(ok)
|
||||
|
||||
Reference in New Issue
Block a user