mirror of
https://github.com/Matysh/houseplan-card
synced 2026-09-29 03:09:36 +00:00
feat: schema manifest, parity allow-list and lifecycle fixtures (#33)
The Voluptuous schema is now dumped into a deterministic committed manifest (265 leaf paths); a pytest fails on drift. A parity test compares manifest enums with the exported frontend const lists through a machine-readable allow-list that also refuses to rot. The field registry gains passports (allow-extra / lovelace-card), enforcedBy citations for mechanisms that already shipped, and passports for the v1.68-v1.69 fields; a completeness test bans dead decisions. Lifecycle fixtures (oldest / current / future) prove lossless loading, and the config auditor gains the 0/3/2 exit-code contract. User-Visible: yes Issue: #33
This commit is contained in:
+188
@@ -0,0 +1,188 @@
|
||||
{
|
||||
"model_version": 9,
|
||||
"spaces": [
|
||||
{
|
||||
"id": "ground",
|
||||
"title": "Ground",
|
||||
"view_box": [
|
||||
0,
|
||||
0,
|
||||
1000,
|
||||
750
|
||||
],
|
||||
"rooms": [
|
||||
{
|
||||
"id": "hall",
|
||||
"name": "Hall",
|
||||
"poly": [
|
||||
[
|
||||
100,
|
||||
100
|
||||
],
|
||||
[
|
||||
400,
|
||||
100
|
||||
],
|
||||
[
|
||||
400,
|
||||
400
|
||||
],
|
||||
[
|
||||
100,
|
||||
400
|
||||
]
|
||||
],
|
||||
"wall_ids": [
|
||||
"w1",
|
||||
"w2",
|
||||
"w3",
|
||||
"w4"
|
||||
]
|
||||
}
|
||||
],
|
||||
"wall_segments": [
|
||||
{
|
||||
"id": "w1",
|
||||
"a": [
|
||||
100,
|
||||
100
|
||||
],
|
||||
"b": [
|
||||
400,
|
||||
100
|
||||
],
|
||||
"cm": 15
|
||||
},
|
||||
{
|
||||
"id": "w2",
|
||||
"a": [
|
||||
400,
|
||||
100
|
||||
],
|
||||
"b": [
|
||||
400,
|
||||
400
|
||||
],
|
||||
"cm": 15
|
||||
},
|
||||
{
|
||||
"id": "w3",
|
||||
"a": [
|
||||
400,
|
||||
400
|
||||
],
|
||||
"b": [
|
||||
100,
|
||||
400
|
||||
],
|
||||
"cm": 15
|
||||
},
|
||||
{
|
||||
"id": "w4",
|
||||
"a": [
|
||||
100,
|
||||
400
|
||||
],
|
||||
"b": [
|
||||
100,
|
||||
100
|
||||
],
|
||||
"cm": 15
|
||||
}
|
||||
],
|
||||
"walls": [
|
||||
{
|
||||
"key": "[100, 100]|[400, 100]",
|
||||
"a": [
|
||||
100,
|
||||
100
|
||||
],
|
||||
"b": [
|
||||
400,
|
||||
100
|
||||
],
|
||||
"cm": 15
|
||||
},
|
||||
{
|
||||
"key": "[400, 100]|[400, 400]",
|
||||
"a": [
|
||||
400,
|
||||
100
|
||||
],
|
||||
"b": [
|
||||
400,
|
||||
400
|
||||
],
|
||||
"cm": 15
|
||||
},
|
||||
{
|
||||
"key": "[400, 400]|[100, 400]",
|
||||
"a": [
|
||||
400,
|
||||
400
|
||||
],
|
||||
"b": [
|
||||
100,
|
||||
400
|
||||
],
|
||||
"cm": 15
|
||||
},
|
||||
{
|
||||
"key": "[100, 400]|[100, 100]",
|
||||
"a": [
|
||||
100,
|
||||
400
|
||||
],
|
||||
"b": [
|
||||
100,
|
||||
100
|
||||
],
|
||||
"cm": 15
|
||||
}
|
||||
],
|
||||
"decor": [
|
||||
{
|
||||
"id": "d1",
|
||||
"kind": "line",
|
||||
"x1": 0.1,
|
||||
"y1": 0.1,
|
||||
"x2": 0.3,
|
||||
"y2": 0.1,
|
||||
"color": "#8b0000",
|
||||
"width_cm": 5
|
||||
},
|
||||
{
|
||||
"id": "d2",
|
||||
"kind": "furniture",
|
||||
"symbol": "sofa",
|
||||
"x": 0.2,
|
||||
"y": 0.2,
|
||||
"w": 0.1,
|
||||
"h": 0.05
|
||||
}
|
||||
],
|
||||
"settings": {
|
||||
"bg_mode": "daynight",
|
||||
"north_deg": 45
|
||||
}
|
||||
}
|
||||
],
|
||||
"markers": [
|
||||
{
|
||||
"id": "sensor",
|
||||
"binding": "entity:sensor.temp",
|
||||
"space": "ground",
|
||||
"display": "value",
|
||||
"value_source": {
|
||||
"kind": "entity_attr",
|
||||
"attr": "temperature"
|
||||
}
|
||||
}
|
||||
],
|
||||
"settings": {
|
||||
"decor_default_style": {
|
||||
"color": "#8b0000",
|
||||
"width_cm": 5
|
||||
}
|
||||
}
|
||||
}
|
||||
+201
@@ -0,0 +1,201 @@
|
||||
{
|
||||
"model_version": 9,
|
||||
"spaces": [
|
||||
{
|
||||
"id": "ground",
|
||||
"title": "Ground",
|
||||
"view_box": [
|
||||
0,
|
||||
0,
|
||||
1000,
|
||||
750
|
||||
],
|
||||
"rooms": [
|
||||
{
|
||||
"id": "hall",
|
||||
"name": "Hall",
|
||||
"poly": [
|
||||
[
|
||||
100,
|
||||
100
|
||||
],
|
||||
[
|
||||
400,
|
||||
100
|
||||
],
|
||||
[
|
||||
400,
|
||||
400
|
||||
],
|
||||
[
|
||||
100,
|
||||
400
|
||||
]
|
||||
],
|
||||
"wall_ids": [
|
||||
"w1",
|
||||
"w2",
|
||||
"w3",
|
||||
"w4"
|
||||
]
|
||||
}
|
||||
],
|
||||
"wall_segments": [
|
||||
{
|
||||
"id": "w1",
|
||||
"a": [
|
||||
100,
|
||||
100
|
||||
],
|
||||
"b": [
|
||||
400,
|
||||
100
|
||||
],
|
||||
"cm": 15
|
||||
},
|
||||
{
|
||||
"id": "w2",
|
||||
"a": [
|
||||
400,
|
||||
100
|
||||
],
|
||||
"b": [
|
||||
400,
|
||||
400
|
||||
],
|
||||
"cm": 15
|
||||
},
|
||||
{
|
||||
"id": "w3",
|
||||
"a": [
|
||||
400,
|
||||
400
|
||||
],
|
||||
"b": [
|
||||
100,
|
||||
400
|
||||
],
|
||||
"cm": 15
|
||||
},
|
||||
{
|
||||
"id": "w4",
|
||||
"a": [
|
||||
100,
|
||||
400
|
||||
],
|
||||
"b": [
|
||||
100,
|
||||
100
|
||||
],
|
||||
"cm": 15
|
||||
}
|
||||
],
|
||||
"walls": [
|
||||
{
|
||||
"key": "[100, 100]|[400, 100]",
|
||||
"a": [
|
||||
100,
|
||||
100
|
||||
],
|
||||
"b": [
|
||||
400,
|
||||
100
|
||||
],
|
||||
"cm": 15
|
||||
},
|
||||
{
|
||||
"key": "[400, 100]|[400, 400]",
|
||||
"a": [
|
||||
400,
|
||||
100
|
||||
],
|
||||
"b": [
|
||||
400,
|
||||
400
|
||||
],
|
||||
"cm": 15
|
||||
},
|
||||
{
|
||||
"key": "[400, 400]|[100, 400]",
|
||||
"a": [
|
||||
400,
|
||||
400
|
||||
],
|
||||
"b": [
|
||||
100,
|
||||
400
|
||||
],
|
||||
"cm": 15
|
||||
},
|
||||
{
|
||||
"key": "[100, 400]|[100, 100]",
|
||||
"a": [
|
||||
100,
|
||||
400
|
||||
],
|
||||
"b": [
|
||||
100,
|
||||
100
|
||||
],
|
||||
"cm": 15
|
||||
}
|
||||
],
|
||||
"decor": [
|
||||
{
|
||||
"id": "d1",
|
||||
"kind": "line",
|
||||
"x1": 0.1,
|
||||
"y1": 0.1,
|
||||
"x2": 0.3,
|
||||
"y2": 0.1,
|
||||
"color": "#8b0000",
|
||||
"width_cm": 5
|
||||
},
|
||||
{
|
||||
"id": "d2",
|
||||
"kind": "furniture",
|
||||
"symbol": "sofa",
|
||||
"x": 0.2,
|
||||
"y": 0.2,
|
||||
"w": 0.1,
|
||||
"h": 0.05
|
||||
}
|
||||
],
|
||||
"settings": {
|
||||
"bg_mode": "daynight",
|
||||
"north_deg": 45,
|
||||
"future_display": true
|
||||
},
|
||||
"future_space_field": "kept"
|
||||
}
|
||||
],
|
||||
"markers": [
|
||||
{
|
||||
"id": "sensor",
|
||||
"binding": "entity:sensor.temp",
|
||||
"space": "ground",
|
||||
"display": "value",
|
||||
"value_source": {
|
||||
"kind": "entity_attr",
|
||||
"attr": "temperature"
|
||||
},
|
||||
"future_marker_field": {
|
||||
"nested": "kept"
|
||||
}
|
||||
}
|
||||
],
|
||||
"settings": {
|
||||
"decor_default_style": {
|
||||
"color": "#8b0000",
|
||||
"width_cm": 5
|
||||
},
|
||||
"future_setting": [
|
||||
1,
|
||||
2,
|
||||
3
|
||||
]
|
||||
},
|
||||
"future_root_field": {
|
||||
"kept": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"spaces": [
|
||||
{
|
||||
"id": "ground",
|
||||
"title": "Ground",
|
||||
"view_box": [
|
||||
0,
|
||||
0,
|
||||
1000,
|
||||
750
|
||||
],
|
||||
"rooms": [
|
||||
{
|
||||
"id": "hall",
|
||||
"name": "Hall",
|
||||
"poly": [
|
||||
[
|
||||
100,
|
||||
100
|
||||
],
|
||||
[
|
||||
400,
|
||||
100
|
||||
],
|
||||
[
|
||||
400,
|
||||
400
|
||||
],
|
||||
[
|
||||
100,
|
||||
400
|
||||
]
|
||||
]
|
||||
}
|
||||
],
|
||||
"aspect": 1.33,
|
||||
"settings": {
|
||||
"fill_mode": "glow"
|
||||
}
|
||||
}
|
||||
],
|
||||
"markers": [
|
||||
{
|
||||
"id": "lamp",
|
||||
"binding": "entity:light.hall",
|
||||
"space": "ground",
|
||||
"display": "ripple",
|
||||
"tap_action": "cover",
|
||||
"is_light": true
|
||||
}
|
||||
],
|
||||
"settings": {
|
||||
"show_all": true,
|
||||
"weather_entity": "weather.home",
|
||||
"bg_mode": "static"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user