Источники радара сравниваются по смыслу, а не по тексту

Гард `keepTwoPoint` решал, сохранять ли двухточечную калибровку, сравнением
`JSON.stringify`, то есть текста. Порядок ключей `sources` при этом меняет сам
билдер: `slots`/`ranges`/`zones`/`occupancy_entity`/`count_entity` он удаляет и
дописывает заново, а `availability_entity` остаётся на месте и уезжает в начало.
Конфиг, только что записанный этим же билдером, при следующем открытии
сравнивался неравным — и радар с `availability_entity` терял `refs` и `rms_cm`,
получая `method: manual`, при первом же обычном сохранении.

Сравнение стало каноничным по порядку ключей объектов и осталось чувствительным
к порядку элементов массивов: позиция слота — это его `target_N`. Проекция не
затронута — она считается от `mount`, `cell_cm` и `mirror`.

Issue: #567
User-Visible: no
This commit is contained in:
Codex
2026-09-13 23:23:30 +03:00
parent 6706182a27
commit 03983946c5
46 changed files with 565 additions and 431 deletions
+141 -141
View File
@@ -1,117 +1,117 @@
{
"schema": 1,
"fingerprint": "d35038d6e0b82768b72fd3e7214d8ae6d87c7b5c515aa8ec33c690e2ed59dcdb",
"fingerprint": "e2403c8d6aae4dd3487e38f45a6012b0c77a938eb1986d57f814bdeb7040e9f0",
"entry": "houseplan-card.js",
"panelEntry": "houseplan-panel.js",
"initialViewFiles": [
"houseplan-assets/houseplan-card-CVzJTjKc.js",
"houseplan-assets/houseplan-card-Bp2KsJoA.js",
"houseplan-card.js"
],
"initialViewGzipBytes": 288399,
"initialViewGzipBytes": 288397,
"initialPanelFiles": [
"houseplan-assets/houseplan-card-CVzJTjKc.js",
"houseplan-assets/houseplan-card-Bp2KsJoA.js",
"houseplan-panel.js"
],
"initialPanelGzipBytes": 289921,
"initialPanelGzipBytes": 289919,
"initialPanelOnlyFiles": [
"houseplan-panel.js"
],
"initialPanelOnlyGzipBytes": 2326,
"initialPanelOnlyGzipBytes": 2325,
"lazyFiles": [
"houseplan-assets/backdrop-pick-DggdEghD.js",
"houseplan-assets/de-DfZStMAF.js",
"houseplan-assets/editor-Ck93RuC3.js",
"houseplan-assets/fr-Ci86jgN_.js",
"houseplan-assets/furniture-plan-art.generated-4B9jE6Z2.js",
"houseplan-assets/guard-C7RXWst2.js",
"houseplan-assets/houseplan-editor-runtime-BIMVkR4y.js",
"houseplan-assets/houseplan-onboarding-runtime-CEBCC63X.js",
"houseplan-assets/hp-zigbee-topology-overlay-BGbH2q2F.js",
"houseplan-assets/iso-scene-render-BUZmS3W8.js",
"houseplan-assets/live-interaction-runtime-K6iCThD4.js",
"houseplan-assets/pdf-export-DNA8cI8e.js",
"houseplan-assets/summary-panel-runtime-loaded-DD_Vsbsb.js",
"houseplan-assets/zigbee-topology-runtime-DnSIt6e4.js",
"houseplan-assets/zigbee-topology-xuncJbK5.js"
"houseplan-assets/backdrop-pick-DGB-fNtr.js",
"houseplan-assets/de-XtVQqI8L.js",
"houseplan-assets/editor-BaXLrTgr.js",
"houseplan-assets/fr-Bj3RwbhJ.js",
"houseplan-assets/furniture-plan-art.generated-Cho-QZHw.js",
"houseplan-assets/guard-Dny50BMe.js",
"houseplan-assets/houseplan-editor-runtime-BRy7bPKI.js",
"houseplan-assets/houseplan-onboarding-runtime-Cp8e7R9m.js",
"houseplan-assets/hp-zigbee-topology-overlay-Q2KXiVxC.js",
"houseplan-assets/iso-scene-render-BEAaDf2F.js",
"houseplan-assets/live-interaction-runtime-CVq-h93e.js",
"houseplan-assets/pdf-export-vtW0A2dK.js",
"houseplan-assets/summary-panel-runtime-loaded-DBrN3OCz.js",
"houseplan-assets/zigbee-topology-BUy7kUEG.js",
"houseplan-assets/zigbee-topology-runtime-DnZAozDv.js"
],
"lazyGzipBytes": 417835,
"lazyGzipBytes": 417880,
"lazyEditorFiles": [
"houseplan-assets/backdrop-pick-DggdEghD.js",
"houseplan-assets/editor-Ck93RuC3.js",
"houseplan-assets/furniture-plan-art.generated-4B9jE6Z2.js",
"houseplan-assets/guard-C7RXWst2.js",
"houseplan-assets/houseplan-editor-runtime-BIMVkR4y.js",
"houseplan-assets/zigbee-topology-xuncJbK5.js"
"houseplan-assets/backdrop-pick-DGB-fNtr.js",
"houseplan-assets/editor-BaXLrTgr.js",
"houseplan-assets/furniture-plan-art.generated-Cho-QZHw.js",
"houseplan-assets/guard-Dny50BMe.js",
"houseplan-assets/houseplan-editor-runtime-BRy7bPKI.js",
"houseplan-assets/zigbee-topology-BUy7kUEG.js"
],
"lazyEditorGzipBytes": 204999,
"lazyEditorGzipBytes": 205042,
"lazyOnboardingFiles": [
"houseplan-assets/backdrop-pick-DggdEghD.js",
"houseplan-assets/houseplan-onboarding-runtime-CEBCC63X.js"
"houseplan-assets/backdrop-pick-DGB-fNtr.js",
"houseplan-assets/houseplan-onboarding-runtime-Cp8e7R9m.js"
],
"lazyOnboardingGzipBytes": 13917,
"lazyOnboardingGzipBytes": 13913,
"lazyLocaleFiles": [
"houseplan-assets/de-DfZStMAF.js",
"houseplan-assets/fr-Ci86jgN_.js"
"houseplan-assets/de-XtVQqI8L.js",
"houseplan-assets/fr-Bj3RwbhJ.js"
],
"lazyLocaleGzipBytes": 54812,
"lazyLocaleGzipBytes": 54817,
"lazyIsometricFiles": [
"houseplan-assets/guard-C7RXWst2.js",
"houseplan-assets/iso-scene-render-BUZmS3W8.js"
"houseplan-assets/guard-Dny50BMe.js",
"houseplan-assets/iso-scene-render-BEAaDf2F.js"
],
"lazyIsometricGzipBytes": 13458,
"lazyIsometricGzipBytes": 13454,
"lazyFurnitureArtFiles": [
"houseplan-assets/furniture-plan-art.generated-4B9jE6Z2.js"
"houseplan-assets/furniture-plan-art.generated-Cho-QZHw.js"
],
"lazyFurnitureArtGzipBytes": 10254,
"lazyPdfFiles": [
"houseplan-assets/furniture-plan-art.generated-4B9jE6Z2.js",
"houseplan-assets/pdf-export-DNA8cI8e.js"
"houseplan-assets/furniture-plan-art.generated-Cho-QZHw.js",
"houseplan-assets/pdf-export-vtW0A2dK.js"
],
"lazyPdfGzipBytes": 120126,
"files": [
{
"path": "houseplan-assets/backdrop-pick-DggdEghD.js",
"sha256": "9b05a57cabfd5c7abc189430860c7ef38bab382def6d8b275375acebd53c17b7",
"path": "houseplan-assets/backdrop-pick-DGB-fNtr.js",
"sha256": "54f8c91f65220d0bf33863f17571508cc0499efc942ef662bbc0d21db97d3f81",
"rawBytes": 19956,
"gzipBytes": 6880,
"gzipBytes": 6878,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-CVzJTjKc.js"
"houseplan-assets/houseplan-card-Bp2KsJoA.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/de-DfZStMAF.js",
"sha256": "59926fc12418f54962ef8ed91759fd87bf3e3485054109f4fc77bfeea8848e0b",
"path": "houseplan-assets/de-XtVQqI8L.js",
"sha256": "7ec3e3a84388c832e2fc389866563f36fa2f15e35a32df21a0f0c23b0eb8d34c",
"rawBytes": 91402,
"gzipBytes": 27690,
"gzipBytes": 27692,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/editor-Ck93RuC3.js",
"sha256": "2810ffa03e83a17e450a0cec3dd5ae8e495022880953e7b3deccb873c60d13fa",
"path": "houseplan-assets/editor-BaXLrTgr.js",
"sha256": "c2258eec55b890f7880512ee0c4291b82130965a4349dbe37bd209cb240e61ab",
"rawBytes": 3832,
"gzipBytes": 1584,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-CVzJTjKc.js"
"houseplan-assets/houseplan-card-Bp2KsJoA.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/fr-Ci86jgN_.js",
"sha256": "0f635d421e5419efbd32e16c168bc2a68a6241e219f710030e53728186376443",
"path": "houseplan-assets/fr-Bj3RwbhJ.js",
"sha256": "bf76437a65981e816ed017fa1f04bf051b8f8f213ee636288f3ac4a56e3719f7",
"rawBytes": 93667,
"gzipBytes": 27122,
"gzipBytes": 27125,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/furniture-plan-art.generated-4B9jE6Z2.js",
"sha256": "29c8bdbc1a05946c4009385ab7aef211ede252a74a9a5517b953ec14e9def9ce",
"path": "houseplan-assets/furniture-plan-art.generated-Cho-QZHw.js",
"sha256": "45872b4065f9cc732f64871d5f623e993dc48100b282512ee6611a35e562486e",
"rawBytes": 33655,
"gzipBytes": 10254,
"isEntry": false,
@@ -119,193 +119,193 @@
"dynamicImports": []
},
{
"path": "houseplan-assets/guard-C7RXWst2.js",
"sha256": "59cdfc10a4030dfe08a1944ddd1ece661720aef1aefd88ae519e9e9595c32f99",
"path": "houseplan-assets/guard-Dny50BMe.js",
"sha256": "7a075ff4187a965c9af7312bf6f2d270f544684ea51bad1c18c91ef86a899682",
"rawBytes": 518,
"gzipBytes": 372,
"gzipBytes": 368,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-CVzJTjKc.js"
"houseplan-assets/houseplan-card-Bp2KsJoA.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/houseplan-card-CVzJTjKc.js",
"sha256": "ed6e956bbe117086171313f9cb53855398c6df821a09f5178436cd8fadd59d49",
"path": "houseplan-assets/houseplan-card-Bp2KsJoA.js",
"sha256": "9d4cd1cf6c97a9b30e10064a6f1fe15817073a3e34d87fef72f4d9873b2ae1d8",
"rawBytes": 1024671,
"gzipBytes": 287595,
"gzipBytes": 287594,
"isEntry": false,
"imports": [],
"dynamicImports": [
"houseplan-assets/de-DfZStMAF.js",
"houseplan-assets/editor-Ck93RuC3.js",
"houseplan-assets/fr-Ci86jgN_.js",
"houseplan-assets/furniture-plan-art.generated-4B9jE6Z2.js",
"houseplan-assets/houseplan-editor-runtime-BIMVkR4y.js",
"houseplan-assets/houseplan-onboarding-runtime-CEBCC63X.js",
"houseplan-assets/hp-zigbee-topology-overlay-BGbH2q2F.js",
"houseplan-assets/iso-scene-render-BUZmS3W8.js",
"houseplan-assets/live-interaction-runtime-K6iCThD4.js",
"houseplan-assets/pdf-export-DNA8cI8e.js",
"houseplan-assets/summary-panel-runtime-loaded-DD_Vsbsb.js"
"houseplan-assets/de-XtVQqI8L.js",
"houseplan-assets/editor-BaXLrTgr.js",
"houseplan-assets/fr-Bj3RwbhJ.js",
"houseplan-assets/furniture-plan-art.generated-Cho-QZHw.js",
"houseplan-assets/houseplan-editor-runtime-BRy7bPKI.js",
"houseplan-assets/houseplan-onboarding-runtime-Cp8e7R9m.js",
"houseplan-assets/hp-zigbee-topology-overlay-Q2KXiVxC.js",
"houseplan-assets/iso-scene-render-BEAaDf2F.js",
"houseplan-assets/live-interaction-runtime-CVq-h93e.js",
"houseplan-assets/pdf-export-vtW0A2dK.js",
"houseplan-assets/summary-panel-runtime-loaded-DBrN3OCz.js"
]
},
{
"path": "houseplan-assets/houseplan-editor-runtime-BIMVkR4y.js",
"sha256": "e0c68194638f9b35ccb5da2eeb24706432b97c579a105e8ce913d80eb9fcf7a4",
"rawBytes": 668820,
"gzipBytes": 178483,
"path": "houseplan-assets/houseplan-editor-runtime-BRy7bPKI.js",
"sha256": "1534bb00e5cfde78a5c3019d0300e7990a4007ea44ceeac293873fed466fd805",
"rawBytes": 668940,
"gzipBytes": 178531,
"isEntry": false,
"imports": [
"houseplan-assets/backdrop-pick-DggdEghD.js",
"houseplan-assets/furniture-plan-art.generated-4B9jE6Z2.js",
"houseplan-assets/guard-C7RXWst2.js",
"houseplan-assets/houseplan-card-CVzJTjKc.js",
"houseplan-assets/zigbee-topology-xuncJbK5.js"
"houseplan-assets/backdrop-pick-DGB-fNtr.js",
"houseplan-assets/furniture-plan-art.generated-Cho-QZHw.js",
"houseplan-assets/guard-Dny50BMe.js",
"houseplan-assets/houseplan-card-Bp2KsJoA.js",
"houseplan-assets/zigbee-topology-BUy7kUEG.js"
],
"dynamicImports": [
"houseplan-assets/zigbee-topology-runtime-DnSIt6e4.js"
"houseplan-assets/zigbee-topology-runtime-DnZAozDv.js"
]
},
{
"path": "houseplan-assets/houseplan-onboarding-runtime-CEBCC63X.js",
"sha256": "b7606131905dcd6af8e66150bbfe94dda01ce019f19df7060a149af646dadbf2",
"path": "houseplan-assets/houseplan-onboarding-runtime-Cp8e7R9m.js",
"sha256": "a4506f259318968b9df05be859881390f0ff6c13cff2fbb52899400db0234ba2",
"rawBytes": 28287,
"gzipBytes": 7037,
"gzipBytes": 7035,
"isEntry": false,
"imports": [
"houseplan-assets/backdrop-pick-DggdEghD.js",
"houseplan-assets/houseplan-card-CVzJTjKc.js"
"houseplan-assets/backdrop-pick-DGB-fNtr.js",
"houseplan-assets/houseplan-card-Bp2KsJoA.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/hp-zigbee-topology-overlay-BGbH2q2F.js",
"sha256": "7a994caef66724ddfa6354d64d18dbdc50c7cca3c76586ded04f0ebb20c57d43",
"path": "houseplan-assets/hp-zigbee-topology-overlay-Q2KXiVxC.js",
"sha256": "ddc02ddacaf83bc5926edca5fcd4278c38e3ff45339206bd2236701fb6d4b322",
"rawBytes": 10756,
"gzipBytes": 3681,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-CVzJTjKc.js",
"houseplan-assets/zigbee-topology-runtime-DnSIt6e4.js",
"houseplan-assets/zigbee-topology-xuncJbK5.js"
"houseplan-assets/houseplan-card-Bp2KsJoA.js",
"houseplan-assets/zigbee-topology-BUy7kUEG.js",
"houseplan-assets/zigbee-topology-runtime-DnZAozDv.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/iso-scene-render-BUZmS3W8.js",
"sha256": "45ccde6462f2e411d6f0c396be8a16e9236eb31e9d843466a8f8644f65a317ab",
"path": "houseplan-assets/iso-scene-render-BEAaDf2F.js",
"sha256": "d68e9e642b2db64dacd40ef4bfb66a5f94f9d15965a951287aa8a1a3a8338507",
"rawBytes": 38562,
"gzipBytes": 13086,
"isEntry": false,
"imports": [
"houseplan-assets/guard-C7RXWst2.js",
"houseplan-assets/houseplan-card-CVzJTjKc.js"
"houseplan-assets/guard-Dny50BMe.js",
"houseplan-assets/houseplan-card-Bp2KsJoA.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/live-interaction-runtime-K6iCThD4.js",
"sha256": "b5c607440bc138b7473de962083e4a30a482e3ca2a263f92aa2571d859134803",
"path": "houseplan-assets/live-interaction-runtime-CVq-h93e.js",
"sha256": "a473f9870a445e717046d6e2289e2a94a263b7f17712416e12f98fcf1e9c5126",
"rawBytes": 6233,
"gzipBytes": 2497,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-CVzJTjKc.js"
"houseplan-assets/houseplan-card-Bp2KsJoA.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/pdf-export-DNA8cI8e.js",
"sha256": "577a55b1e612d214c99cdb02892a0db4659e2623813c05d1508b9b98473ef2e1",
"path": "houseplan-assets/pdf-export-vtW0A2dK.js",
"sha256": "3765b0bda4909759365926d3af76a78a6a3ddaa09a269056590bbee4f67cf2b7",
"rawBytes": 236244,
"gzipBytes": 109872,
"isEntry": false,
"imports": [
"houseplan-assets/furniture-plan-art.generated-4B9jE6Z2.js",
"houseplan-assets/houseplan-card-CVzJTjKc.js"
"houseplan-assets/furniture-plan-art.generated-Cho-QZHw.js",
"houseplan-assets/houseplan-card-Bp2KsJoA.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/summary-panel-editor-COUN64Nh.js",
"sha256": "f5e4b6b8526d3e1cdac0d6962ae2c322d4495084b40350e9bc694a191b4536da",
"path": "houseplan-assets/summary-panel-editor-DsAK6zMd.js",
"sha256": "2c1534b7e99d8653c5f7e2a1fdb99e06e42c89fb690a5fb22edbd8d17142707a",
"rawBytes": 14824,
"gzipBytes": 3399,
"gzipBytes": 3400,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-CVzJTjKc.js",
"houseplan-assets/summary-panel-runtime-loaded-DD_Vsbsb.js"
"houseplan-assets/houseplan-card-Bp2KsJoA.js",
"houseplan-assets/summary-panel-runtime-loaded-DBrN3OCz.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/summary-panel-metrics-BpIjfU2P.js",
"sha256": "027e6d440fc71e3033b345e0307c2dce05d1cf16b6a9998093f497993ac0f534",
"path": "houseplan-assets/summary-panel-metrics-TjDW1jDj.js",
"sha256": "724a1ffe8016f56f41a190c83f1a062b0f64134e28e58382a5efed260321888f",
"rawBytes": 2610,
"gzipBytes": 1305,
"gzipBytes": 1306,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-CVzJTjKc.js"
"houseplan-assets/houseplan-card-Bp2KsJoA.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/summary-panel-runtime-loaded-DD_Vsbsb.js",
"sha256": "e9e5f56e3df9d4cf7004274f0bddc7c68bdd04df00dd17d4958900fd67c37492",
"path": "houseplan-assets/summary-panel-runtime-loaded-DBrN3OCz.js",
"sha256": "0b4f4e39e4b2d650a6306b1ab83e6af0a910c69bbf038d911d8e6f4df0445f23",
"rawBytes": 73366,
"gzipBytes": 20088,
"gzipBytes": 20087,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-CVzJTjKc.js"
"houseplan-assets/houseplan-card-Bp2KsJoA.js"
],
"dynamicImports": [
"houseplan-assets/summary-panel-editor-COUN64Nh.js",
"houseplan-assets/summary-panel-metrics-BpIjfU2P.js"
"houseplan-assets/summary-panel-editor-DsAK6zMd.js",
"houseplan-assets/summary-panel-metrics-TjDW1jDj.js"
]
},
{
"path": "houseplan-assets/zigbee-topology-runtime-DnSIt6e4.js",
"sha256": "9af1e06dfc4a6a9a4cc388bb56ab3f67d7e6a5e16a8519aeab9f86f570758e0f",
"path": "houseplan-assets/zigbee-topology-BUy7kUEG.js",
"sha256": "af5fb524f4833e31f3307b682e1124376e94a663c5a0844e47f20db9d1489db2",
"rawBytes": 18961,
"gzipBytes": 7427,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-Bp2KsJoA.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/zigbee-topology-runtime-DnZAozDv.js",
"sha256": "5bb2789599f6239f891d1a233178ddbae7483286c31e250319ca60890233487a",
"rawBytes": 3941,
"gzipBytes": 1763,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-CVzJTjKc.js",
"houseplan-assets/zigbee-topology-xuncJbK5.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/zigbee-topology-xuncJbK5.js",
"sha256": "55f71fcbe6888658abec62af9285d6ac836980007304fa29932165635f0f69c9",
"rawBytes": 18961,
"gzipBytes": 7426,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-CVzJTjKc.js"
"houseplan-assets/houseplan-card-Bp2KsJoA.js",
"houseplan-assets/zigbee-topology-BUy7kUEG.js"
],
"dynamicImports": []
},
{
"path": "houseplan-card.js",
"sha256": "a859c7191801058ca3eea5552da83991b927c48832b14499159c086396e1d189",
"sha256": "1bf6c1897928f45e1d8a09e674301c2c988132c7cd9af83abdf06d63524b06a5",
"rawBytes": 1205,
"gzipBytes": 804,
"gzipBytes": 803,
"isEntry": true,
"imports": [
"houseplan-assets/houseplan-card-CVzJTjKc.js"
"houseplan-assets/houseplan-card-Bp2KsJoA.js"
],
"dynamicImports": []
},
{
"path": "houseplan-panel.js",
"sha256": "0386f4bc28fc4728ca39301e25450d86537f8c0e2d2d368afaeb63914e8abb35",
"sha256": "6b971df17bbdeb9b5d18f77d2ea60ac66bc2373573210e303febd5addd122bff",
"rawBytes": 6165,
"gzipBytes": 2326,
"gzipBytes": 2325,
"isEntry": true,
"imports": [
"houseplan-assets/houseplan-card-CVzJTjKc.js"
"houseplan-assets/houseplan-card-Bp2KsJoA.js"
],
"dynamicImports": []
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,14 +1,14 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="d35038d6e0b82768b72fd3e7214d8ae6d87c7b5c515aa8ec33c690e2ed59dcdb";import{m as e,l as o,t,e3 as s,A as a,e4 as i,e5 as l,e6 as n,dU as r,b as c}from"./houseplan-card-CVzJTjKc.js";class h extends e{constructor(){super(...arguments),this._spaces=null,this._spacesLoading=!1,this._spacesAuthoritative=!1}setConfig(e){this._config=e}async _loadSpaces(){if(!this._spaces&&!this._spacesLoading&&this.hass){this._spacesLoading=!0;try{const e=await this.hass.callWS({type:"houseplan/config/get"});this._spaces=(e?.config?.spaces||[]).map(e=>({value:e.id,label:e.title||e.id})),this._spacesAuthoritative=!0}catch{this._spaces=[],this._spacesAuthoritative=!1}finally{this._spacesLoading=!1}}}get _lang(){return o(this.hass,this._config?.language)}get _floorToken(){const e=this._config?.floor;return"number"==typeof e?`__houseplan_yaml_floor_index__:${String(e)}`:null}get _formData(){const e={...this._config},o=this._floorToken;return o?e.floor=o:Object.prototype.hasOwnProperty.call(e,"floor")||(e.floor=""),e}get _schema(){const e=this._spaces||[],o=this._lang,a=[{value:"",label:t(o,"editor.floor_none")}],i=this._floorToken;i&&a.push({value:i,label:t(o,"editor.floor_index",{index:String(this._config?.floor)})});const l="string"==typeof this._config?.floor?this._config.floor:"";l&&!e.some(e=>e.value===l)&&a.push({value:l,label:l}),a.push(...e);const n="string"==typeof this._config?.default_floor?this._config.default_floor:"",r=[...e];return n&&!e.some(e=>e.value===n)&&r.unshift({value:n,label:n}),[{name:"title",selector:{text:{}}},{name:"floor",selector:{select:{mode:"dropdown",options:a}}},e.length?{name:"default_floor",selector:{select:{mode:"dropdown",options:r}}}:{name:"default_floor",selector:{text:{}}},{name:"language",selector:{select:{mode:"dropdown",options:s(t(o,"editor.lang_auto"),this._config?.language)}}},{name:"icon_size",selector:{number:{min:1,max:6,step:.1,mode:"box"}}},{name:"show_temperature",selector:{boolean:{}}},{name:"live_states",selector:{boolean:{}}},{name:"show_signal",selector:{boolean:{}}},{name:"kiosk",selector:{boolean:{}}},{name:"cycle",selector:{number:{min:0,max:3600,step:5,mode:"box"}}}]}render(){if(!this.hass||!this._config)return a;const e=i(this,l,o(this.hass,this._config.language));if("cold"===e)return n();if("warm"===e)return r;this._loadSpaces();const s=this._lang,h={title:t(s,"editor.title"),floor:t(s,"editor.floor"),default_floor:t(s,"editor.default_floor"),language:t(s,"editor.language"),icon_size:t(s,"editor.icon_size"),show_temperature:t(s,"editor.show_temperature"),live_states:t(s,"editor.live_states"),show_signal:t(s,"editor.show_signal"),kiosk:t(s,"editor.kiosk"),cycle:t(s,"editor.cycle")},_=this._schema,f=function(e,o,t){if(!t||null===o)return null;const s="string"==typeof e?.default_floor?e.default_floor:"";return!s||o.some(e=>e.value===s)?null:s}(this._config,this._spaces,this._spacesAuthoritative),d=e=>c`<ha-form
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="e2403c8d6aae4dd3487e38f45a6012b0c77a938eb1986d57f814bdeb7040e9f0";import{m as e,l as o,t,e3 as s,A as a,e4 as i,e5 as l,e6 as n,dU as r,b as c}from"./houseplan-card-Bp2KsJoA.js";class h extends e{constructor(){super(...arguments),this._spaces=null,this._spacesLoading=!1,this._spacesAuthoritative=!1}setConfig(e){this._config=e}async _loadSpaces(){if(!this._spaces&&!this._spacesLoading&&this.hass){this._spacesLoading=!0;try{const e=await this.hass.callWS({type:"houseplan/config/get"});this._spaces=(e?.config?.spaces||[]).map(e=>({value:e.id,label:e.title||e.id})),this._spacesAuthoritative=!0}catch{this._spaces=[],this._spacesAuthoritative=!1}finally{this._spacesLoading=!1}}}get _lang(){return o(this.hass,this._config?.language)}get _floorToken(){const e=this._config?.floor;return"number"==typeof e?`__houseplan_yaml_floor_index__:${String(e)}`:null}get _formData(){const e={...this._config},o=this._floorToken;return o?e.floor=o:Object.prototype.hasOwnProperty.call(e,"floor")||(e.floor=""),e}get _schema(){const e=this._spaces||[],o=this._lang,a=[{value:"",label:t(o,"editor.floor_none")}],i=this._floorToken;i&&a.push({value:i,label:t(o,"editor.floor_index",{index:String(this._config?.floor)})});const l="string"==typeof this._config?.floor?this._config.floor:"";l&&!e.some(e=>e.value===l)&&a.push({value:l,label:l}),a.push(...e);const n="string"==typeof this._config?.default_floor?this._config.default_floor:"",r=[...e];return n&&!e.some(e=>e.value===n)&&r.unshift({value:n,label:n}),[{name:"title",selector:{text:{}}},{name:"floor",selector:{select:{mode:"dropdown",options:a}}},e.length?{name:"default_floor",selector:{select:{mode:"dropdown",options:r}}}:{name:"default_floor",selector:{text:{}}},{name:"language",selector:{select:{mode:"dropdown",options:s(t(o,"editor.lang_auto"),this._config?.language)}}},{name:"icon_size",selector:{number:{min:1,max:6,step:.1,mode:"box"}}},{name:"show_temperature",selector:{boolean:{}}},{name:"live_states",selector:{boolean:{}}},{name:"show_signal",selector:{boolean:{}}},{name:"kiosk",selector:{boolean:{}}},{name:"cycle",selector:{number:{min:0,max:3600,step:5,mode:"box"}}}]}render(){if(!this.hass||!this._config)return a;const e=i(this,l,o(this.hass,this._config.language));if("cold"===e)return n();if("warm"===e)return r;this._loadSpaces();const s=this._lang,h={title:t(s,"editor.title"),floor:t(s,"editor.floor"),default_floor:t(s,"editor.default_floor"),language:t(s,"editor.language"),icon_size:t(s,"editor.icon_size"),show_temperature:t(s,"editor.show_temperature"),live_states:t(s,"editor.live_states"),show_signal:t(s,"editor.show_signal"),kiosk:t(s,"editor.kiosk"),cycle:t(s,"editor.cycle")},f=this._schema,_=function(e,o,t){if(!t||null===o)return null;const s="string"==typeof e?.default_floor?e.default_floor:"";return!s||o.some(e=>e.value===s)?null:s}(this._config,this._spaces,this._spacesAuthoritative),d=e=>c`<ha-form
.hass=${this.hass}
.data=${this._formData}
.schema=${e}
.computeLabel=${e=>h[e.name]||e.name}
@value-changed=${this._valueChanged}
></ha-form>`;return c`
${d(_.slice(0,3))}
${f?c`<div class="default-floor-error" role="alert"
${d(f.slice(0,3))}
${_?c`<div class="default-floor-error" role="alert"
style="color:var(--error-color,#db4437);margin:-4px 0 12px;overflow-wrap:anywhere">
${t(s,"editor.default_floor_missing",{id:f})}
${t(s,"editor.default_floor_missing",{id:_})}
</div>`:a}
${d(_.slice(3))}
${d(f.slice(3))}
`}_valueChanged(e){const o={...this._config,...e.detail.value};""===o.floor?delete o.floor:o.floor===this._floorToken&&(o.floor=this._config?.floor);const t=new Event("config-changed",{bubbles:!0,composed:!0});t.detail={config:o},this.dispatchEvent(t)}}h.properties={hass:{attribute:!1},_config:{state:!0},_spaces:{state:!0}},customElements.get("houseplan-card-editor")||customElements.define("houseplan-card-editor",h);
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="d35038d6e0b82768b72fd3e7214d8ae6d87c7b5c515aa8ec33c690e2ed59dcdb";import{dS as r,dT as e,dU as t}from"./houseplan-card-CVzJTjKc.js";const s={},a=r(class extends e{constructor(){super(...arguments),this.ot=s}render(r,e){return e()}update(r,[e,s]){if(Array.isArray(e)){if(Array.isArray(this.ot)&&this.ot.length===e.length&&e.every((r,e)=>r===this.ot[e]))return t}else if(this.ot===e)return t;return this.ot=Array.isArray(e)?Array.from(e):e,this.render(e,s)}});export{a as i};
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="e2403c8d6aae4dd3487e38f45a6012b0c77a938eb1986d57f814bdeb7040e9f0";import{dS as r,dT as e,dU as t}from"./houseplan-card-Bp2KsJoA.js";const s={},a=r(class extends e{constructor(){super(...arguments),this.ot=s}render(r,e){return e()}update(r,[e,s]){if(Array.isArray(e)){if(Array.isArray(this.ot)&&this.ot.length===e.length&&e.every((r,e)=>r===this.ot[e]))return t}else if(this.ot===e)return t;return this.ot=Array.isArray(e)?Array.from(e):e,this.render(e,s)}});export{a as i};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="d35038d6e0b82768b72fd3e7214d8ae6d87c7b5c515aa8ec33c690e2ed59dcdb";import{l as t,b0 as s,A as e,t as a,b as o,cj as l,ck as i,cl as h,cm as c,aZ as n,cn as r,cs as p,co as d,cp as _,cq as u,cr as g,ct as m,cu as b,dp as $,dq as v,dr as f,aY as y,a_ as w,ds as D}from"./houseplan-card-CVzJTjKc.js";import{c as k,e as S,r as C,a as M}from"./backdrop-pick-DggdEghD.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="d35038d6e0b82768b72fd3e7214d8ae6d87c7b5c515aa8ec33c690e2ed59dcdb";class L{constructor(t){this.host=t,this._toggleServerPlans=async()=>{const t=this.host._spaceDialog;if(t)if(t.pickSaved)this.host._spaceDialog={...t,pickSaved:!1};else{this.host._spaceDialog={...t,pickSaved:!0,savedBusy:!0};try{const t=await this.host.hass.callWS({type:"houseplan/plans/list"}),s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:t?.plans||[],savedBusy:!1})}catch(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:[],savedBusy:!1}),this.host._showToast(this.host._t("toast.plans_list_failed",{err:this.host._errText(t)}))}}}}_help(l){const i=`${l}.aria`,h=t(this.host.hass,this.host._config?.language);return s(h,l)&&s(h,i)?o`<hp-help data-help-key=${l}
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="e2403c8d6aae4dd3487e38f45a6012b0c77a938eb1986d57f814bdeb7040e9f0";import{l as t,b0 as s,A as e,t as a,b as o,cj as l,ck as i,cl as h,cm as c,aZ as n,cn as r,cs as p,co as d,cp as _,cq as u,cr as g,ct as m,cu as b,dp as $,dq as v,dr as f,aY as y,a_ as w,ds as D}from"./houseplan-card-Bp2KsJoA.js";import{c as k,e as S,r as C,a as M}from"./backdrop-pick-DGB-fNtr.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="e2403c8d6aae4dd3487e38f45a6012b0c77a938eb1986d57f814bdeb7040e9f0";class L{constructor(t){this.host=t,this._toggleServerPlans=async()=>{const t=this.host._spaceDialog;if(t)if(t.pickSaved)this.host._spaceDialog={...t,pickSaved:!1};else{this.host._spaceDialog={...t,pickSaved:!0,savedBusy:!0};try{const t=await this.host.hass.callWS({type:"houseplan/plans/list"}),s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:t?.plans||[],savedBusy:!1})}catch(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:[],savedBusy:!1}),this.host._showToast(this.host._t("toast.plans_list_failed",{err:this.host._errText(t)}))}}}}_help(l){const i=`${l}.aria`,h=t(this.host.hass,this.host._config?.language);return s(h,l)&&s(h,i)?o`<hp-help data-help-key=${l}
.text=${a(h,l)} .ariaLabel=${a(h,i)}></hp-help>`:e}_openSpaceDialog(t,s){if(!this.host._serverStorage||!this.host._serverCfg)return void this.host._showToast(this.host._t("toast.integration_missing"));if("edit"===t){const e=this.host._serverCfg.spaces.find(t=>t.id===s);if(!e)return;const a=l(e),o=e.settings?.custom_fill&&"object"==typeof e.settings.custom_fill?i(e.settings.custom_fill):null,p="none"===a.fill?{...o||h,a:0}:o;return void(this.host._spaceDialog={mode:t,spaceId:s,title:e.title,planUrl:e.plan_url||null,planFile:null,source:e.plan_url?"file":"draw",showBorders:a.showBorders,showNames:a.showNames,zeroWallStyle:r(e),displayTouched:!0,hideDecor:a.hideDecor,hideOpenings:a.hideOpenings,roomColor:a.color,roomOpacity:a.opacity,fillMode:"none"===a.fill?"custom":a.fill,customFill:p,glowEnabled:a.glow,bgColor:a.bgColor,bgMode:"static"===e.settings?.bg_mode||"daynight"===e.settings?.bg_mode?e.settings.bg_mode:null,northDeg:n({},e.settings),sunRays:"boolean"==typeof e.settings?.sun_rays?e.settings.sun_rays:null,tempMin:a.tempMin,tempMax:a.tempMax,showLqi:a.showLqi??this.host._config?.show_signal??!0,cardFontScale:a.cardFontScale,labelTemp:a.labelTemp,labelHum:a.labelHum,labelLqi:a.labelLqi,labelLight:a.labelLight,cellCm:Number(e.cell_cm)>0?Number(e.cell_cm):5,cellCmInput:c(Number(e.cell_cm)>0?Number(e.cell_cm):5,this.host._imperial),cellCmTouched:!1,busy:!1})}const e=p(this.host._imperial);this.host._spaceDialog={mode:t,title:"",planUrl:null,planFile:null,...m(),hideDecor:!1,hideOpenings:!1,zeroWallStyle:"dashed",roomColor:g,roomOpacity:u,fillMode:"custom",customFill:{...h,a:0},glowEnabled:!0,bgColor:null,bgMode:"daynight",northDeg:null,sunRays:null,tempMin:_,tempMax:d,showLqi:this.host._config?.show_signal??!0,cardFontScale:1,labelTemp:!1,labelHum:!1,labelLqi:!1,labelLight:!1,cellCm:e,cellCmInput:c(e,this.host._imperial),cellCmTouched:!1,busy:!1}}async _pickPlanFile(t){const s=t.target,e=s.files?.[0];if(!e||!this.host._spaceDialog)return;s.value="";const a=await k(e);if("reject"===a.kind)return void this.host._showToast(this.host._t("toast.plan_formats"));if("guard"===a.kind)return void(this.host._backdropGuard=a.state);const o=await S(e,a.ext,e.name);this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:o})}_renderBackdropGuard(){return C(this.host,t=>{this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:t})},()=>{this.host._backdropGuard=null},this.host.hass)??e}_useServerPlan(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,planUrl:t,planFile:null,pickSaved:!1,savedAspect:void 0},this.host._aspectJob=this._readPlanAspect(t))}async _readPlanAspect(t){for(let s=0;s<40;s++){const s=this.host._display(t);if(s){const e=await new Promise(t=>{const e=new Image;e.onload=()=>t(e.naturalWidth&&e.naturalHeight?e.naturalWidth/e.naturalHeight:0),e.onerror=()=>t(0),e.src=s}),a=this.host._spaceDialog;return a&&a.planUrl===t&&Number.isFinite(e)&&e>0?(this.host._spaceDialog={...a,savedAspect:e},e):0}if(await new Promise(t=>setTimeout(t,150)),this.host._spaceDialog?.planUrl!==t)return 0}return 0}async _deleteServerPlan(t){const s=this.host._spaceDialog,e=s?.saved?.find(s=>s.name===t);if(!s||!e||e.used_by.length||e.url===s.planUrl)return;const a=await this.host._confirmDanger({key:"delete-plan",kind:"destructive",title:this.host._t("confirm.delete_plan_title"),message:this.host._t("confirm.delete_plan_body"),objectName:t,confirmLabel:this.host._t("btn.delete"),cancelLabel:this.host._t("btn.cancel")}),o=this.host._spaceDialog,l=o?.saved?.find(s=>s.name===t);if(a&&o&&l&&l.url===e.url&&l.modified===e.modified&&!l.used_by.length&&l.url!==o.planUrl)try{await this.host.hass.callWS({type:"houseplan/plans/delete",name:t});const s=this.host._spaceDialog;s?.saved&&(this.host._spaceDialog={...s,saved:s.saved.filter(s=>s.name!==t)})}catch(t){this.host._showToast(this.host._t("toast.plan_delete_failed",{err:this.host._errText(t)}))}}_renderServerPlans(t){if(t.savedBusy)return o`<div class="savedplans muted">${this.host._t("space.loading")}</div>`;const s=t.saved||[];if(!s.length)return o`<div class="savedplans muted">${this.host._t("space.no_saved")}</div>`;return o`<div class="savedplans">
${s.map(s=>{return o`
<div class="savedplan ${s.url===t.planUrl?"cur":""}">
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="d35038d6e0b82768b72fd3e7214d8ae6d87c7b5c515aa8ec33c690e2ed59dcdb";import{b as a,A as e}from"./houseplan-card-CVzJTjKc.js";import{s,n as t,a as l,m as r,b as o,c as i,d as u}from"./summary-panel-runtime-loaded-DD_Vsbsb.js";const m=m=>{const{host:c,dialog:d,problems:n,t:b}=m,y=n.find(a=>"error"===a.kind),$=d.localShow!==d.baseLocalShow||!d.localOnly&&!s(t(d.draft),d.base),p=$&&!d.busy&&!y,v=a=>n.find(e=>e.path===a),h=a=>a?b(`summary.problem.${a.code}`):"",k=()=>m.close(),g=a`<label class="summary-switch" for="summary-local-show">
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="e2403c8d6aae4dd3487e38f45a6012b0c77a938eb1986d57f814bdeb7040e9f0";import{b as a,A as e}from"./houseplan-card-Bp2KsJoA.js";import{s,n as t,a as l,m as r,b as o,c as i,d as u}from"./summary-panel-runtime-loaded-DBrN3OCz.js";const m=m=>{const{host:c,dialog:d,problems:n,t:b}=m,y=n.find(a=>"error"===a.kind),$=d.localShow!==d.baseLocalShow||!d.localOnly&&!s(t(d.draft),d.base),p=$&&!d.busy&&!y,v=a=>n.find(e=>e.path===a),h=a=>a?b(`summary.problem.${a.code}`):"",k=()=>m.close(),g=a`<label class="summary-switch" for="summary-local-show">
<span class="summary-switch-caption"><strong>${b("summary.show_local")}</strong>
<small id="summary-local-show-hint">${b("summary.show_local_hint")}</small></span>
<input id="summary-local-show" data-summary-local-show type="checkbox"
@@ -1 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="d35038d6e0b82768b72fd3e7214d8ae6d87c7b5c515aa8ec33c690e2ed59dcdb";import{e9 as e,L as t,a2 as n,J as i,an as o,N as r,bo as s,bn as a,a1 as c,a0 as l,ax as d,ea as u,eb as f,bq as m,ec as g}from"./houseplan-card-CVzJTjKc.js";function v(e){if(!e.registry.authoritative)return null;const t=new Set,n=d(e.markers);for(const i of Object.values(e.registry.devices||{}))i?.id&&"service"!==i.entry_type&&!n.devices.has(i.id)&&i.area_id&&e.areaToSpace[i.area_id]&&t.add(i.id);for(const i of e.markers||[]){if(i.removed||"virtual"===i.binding)continue;const o=String(i.binding||"").indexOf(":");if(o<1)continue;const r=i.binding.slice(0,o),s=i.binding.slice(o+1),a="device"===r?e.registry.devices?.[s]:null,c="entity"===r?e.registry.entities?.[s]:null,l="device"===r?s:c?.device_id,d="device"===r?a?.area_id:c?.area_id||l&&e.registry.devices?.[l]?.area_id,u="string"==typeof i.room_id&&i.room_id.length>0&&null===i.area?"":i.area||d||"",f=u&&e.areaToSpace[u]||i.space||e.firstSpaceId;l&&e.registry.devices?.[l]&&e.spaceIds.has(f)&&(!n.devices.has(l)||"entity"===r&&n.liveEntities.has(s))&&t.add(l)}return t}function y(e,t){return e?.length?t?.length?g(e,t):e:t}function _(e,t){const n=c(e.rooms,t.walls,t.openCuts,[],i,t.cellCm,o,r);return{roomGeom:"ok"===n.status||"degraded-extra"===n.status?n.roomGeom:void 0,multiWallNodes:l(e.rooms,t.walls,t.openCuts,i,t.cellCm,o,r)}}function*h(c,l,d=_){try{let u=0;for(const f of l){const l=c.spaces.find(e=>String(e?.id)===f.id);if(!l)continue;const m=e(l,f),g=d(f,m);let v=null;for(const e of f.rooms){if(!e.id)continue;const a=t(e);if(!a)continue;const c=n(f.rooms,e.id,m.walls,m.openCuts,i,m.cellCm,o,r,g.roomGeom,g.multiWallNodes)||a;v=y(v,s(c,m.physicalBodies)),yield}const _=m.cellCm/o;u+=a(v)*_*_/1e4}return u}catch{return null}}function p(e,t,n=_){const i=h(e,t,n);let o=i.next();for(;!o.done;)o=i.next();return o.value}function b(e,t,n,i){if("system"!==e.type)return null;if("device_count"===e.key)return null===t.deviceCount?null:String(t.deviceCount);if("total_area"===e.key)return null===t.areaM2?null:m(t.areaM2,"mi"===n?.config?.unit_system?.length);try{return new Intl.DateTimeFormat(i||void 0,{dateStyle:"short",timeStyle:"short",timeZone:n?.config?.time_zone||void 0}).format(t.now)}catch{return t.now.toLocaleString()}}function S(e,t){const n=e?.states?.[t];if(!n)return null;const i=u(e,t);return i?f(i,String(n.attributes?.unit_of_measurement||"")):null}export{h as cleanFloorAreaSteps,v as representedHaDeviceIds,_ as spaceWallGeometry,S as summaryEntityValue,b as summarySystemValue,p as totalCleanFloorAreaM2};
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="e2403c8d6aae4dd3487e38f45a6012b0c77a938eb1986d57f814bdeb7040e9f0";import{e9 as e,L as t,a2 as n,J as i,an as o,N as r,bo as s,bn as a,a1 as l,a0 as c,ax as d,ea as u,eb as f,bq as m,ec as g}from"./houseplan-card-Bp2KsJoA.js";function v(e){if(!e.registry.authoritative)return null;const t=new Set,n=d(e.markers);for(const i of Object.values(e.registry.devices||{}))i?.id&&"service"!==i.entry_type&&!n.devices.has(i.id)&&i.area_id&&e.areaToSpace[i.area_id]&&t.add(i.id);for(const i of e.markers||[]){if(i.removed||"virtual"===i.binding)continue;const o=String(i.binding||"").indexOf(":");if(o<1)continue;const r=i.binding.slice(0,o),s=i.binding.slice(o+1),a="device"===r?e.registry.devices?.[s]:null,l="entity"===r?e.registry.entities?.[s]:null,c="device"===r?s:l?.device_id,d="device"===r?a?.area_id:l?.area_id||c&&e.registry.devices?.[c]?.area_id,u="string"==typeof i.room_id&&i.room_id.length>0&&null===i.area?"":i.area||d||"",f=u&&e.areaToSpace[u]||i.space||e.firstSpaceId;c&&e.registry.devices?.[c]&&e.spaceIds.has(f)&&(!n.devices.has(c)||"entity"===r&&n.liveEntities.has(s))&&t.add(c)}return t}function y(e,t){return e?.length?t?.length?g(e,t):e:t}function _(e,t){const n=l(e.rooms,t.walls,t.openCuts,[],i,t.cellCm,o,r);return{roomGeom:"ok"===n.status||"degraded-extra"===n.status?n.roomGeom:void 0,multiWallNodes:c(e.rooms,t.walls,t.openCuts,i,t.cellCm,o,r)}}function*h(l,c,d=_){try{let u=0;for(const f of c){const c=l.spaces.find(e=>String(e?.id)===f.id);if(!c)continue;const m=e(c,f),g=d(f,m);let v=null;for(const e of f.rooms){if(!e.id)continue;const a=t(e);if(!a)continue;const l=n(f.rooms,e.id,m.walls,m.openCuts,i,m.cellCm,o,r,g.roomGeom,g.multiWallNodes)||a;v=y(v,s(l,m.physicalBodies)),yield}const _=m.cellCm/o;u+=a(v)*_*_/1e4}return u}catch{return null}}function p(e,t,n=_){const i=h(e,t,n);let o=i.next();for(;!o.done;)o=i.next();return o.value}function b(e,t,n,i){if("system"!==e.type)return null;if("device_count"===e.key)return null===t.deviceCount?null:String(t.deviceCount);if("total_area"===e.key)return null===t.areaM2?null:m(t.areaM2,"mi"===n?.config?.unit_system?.length);try{return new Intl.DateTimeFormat(i||void 0,{dateStyle:"short",timeStyle:"short",timeZone:n?.config?.time_zone||void 0}).format(t.now)}catch{return t.now.toLocaleString()}}function S(e,t){const n=e?.states?.[t];if(!n)return null;const i=u(e,t);return i?f(i,String(n.attributes?.unit_of_measurement||"")):null}export{h as cleanFloorAreaSteps,v as representedHaDeviceIds,_ as spaceWallGeometry,S as summaryEntityValue,b as summarySystemValue,p as totalCleanFloorAreaM2};
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="d35038d6e0b82768b72fd3e7214d8ae6d87c7b5c515aa8ec33c690e2ed59dcdb";import{n as t,b as n}from"./zigbee-topology-xuncJbK5.js";import{B as e}from"./houseplan-card-CVzJTjKc.js";const o=new WeakMap;function i(t){const n=function(t){const n=t?.connection||t;return!n||"object"!=typeof n&&"function"!=typeof n?null:n}(t);if(!n)return null;let e=o.get(n);return e||(e={revision:0,topologies:[],states:{},listeners:new Set,inflight:new Map},o.set(n,e)),e}function r(t,n,e){t.states={...t.states,[n]:e},function(t){t.revision++;for(const n of t.listeners)n()}(t)}function s(t){const n=t?.code;if("permission"===n||"unsupported"===n||"timeout"===n||"invalid_topic"===n||"invalid_payload"===n)return n;const e=String(t?.message||"").toLowerCase();return e.includes("unauthor")||e.includes("permission")?"permission":e.includes("unknown_command")||e.includes("not found")?"unsupported":"provider"}function a(t){return Object.assign(new Error(t),{code:t})}function c(t,n,e){const o=t.inflight.get(n);if(o)return o;r(t,n,{phase:"loading"});const i=e().then(n=>{if(!n.nodes.length&&n.warnings.some(t=>"invalid_payload"===t.code))throw a("invalid_payload");!function(t,n){t.topologies=[...t.topologies.filter(t=>!(t.provider===n.provider&&t.instanceId===n.instanceId)),n],r(t,"zha"===n.provider?"zha":`z2m:${n.instanceId}`,{phase:"ready",obtainedAt:n.obtainedAt,partial:n.warnings.length>0})}(t,n)}).catch(e=>{r(t,n,{phase:"error",error:s(e)})}).finally(()=>t.inflight.delete(n));return t.inflight.set(n,i),i}function l(t){const n=i(t);return n?{revision:n.revision,topologies:n.topologies,states:n.states}:{revision:0,topologies:[],states:{}}}function u(t,n){const e=i(t);return e?(e.listeners.add(n),()=>e.listeners.delete(n)):()=>{}}function p(t){if(!0!==t?.user?.is_admin)throw a("permission")}function f(n){const e=i(n);return e?c(e,"zha",async()=>{if(p(n),"function"!=typeof n?.callWS)throw a("unsupported");return t(await n.callWS({type:"zha/devices"}))}):Promise.resolve()}function d(t){return null!==t&&"object"==typeof t?t:null}function h(t){const n=d(t),e=n?.payload??t;if("string"!=typeof e)return e;try{return JSON.parse(e)}catch{return null}}async function g(t,n){let e;try{return await Promise.race([t,new Promise((t,o)=>{e=globalThis.setTimeout(()=>o(a("timeout")),Math.max(1,n))})])}finally{void 0!==e&&globalThis.clearTimeout(e)}}function m(t,o,r=15e4){const s=i(t);if(!s)return Promise.resolve();const l=e(o);return c(s,`z2m:${l||String(o)}`,async()=>{if(p(t),!l)throw a("invalid_topic");const e=t.connection,o=e?.subscribeMessage;if("function"!=typeof o||"function"!=typeof t?.callService)throw a("unsupported");const i=function(){const t=globalThis.crypto;return"function"==typeof t?.randomUUID?`houseplan-${t.randomUUID()}`:`houseplan-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}(),s=Date.now()+Math.max(1,r);let c=!1,u=null,f=null,m=null;const y=new Promise(t=>{u=t}),w=new Promise((t,n)=>{f=t,m=n}),b=[];try{const r=await o.call(e,t=>{!0===d(t)?.retain&&h(t)&&u?.()},{type:"mqtt/subscribe",topic:`${l}/bridge/info`});"function"==typeof r&&b.push(r);const p=await o.call(e,t=>{if(!0===d(t)?.retain)return;const n=h(t);null!==n?n&&function(t){const n=d(t),e=n?.transaction??d(n?.data)?.transaction;return"string"==typeof e||"number"==typeof e?String(e):null}(n)===i&&f?.(n):c&&m?.(a("invalid_payload"))},{type:"mqtt/subscribe",topic:`${l}/bridge/response/networkmap`});"function"==typeof p&&b.push(p),await g(y,Math.min(4e3,Math.max(1,s-Date.now()))),c=!0,await t.callService("mqtt","publish",{topic:`${l}/bridge/request/networkmap`,payload:JSON.stringify({type:"raw",routes:!1,transaction:i}),qos:0,retain:!1});const v=await g(w,s-Date.now()),_=d(v)?.status;if(_&&"ok"!==_)throw a("provider");return n(v,l)}finally{for(const t of b)try{t()}catch{}}})}export{f as readZhaTopology,m as refreshZ2mTopology,u as subscribeZigbeeTopology,l as zigbeeTopologyRuntimeSnapshot};
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="e2403c8d6aae4dd3487e38f45a6012b0c77a938eb1986d57f814bdeb7040e9f0";import{n as t,b as n}from"./zigbee-topology-BUy7kUEG.js";import{B as e}from"./houseplan-card-Bp2KsJoA.js";const o=new WeakMap;function i(t){const n=function(t){const n=t?.connection||t;return!n||"object"!=typeof n&&"function"!=typeof n?null:n}(t);if(!n)return null;let e=o.get(n);return e||(e={revision:0,topologies:[],states:{},listeners:new Set,inflight:new Map},o.set(n,e)),e}function r(t,n,e){t.states={...t.states,[n]:e},function(t){t.revision++;for(const n of t.listeners)n()}(t)}function s(t){const n=t?.code;if("permission"===n||"unsupported"===n||"timeout"===n||"invalid_topic"===n||"invalid_payload"===n)return n;const e=String(t?.message||"").toLowerCase();return e.includes("unauthor")||e.includes("permission")?"permission":e.includes("unknown_command")||e.includes("not found")?"unsupported":"provider"}function a(t){return Object.assign(new Error(t),{code:t})}function c(t,n,e){const o=t.inflight.get(n);if(o)return o;r(t,n,{phase:"loading"});const i=e().then(n=>{if(!n.nodes.length&&n.warnings.some(t=>"invalid_payload"===t.code))throw a("invalid_payload");!function(t,n){t.topologies=[...t.topologies.filter(t=>!(t.provider===n.provider&&t.instanceId===n.instanceId)),n],r(t,"zha"===n.provider?"zha":`z2m:${n.instanceId}`,{phase:"ready",obtainedAt:n.obtainedAt,partial:n.warnings.length>0})}(t,n)}).catch(e=>{r(t,n,{phase:"error",error:s(e)})}).finally(()=>t.inflight.delete(n));return t.inflight.set(n,i),i}function l(t){const n=i(t);return n?{revision:n.revision,topologies:n.topologies,states:n.states}:{revision:0,topologies:[],states:{}}}function u(t,n){const e=i(t);return e?(e.listeners.add(n),()=>e.listeners.delete(n)):()=>{}}function p(t){if(!0!==t?.user?.is_admin)throw a("permission")}function f(n){const e=i(n);return e?c(e,"zha",async()=>{if(p(n),"function"!=typeof n?.callWS)throw a("unsupported");return t(await n.callWS({type:"zha/devices"}))}):Promise.resolve()}function d(t){return null!==t&&"object"==typeof t?t:null}function h(t){const n=d(t),e=n?.payload??t;if("string"!=typeof e)return e;try{return JSON.parse(e)}catch{return null}}async function g(t,n){let e;try{return await Promise.race([t,new Promise((t,o)=>{e=globalThis.setTimeout(()=>o(a("timeout")),Math.max(1,n))})])}finally{void 0!==e&&globalThis.clearTimeout(e)}}function m(t,o,r=15e4){const s=i(t);if(!s)return Promise.resolve();const l=e(o);return c(s,`z2m:${l||String(o)}`,async()=>{if(p(t),!l)throw a("invalid_topic");const e=t.connection,o=e?.subscribeMessage;if("function"!=typeof o||"function"!=typeof t?.callService)throw a("unsupported");const i=function(){const t=globalThis.crypto;return"function"==typeof t?.randomUUID?`houseplan-${t.randomUUID()}`:`houseplan-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}(),s=Date.now()+Math.max(1,r);let c=!1,u=null,f=null,m=null;const y=new Promise(t=>{u=t}),w=new Promise((t,n)=>{f=t,m=n}),b=[];try{const r=await o.call(e,t=>{!0===d(t)?.retain&&h(t)&&u?.()},{type:"mqtt/subscribe",topic:`${l}/bridge/info`});"function"==typeof r&&b.push(r);const p=await o.call(e,t=>{if(!0===d(t)?.retain)return;const n=h(t);null!==n?n&&function(t){const n=d(t),e=n?.transaction??d(n?.data)?.transaction;return"string"==typeof e||"number"==typeof e?String(e):null}(n)===i&&f?.(n):c&&m?.(a("invalid_payload"))},{type:"mqtt/subscribe",topic:`${l}/bridge/response/networkmap`});"function"==typeof p&&b.push(p),await g(y,Math.min(4e3,Math.max(1,s-Date.now()))),c=!0,await t.callService("mqtt","publish",{topic:`${l}/bridge/request/networkmap`,payload:JSON.stringify({type:"raw",routes:!1,transaction:i}),qos:0,retain:!1});const v=await g(w,s-Date.now()),_=d(v)?.status;if(_&&"ok"!==_)throw a("provider");return n(v,l)}finally{for(const t of b)try{t()}catch{}}})}export{f as readZhaTopology,m as refreshZ2mTopology,u as subscribeZigbeeTopology,l as zigbeeTopologyRuntimeSnapshot};
+1 -1
View File
@@ -1 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="d35038d6e0b82768b72fd3e7214d8ae6d87c7b5c515aa8ec33c690e2ed59dcdb";try{await import("./houseplan-assets/houseplan-card-CVzJTjKc.js")}catch(e){if(!customElements.get("houseplan-card")){const l=String(navigator.language||"en").toLowerCase();const m=l.startsWith("ru")?"House Plan обновился — перезагрузите страницу (Ctrl+F5).":l.startsWith("de")?"House Plan wurde aktualisiert — bitte laden Sie die Seite neu (Strg+F5).":l.startsWith("fr")?"House Plan a été mis à jour — veuillez recharger la page (Ctrl+F5).":"House Plan was updated — please reload the page (Ctrl+F5).";customElements.define("houseplan-card",class extends HTMLElement{setConfig(){}getCardSize(){return 1}connectedCallback(){this.style.cssText="display:block;box-sizing:border-box;padding:16px;border:1px solid var(--divider-color,#e0e0e0);border-radius:var(--ha-card-border-radius,12px);background:var(--card-background-color,#fff);color:var(--primary-text-color,#212121);font:14px/1.4 var(--paper-font-body1_-_font-family,sans-serif)";this.textContent=m}})}console.error("[houseplan] stale houseplan-card.js: the implementation chunk is unavailable",e)}
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="e2403c8d6aae4dd3487e38f45a6012b0c77a938eb1986d57f814bdeb7040e9f0";try{await import("./houseplan-assets/houseplan-card-Bp2KsJoA.js")}catch(e){if(!customElements.get("houseplan-card")){const l=String(navigator.language||"en").toLowerCase();const m=l.startsWith("ru")?"House Plan обновился — перезагрузите страницу (Ctrl+F5).":l.startsWith("de")?"House Plan wurde aktualisiert — bitte laden Sie die Seite neu (Strg+F5).":l.startsWith("fr")?"House Plan a été mis à jour — veuillez recharger la page (Ctrl+F5).":"House Plan was updated — please reload the page (Ctrl+F5).";customElements.define("houseplan-card",class extends HTMLElement{setConfig(){}getCardSize(){return 1}connectedCallback(){this.style.cssText="display:block;box-sizing:border-box;padding:16px;border:1px solid var(--divider-color,#e0e0e0);border-radius:var(--ha-card-border-radius,12px);background:var(--card-background-color,#fff);color:var(--primary-text-color,#212121);font:14px/1.4 var(--paper-font-body1_-_font-family,sans-serif)";this.textContent=m}})}console.error("[houseplan] stale houseplan-card.js: the implementation chunk is unavailable",e)}
+1 -1
View File
File diff suppressed because one or more lines are too long