fix: protect View config recovery (#612)

Issue: #612
User-Visible: yes
This commit is contained in:
Claude
2026-09-23 10:34:09 +03:00
parent 78698a075a
commit 2cfb6d2169
51 changed files with 569 additions and 446 deletions
@@ -1,312 +1,312 @@
{
"schema": 1,
"fingerprint": "fab26ba4f38e0ad405db785685445fcef47de8ffbe84f490e8de7c6b8c1291a7",
"fingerprint": "34ed8381ef1adf8c591e66e7e06a85168914fdc4d58c21a841ade47a105c7ef0",
"entry": "houseplan-card.js",
"panelEntry": "houseplan-panel.js",
"initialViewFiles": [
"houseplan-assets/houseplan-card-OIS3Mvzx.js",
"houseplan-assets/houseplan-card-Dvtr52xr.js",
"houseplan-card.js"
],
"initialViewGzipBytes": 290838,
"initialViewGzipBytes": 290841,
"initialPanelFiles": [
"houseplan-assets/houseplan-card-OIS3Mvzx.js",
"houseplan-assets/houseplan-card-Dvtr52xr.js",
"houseplan-panel.js"
],
"initialPanelGzipBytes": 292360,
"initialPanelGzipBytes": 292363,
"initialPanelOnlyFiles": [
"houseplan-panel.js"
],
"initialPanelOnlyGzipBytes": 2324,
"initialPanelOnlyGzipBytes": 2322,
"lazyFiles": [
"houseplan-assets/backdrop-pick-Cw68iWqr.js",
"houseplan-assets/de-gIMcxW3P.js",
"houseplan-assets/editor-CA7MKuk8.js",
"houseplan-assets/form-kit.styles-HxyRNtFW.js",
"houseplan-assets/fr-DmdKwehD.js",
"houseplan-assets/furniture-plan-art.generated-CWQQHnJL.js",
"houseplan-assets/houseplan-editor-runtime-BcL3Rj9i.js",
"houseplan-assets/houseplan-onboarding-runtime-DIQStHYP.js",
"houseplan-assets/hp-zigbee-topology-overlay-CfzcT25m.js",
"houseplan-assets/iso-scene-render-CtsBhANN.js",
"houseplan-assets/live-interaction-runtime-CrYU-Xe2.js",
"houseplan-assets/pdf-export-IUs8Loq8.js",
"houseplan-assets/summary-panel-runtime-loaded-CJhgoeV3.js",
"houseplan-assets/zigbee-topology-4qCSmPRR.js",
"houseplan-assets/zigbee-topology-runtime-ul8YAth8.js"
"houseplan-assets/backdrop-pick-4y8dV8Ve.js",
"houseplan-assets/de-Cf-Yh-qD.js",
"houseplan-assets/editor-COYbDg2h.js",
"houseplan-assets/form-kit.styles-eIw2y67V.js",
"houseplan-assets/fr-C5bQpwdy.js",
"houseplan-assets/furniture-plan-art.generated-CkHr8lOA.js",
"houseplan-assets/houseplan-editor-runtime-C54tPnne.js",
"houseplan-assets/houseplan-onboarding-runtime-Ch5D7oRi.js",
"houseplan-assets/hp-zigbee-topology-overlay-CQpKEtLv.js",
"houseplan-assets/iso-scene-render-CqI3ABeb.js",
"houseplan-assets/live-interaction-runtime-qZV2DHRS.js",
"houseplan-assets/pdf-export-Bmt-_V6k.js",
"houseplan-assets/summary-panel-runtime-loaded-CPobCF-I.js",
"houseplan-assets/zigbee-topology-PPd-Bqxz.js",
"houseplan-assets/zigbee-topology-runtime-DlN1vrja.js"
],
"lazyGzipBytes": 460210,
"lazyGzipBytes": 460178,
"lazyEditorFiles": [
"houseplan-assets/backdrop-pick-Cw68iWqr.js",
"houseplan-assets/editor-CA7MKuk8.js",
"houseplan-assets/form-kit.styles-HxyRNtFW.js",
"houseplan-assets/furniture-plan-art.generated-CWQQHnJL.js",
"houseplan-assets/houseplan-editor-runtime-BcL3Rj9i.js",
"houseplan-assets/zigbee-topology-4qCSmPRR.js"
"houseplan-assets/backdrop-pick-4y8dV8Ve.js",
"houseplan-assets/editor-COYbDg2h.js",
"houseplan-assets/form-kit.styles-eIw2y67V.js",
"houseplan-assets/furniture-plan-art.generated-CkHr8lOA.js",
"houseplan-assets/houseplan-editor-runtime-C54tPnne.js",
"houseplan-assets/zigbee-topology-PPd-Bqxz.js"
],
"lazyEditorGzipBytes": 243659,
"lazyEditorGzipBytes": 243641,
"lazyOnboardingFiles": [
"houseplan-assets/backdrop-pick-Cw68iWqr.js",
"houseplan-assets/form-kit.styles-HxyRNtFW.js",
"houseplan-assets/houseplan-onboarding-runtime-DIQStHYP.js"
"houseplan-assets/backdrop-pick-4y8dV8Ve.js",
"houseplan-assets/form-kit.styles-eIw2y67V.js",
"houseplan-assets/houseplan-onboarding-runtime-Ch5D7oRi.js"
],
"lazyOnboardingGzipBytes": 34057,
"lazyOnboardingGzipBytes": 34053,
"lazyLocaleFiles": [
"houseplan-assets/de-gIMcxW3P.js",
"houseplan-assets/fr-DmdKwehD.js"
"houseplan-assets/de-Cf-Yh-qD.js",
"houseplan-assets/fr-C5bQpwdy.js"
],
"lazyLocaleGzipBytes": 55363,
"lazyLocaleGzipBytes": 55369,
"lazyIsometricFiles": [
"houseplan-assets/iso-scene-render-CtsBhANN.js"
"houseplan-assets/iso-scene-render-CqI3ABeb.js"
],
"lazyIsometricGzipBytes": 17642,
"lazyIsometricGzipBytes": 17639,
"lazyFurnitureArtFiles": [
"houseplan-assets/furniture-plan-art.generated-CWQQHnJL.js"
"houseplan-assets/furniture-plan-art.generated-CkHr8lOA.js"
],
"lazyFurnitureArtGzipBytes": 16942,
"lazyFurnitureArtGzipBytes": 16939,
"lazyPdfFiles": [
"houseplan-assets/furniture-plan-art.generated-CWQQHnJL.js",
"houseplan-assets/pdf-export-IUs8Loq8.js"
"houseplan-assets/furniture-plan-art.generated-CkHr8lOA.js",
"houseplan-assets/pdf-export-Bmt-_V6k.js"
],
"lazyPdfGzipBytes": 126831,
"lazyPdfGzipBytes": 126825,
"files": [
{
"path": "houseplan-assets/backdrop-pick-Cw68iWqr.js",
"sha256": "4d86bc7c941e260641e7b4e9c169fa16e206f38fa9cb9d70192536a8d66af928",
"path": "houseplan-assets/backdrop-pick-4y8dV8Ve.js",
"sha256": "16794f5a4841f5a099f9e788342a0b36517795f667591e798fccc9d7c66259b7",
"rawBytes": 74683,
"gzipBytes": 24173,
"gzipBytes": 24171,
"isEntry": false,
"imports": [
"houseplan-assets/form-kit.styles-HxyRNtFW.js",
"houseplan-assets/houseplan-card-OIS3Mvzx.js"
"houseplan-assets/form-kit.styles-eIw2y67V.js",
"houseplan-assets/houseplan-card-Dvtr52xr.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/de-gIMcxW3P.js",
"sha256": "6d6967e057eca2c9848fdbe74083fb4629d7466222fb9adb910c047412c354d2",
"path": "houseplan-assets/de-Cf-Yh-qD.js",
"sha256": "26098db87918225904088f44664b86f8c803177f05081cfab7869afa5459b268",
"rawBytes": 92496,
"gzipBytes": 27924,
"gzipBytes": 27926,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/editor-CA7MKuk8.js",
"sha256": "161461fa1331a4dc738cbc1e0106dc7465e10b3b374f6be14a133fb4899da6bd",
"path": "houseplan-assets/editor-COYbDg2h.js",
"sha256": "47233950f346534ac171ab2bc9cd000c21bfbeaae8cc18f3c4c3d99533ece040",
"rawBytes": 3833,
"gzipBytes": 1583,
"gzipBytes": 1581,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-OIS3Mvzx.js"
"houseplan-assets/houseplan-card-Dvtr52xr.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/form-kit.styles-HxyRNtFW.js",
"sha256": "e09fa7879efc12edc1a1d034cbe85c0361fc1be10512aa5d28f5094d05763d28",
"path": "houseplan-assets/form-kit.styles-eIw2y67V.js",
"sha256": "9e92c98fab6738941682b03c6a21153dd96de8211de3edd83e86ec8a0e09f847",
"rawBytes": 25600,
"gzipBytes": 5056,
"gzipBytes": 5054,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/fr-DmdKwehD.js",
"sha256": "e447713cc06ac0794252390a1a044fa12a7cba59c76f68c2f8222de07cdcd4a4",
"path": "houseplan-assets/fr-C5bQpwdy.js",
"sha256": "3133e01d3bee3c3038d4c4dc1f0c1fa06d1e8d4ae3d21731533aff1b219c84a1",
"rawBytes": 94813,
"gzipBytes": 27439,
"gzipBytes": 27443,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/furniture-plan-art.generated-CWQQHnJL.js",
"sha256": "7f8a02bf9c007e6b4167d6ec11427d7ce952933442b45367943cd3ae078e9834",
"path": "houseplan-assets/furniture-plan-art.generated-CkHr8lOA.js",
"sha256": "56d372ba8e0b7d8c30259ccebd3c7c25715c6f980c800477223c46b23e932b1e",
"rawBytes": 52035,
"gzipBytes": 16942,
"gzipBytes": 16939,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/houseplan-card-OIS3Mvzx.js",
"sha256": "866afdc9095bc6338d0f3fb6e2cd6b7c3ff9171d590a8e3146a5b87f9414d899",
"rawBytes": 1031507,
"gzipBytes": 290036,
"path": "houseplan-assets/houseplan-card-Dvtr52xr.js",
"sha256": "c8f730ccefec2a91571c000911d1fb8d0efc4e872edeb08fb1d8a17fc453447d",
"rawBytes": 1031560,
"gzipBytes": 290041,
"isEntry": false,
"imports": [],
"dynamicImports": [
"houseplan-assets/de-gIMcxW3P.js",
"houseplan-assets/editor-CA7MKuk8.js",
"houseplan-assets/fr-DmdKwehD.js",
"houseplan-assets/furniture-plan-art.generated-CWQQHnJL.js",
"houseplan-assets/houseplan-editor-runtime-BcL3Rj9i.js",
"houseplan-assets/houseplan-onboarding-runtime-DIQStHYP.js",
"houseplan-assets/hp-zigbee-topology-overlay-CfzcT25m.js",
"houseplan-assets/iso-scene-render-CtsBhANN.js",
"houseplan-assets/live-interaction-runtime-CrYU-Xe2.js",
"houseplan-assets/pdf-export-IUs8Loq8.js",
"houseplan-assets/summary-panel-runtime-loaded-CJhgoeV3.js"
"houseplan-assets/de-Cf-Yh-qD.js",
"houseplan-assets/editor-COYbDg2h.js",
"houseplan-assets/fr-C5bQpwdy.js",
"houseplan-assets/furniture-plan-art.generated-CkHr8lOA.js",
"houseplan-assets/houseplan-editor-runtime-C54tPnne.js",
"houseplan-assets/houseplan-onboarding-runtime-Ch5D7oRi.js",
"houseplan-assets/hp-zigbee-topology-overlay-CQpKEtLv.js",
"houseplan-assets/iso-scene-render-CqI3ABeb.js",
"houseplan-assets/live-interaction-runtime-qZV2DHRS.js",
"houseplan-assets/pdf-export-Bmt-_V6k.js",
"houseplan-assets/summary-panel-runtime-loaded-CPobCF-I.js"
]
},
{
"path": "houseplan-assets/houseplan-editor-runtime-BcL3Rj9i.js",
"sha256": "8a8c626d0c2c186981a6911c2db173d6cb69ceb58c3fe3bf997747aebeae813a",
"path": "houseplan-assets/houseplan-editor-runtime-C54tPnne.js",
"sha256": "972acd8d6e338b16e197c2eadac07457034cf3fefea39c5a9b1c37d08d4a8ab8",
"rawBytes": 677942,
"gzipBytes": 188476,
"gzipBytes": 188472,
"isEntry": false,
"imports": [
"houseplan-assets/backdrop-pick-Cw68iWqr.js",
"houseplan-assets/form-kit.styles-HxyRNtFW.js",
"houseplan-assets/furniture-plan-art.generated-CWQQHnJL.js",
"houseplan-assets/houseplan-card-OIS3Mvzx.js",
"houseplan-assets/zigbee-topology-4qCSmPRR.js"
"houseplan-assets/backdrop-pick-4y8dV8Ve.js",
"houseplan-assets/form-kit.styles-eIw2y67V.js",
"houseplan-assets/furniture-plan-art.generated-CkHr8lOA.js",
"houseplan-assets/houseplan-card-Dvtr52xr.js",
"houseplan-assets/zigbee-topology-PPd-Bqxz.js"
],
"dynamicImports": [
"houseplan-assets/zigbee-topology-runtime-ul8YAth8.js"
"houseplan-assets/zigbee-topology-runtime-DlN1vrja.js"
]
},
{
"path": "houseplan-assets/houseplan-onboarding-runtime-DIQStHYP.js",
"sha256": "5d38adbc5c64caea18e81f136c3e60f859eae9baa9789b6edef95c1765261c83",
"path": "houseplan-assets/houseplan-onboarding-runtime-Ch5D7oRi.js",
"sha256": "b40d0ea3bd87b970334ee2482338cd8aa3674e6fd7a51a53d06bc4720273dfed",
"rawBytes": 15667,
"gzipBytes": 4828,
"isEntry": false,
"imports": [
"houseplan-assets/backdrop-pick-Cw68iWqr.js",
"houseplan-assets/form-kit.styles-HxyRNtFW.js",
"houseplan-assets/houseplan-card-OIS3Mvzx.js"
"houseplan-assets/backdrop-pick-4y8dV8Ve.js",
"houseplan-assets/form-kit.styles-eIw2y67V.js",
"houseplan-assets/houseplan-card-Dvtr52xr.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/hp-zigbee-topology-overlay-CfzcT25m.js",
"sha256": "200adf925b2a7c1097fe9a9eb0bac0d4274c5b48a7790ecff57cf488e5312253",
"path": "houseplan-assets/hp-zigbee-topology-overlay-CQpKEtLv.js",
"sha256": "9d4f76a5c0326ff856c2dae97f233ded939549480a4e60c6d42d7b407aeadcd7",
"rawBytes": 10759,
"gzipBytes": 3684,
"gzipBytes": 3680,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-OIS3Mvzx.js",
"houseplan-assets/zigbee-topology-4qCSmPRR.js",
"houseplan-assets/zigbee-topology-runtime-ul8YAth8.js"
"houseplan-assets/houseplan-card-Dvtr52xr.js",
"houseplan-assets/zigbee-topology-PPd-Bqxz.js",
"houseplan-assets/zigbee-topology-runtime-DlN1vrja.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/iso-scene-render-CtsBhANN.js",
"sha256": "563aa1d2051de0c18ac59590d0c4803e5623929811d55f5affc9579092ed7b9c",
"path": "houseplan-assets/iso-scene-render-CqI3ABeb.js",
"sha256": "dc1afe7f4524595faf6dbca1dbd1430c795182070291ab48f037eb9099c4d110",
"rawBytes": 51983,
"gzipBytes": 17642,
"gzipBytes": 17639,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-OIS3Mvzx.js"
"houseplan-assets/houseplan-card-Dvtr52xr.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/live-interaction-runtime-CrYU-Xe2.js",
"sha256": "778330eb3a4cc03ceff627f4d0a8fa6e501666d6c69012ef6d63fdf2f9a9dc48",
"path": "houseplan-assets/live-interaction-runtime-qZV2DHRS.js",
"sha256": "dd2853b8ecd883ad55f15dc30219ba5ab1417c9fbfd48df9f0a4d76aa0971008",
"rawBytes": 8216,
"gzipBytes": 3207,
"gzipBytes": 3204,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-OIS3Mvzx.js"
"houseplan-assets/houseplan-card-Dvtr52xr.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/pdf-export-IUs8Loq8.js",
"sha256": "6b9cddfde0743d06fa3dba3a04aee68175f31d48aae40b01254656af821329f0",
"path": "houseplan-assets/pdf-export-Bmt-_V6k.js",
"sha256": "c90d4fa9c838be1a1132109ec13f6ad04e3e4cea6a3298e0177413677a2298a1",
"rawBytes": 236264,
"gzipBytes": 109889,
"gzipBytes": 109886,
"isEntry": false,
"imports": [
"houseplan-assets/furniture-plan-art.generated-CWQQHnJL.js",
"houseplan-assets/houseplan-card-OIS3Mvzx.js"
"houseplan-assets/furniture-plan-art.generated-CkHr8lOA.js",
"houseplan-assets/houseplan-card-Dvtr52xr.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/summary-panel-editor-vVUmBjBs.js",
"sha256": "88766397f714c720249bfc11fdb0bb46a272218fb6b222b6be8e553cb33abdf0",
"path": "houseplan-assets/summary-panel-editor-BBxrM3sF.js",
"sha256": "bfedcc5ca13c71e1623ec92dc5979359192caa4c49bf993fe385734adcb9293c",
"rawBytes": 14862,
"gzipBytes": 3426,
"gzipBytes": 3420,
"isEntry": false,
"imports": [
"houseplan-assets/form-kit.styles-HxyRNtFW.js",
"houseplan-assets/houseplan-card-OIS3Mvzx.js",
"houseplan-assets/summary-panel-runtime-loaded-CJhgoeV3.js"
"houseplan-assets/form-kit.styles-eIw2y67V.js",
"houseplan-assets/houseplan-card-Dvtr52xr.js",
"houseplan-assets/summary-panel-runtime-loaded-CPobCF-I.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/summary-panel-metrics-B-djAqRO.js",
"sha256": "48144253e983f08e364dfa59713d3a91a087f62af6cf5f1e4c8ad758b6b24d95",
"path": "houseplan-assets/summary-panel-metrics-Ck5HHl5d.js",
"sha256": "d691ab7cbb3a76f1337147091c4443cea8fb51f133dcf788c49aaafb81bcd2c2",
"rawBytes": 2611,
"gzipBytes": 1307,
"gzipBytes": 1306,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-OIS3Mvzx.js"
"houseplan-assets/houseplan-card-Dvtr52xr.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/summary-panel-runtime-loaded-CJhgoeV3.js",
"sha256": "ec0ebaf80af3fcff7f7792d67dc21811398456c37286eff4175ff8e3cb9086a4",
"path": "houseplan-assets/summary-panel-runtime-loaded-CPobCF-I.js",
"sha256": "d782b2a4faa18bb30a1099aa9384d4a837b18b5884fad9cf9b32c89ac4d70b0b",
"rawBytes": 72733,
"gzipBytes": 20174,
"gzipBytes": 20169,
"isEntry": false,
"imports": [
"houseplan-assets/form-kit.styles-HxyRNtFW.js",
"houseplan-assets/houseplan-card-OIS3Mvzx.js"
"houseplan-assets/form-kit.styles-eIw2y67V.js",
"houseplan-assets/houseplan-card-Dvtr52xr.js"
],
"dynamicImports": [
"houseplan-assets/summary-panel-editor-vVUmBjBs.js",
"houseplan-assets/summary-panel-metrics-B-djAqRO.js"
"houseplan-assets/summary-panel-editor-BBxrM3sF.js",
"houseplan-assets/summary-panel-metrics-Ck5HHl5d.js"
]
},
{
"path": "houseplan-assets/zigbee-topology-4qCSmPRR.js",
"sha256": "19c6b44a2a83f8b9542f66cdd301e0766c5443a2adf20d96696daa5c21543572",
"path": "houseplan-assets/zigbee-topology-PPd-Bqxz.js",
"sha256": "26dafa1b5f06ec4fe01aab1e492c80896593fd62a7f16e9766075d25b15e88fb",
"rawBytes": 18962,
"gzipBytes": 7429,
"gzipBytes": 7424,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-OIS3Mvzx.js"
"houseplan-assets/houseplan-card-Dvtr52xr.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/zigbee-topology-runtime-ul8YAth8.js",
"sha256": "0f9ffcb2b82a8e40aca694268395bddd4895ad080c34a3a69e1b2b06412d46f3",
"path": "houseplan-assets/zigbee-topology-runtime-DlN1vrja.js",
"sha256": "26dd9b4f4962e0f6b19cba4a4e7d222de6fa6324eea56bb9cd2db1a807a91486",
"rawBytes": 3942,
"gzipBytes": 1764,
"gzipBytes": 1762,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-OIS3Mvzx.js",
"houseplan-assets/zigbee-topology-4qCSmPRR.js"
"houseplan-assets/houseplan-card-Dvtr52xr.js",
"houseplan-assets/zigbee-topology-PPd-Bqxz.js"
],
"dynamicImports": []
},
{
"path": "houseplan-card.js",
"sha256": "ca44bf40de6ccf2d41a79c05b2a59553c1aabd87a79b87c541ef907dd5143f77",
"sha256": "ed977d6515b2c79736c48c1e4c67526abd633cfb2b308099119b2c8b601d98f3",
"rawBytes": 1205,
"gzipBytes": 802,
"gzipBytes": 800,
"isEntry": true,
"imports": [
"houseplan-assets/houseplan-card-OIS3Mvzx.js"
"houseplan-assets/houseplan-card-Dvtr52xr.js"
],
"dynamicImports": []
},
{
"path": "houseplan-panel.js",
"sha256": "18c3b3f1580e6c14c5949b8ad67c2f36a4979cce87112d4930dfe89ea9bb1bfc",
"sha256": "4ab6d42187cda8188950e8e64f71b3cda0f44cb4955eeb2b07bb0ad87c8a7f82",
"rawBytes": 6165,
"gzipBytes": 2324,
"gzipBytes": 2322,
"isEntry": true,
"imports": [
"houseplan-assets/houseplan-card-OIS3Mvzx.js"
"houseplan-assets/houseplan-card-Dvtr52xr.js"
],
"dynamicImports": []
}
File diff suppressed because one or more lines are too long
@@ -1,14 +1,14 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="fab26ba4f38e0ad405db785685445fcef47de8ffbe84f490e8de7c6b8c1291a7";import{az as e,l as o,aC as t,e8 as s,A as a,e9 as i,ea as l,eb as n,E as r,c}from"./houseplan-card-OIS3Mvzx.js";class f 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,f={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")},h=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
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="34ed8381ef1adf8c591e66e7e06a85168914fdc4d58c21a841ade47a105c7ef0";import{az as e,l as o,aC as t,e8 as s,A as a,e9 as i,ea as l,eb as n,E as r,c}from"./houseplan-card-Dvtr52xr.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=>f[e.name]||e.name}
.computeLabel=${e=>h[e.name]||e.name}
@value-changed=${this._valueChanged}
></ha-form>`;return c`
${d(h.slice(0,3))}
${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:_})}
</div>`:a}
${d(h.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)}}f.properties={hass:{attribute:!1},_config:{state:!0},_spaces:{state:!0}},customElements.get("houseplan-card-editor")||customElements.define("houseplan-card-editor",f);
${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,4 +1,4 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="fab26ba4f38e0ad405db785685445fcef47de8ffbe84f490e8de7c6b8c1291a7";import{l as t,br as s,A as e,aC as o,c as a,g as i,cF as l,cG as h,cH as n,bo as r,cI as c,cN as p,cJ as d,cK as _,cL as u,cM as g,cO as m,cP as f}from"./houseplan-card-OIS3Mvzx.js";import{D as b,C as v,E as y,G as w,H as D,I as $,J as S,v as C}from"./backdrop-pick-Cw68iWqr.js";import"./form-kit.styles-HxyRNtFW.js";const k="fab26ba4f38e0ad405db785685445fcef47de8ffbe84f490e8de7c6b8c1291a7";class F{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(i){const l=`${i}.aria`,h=t(this.host.hass,this.host._config?.language);return s(h,i)&&s(h,l)?a`<hp-help data-help-key=${i}
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="34ed8381ef1adf8c591e66e7e06a85168914fdc4d58c21a841ade47a105c7ef0";import{l as t,br as s,A as e,aC as o,c as a,g as i,cF as l,cG as h,cH as n,bo as r,cI as c,cN as p,cJ as d,cK as _,cL as u,cM as g,cO as m,cP as f}from"./houseplan-card-Dvtr52xr.js";import{D as b,C as v,E as y,G as w,H as D,I as $,J as S,v as C}from"./backdrop-pick-4y8dV8Ve.js";import"./form-kit.styles-eIw2y67V.js";const k="34ed8381ef1adf8c591e66e7e06a85168914fdc4d58c21a841ade47a105c7ef0";class F{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(i){const l=`${i}.aria`,h=t(this.host.hass,this.host._config?.language);return s(h,i)&&s(h,l)?a`<hp-help data-help-key=${i}
.text=${o(h,i)} .ariaLabel=${o(h,l)}></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 o=i(e),a=e.settings?.custom_fill&&"object"==typeof e.settings.custom_fill?l(e.settings.custom_fill):null,p="none"===o.fill?{...a||h,a:0}:a;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:o.showBorders,showNames:o.showNames,zeroWallStyle:c(e),displayTouched:!0,hideDecor:o.hideDecor,hideOpenings:o.hideOpenings,roomColor:o.color,roomOpacity:o.opacity,fillMode:"none"===o.fill?"custom":o.fill,customFill:p,glowEnabled:o.glow,bgColor:o.bgColor,bgMode:"static"===e.settings?.bg_mode||"daynight"===e.settings?.bg_mode?e.settings.bg_mode:null,northDeg:r({},e.settings),sunRays:"boolean"==typeof e.settings?.sun_rays?e.settings.sun_rays:null,tempMin:o.tempMin,tempMax:o.tempMax,showLqi:o.showLqi??this.host._config?.show_signal??!0,cardFontScale:o.cardFontScale,labelTemp:o.labelTemp,labelHum:o.labelHum,labelLqi:o.labelLqi,labelLight:o.labelLight,cellCm:Number(e.cell_cm)>0?Number(e.cell_cm):5,cellCmInput:n(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:n(e,this.host._imperial),cellCmTouched:!1,busy:!1},b(this.host,this.host._spaceDialog)}async _pickPlanFile(t){const s=t.target,e=s.files?.[0];if(!e||!this.host._spaceDialog)return;s.value="";const o=await v(e);if("reject"===o.kind)return void this.host._showToast(this.host._t("toast.plan_formats"));if("guard"===o.kind)return void(this.host._backdropGuard=o.state);const a=await y(e,o.ext,e.name);this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:a})}_renderBackdropGuard(){return w(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}),o=this.host._spaceDialog;return o&&o.planUrl===t&&Number.isFinite(e)&&e>0?(this.host._spaceDialog={...o,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 o=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")}),a=this.host._spaceDialog,i=a?.saved?.find(s=>s.name===t);if(o&&a&&i&&i.url===e.url&&i.modified===e.modified&&!i.used_by.length&&i.url!==a.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 a`<div class="savedplans muted">${this.host._t("space.loading")}</div>`;const s=t.saved||[];if(!s.length)return a`<div class="savedplans muted">${this.host._t("space.no_saved")}</div>`;return a`<div class="savedplans">
${s.map(s=>{return a`
<div class="savedplan ${s.url===t.planUrl?"cur":""}">
@@ -1,4 +1,4 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="fab26ba4f38e0ad405db785685445fcef47de8ffbe84f490e8de7c6b8c1291a7";import{c as a,A as e}from"./houseplan-card-OIS3Mvzx.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-CJhgoeV3.js";import"./form-kit.styles-HxyRNtFW.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__="34ed8381ef1adf8c591e66e7e06a85168914fdc4d58c21a841ade47a105c7ef0";import{c as a,A as e}from"./houseplan-card-Dvtr52xr.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-CPobCF-I.js";import"./form-kit.styles-eIw2y67V.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__="fab26ba4f38e0ad405db785685445fcef47de8ffbe84f490e8de7c6b8c1291a7";import{ee as e,J as t,aX as n,H as i,aa as o,a8 as r,bP as a,bO as s,aW as l,aV as c,aY as d,ef as u,eg as f,bR as m,eh as g}from"./houseplan-card-OIS3Mvzx.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),a=i.binding.slice(o+1),s="device"===r?e.registry.devices?.[a]:null,l="entity"===r?e.registry.entities?.[a]:null,c="device"===r?a:l?.device_id,d="device"===r?s?.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(a))&&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 s=t(e);if(!s)continue;const l=n(f.rooms,e.id,m.walls,m.openCuts,i,m.cellCm,o,r,g.roomGeom,g.multiWallNodes)||s;v=y(v,a(l,m.physicalBodies)),yield}const _=m.cellCm/o;u+=s(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__="34ed8381ef1adf8c591e66e7e06a85168914fdc4d58c21a841ade47a105c7ef0";import{ee as e,J as t,aX as n,H as i,aa as o,a8 as r,bP as a,bO as s,aW as c,aV as l,aY as d,ef as u,eg as f,bR as m,eh as g}from"./houseplan-card-Dvtr52xr.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),a=i.binding.slice(o+1),s="device"===r?e.registry.devices?.[a]:null,c="entity"===r?e.registry.entities?.[a]:null,l="device"===r?a:c?.device_id,d="device"===r?s?.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(a))&&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 s=t(e);if(!s)continue;const c=n(f.rooms,e.id,m.walls,m.openCuts,i,m.cellCm,o,r,g.roomGeom,g.multiWallNodes)||s;v=y(v,a(c,m.physicalBodies)),yield}const _=m.cellCm/o;u+=s(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 S(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 b(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,b as summaryEntityValue,S as summarySystemValue,p as totalCleanFloorAreaM2};
@@ -1 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="fab26ba4f38e0ad405db785685445fcef47de8ffbe84f490e8de7c6b8c1291a7";import{n as t,b as n}from"./zigbee-topology-4qCSmPRR.js";import{aI as e}from"./houseplan-card-OIS3Mvzx.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 f(t){if(!0!==t?.user?.is_admin)throw a("permission")}function p(n){const e=i(n);return e?c(e,"zha",async()=>{if(f(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 m(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 g(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(f(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,p=null,g=null;const y=new Promise(t=>{u=t}),w=new Promise((t,n)=>{p=t,g=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 f=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&&p?.(n):c&&g?.(a("invalid_payload"))},{type:"mqtt/subscribe",topic:`${l}/bridge/response/networkmap`});"function"==typeof f&&b.push(f),await m(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 m(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{p as readZhaTopology,g as refreshZ2mTopology,u as subscribeZigbeeTopology,l as zigbeeTopologyRuntimeSnapshot};
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="34ed8381ef1adf8c591e66e7e06a85168914fdc4d58c21a841ade47a105c7ef0";import{n as t,b as n}from"./zigbee-topology-PPd-Bqxz.js";import{aI as e}from"./houseplan-card-Dvtr52xr.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 f(t){if(!0!==t?.user?.is_admin)throw a("permission")}function p(n){const e=i(n);return e?c(e,"zha",async()=>{if(f(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 m(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 g(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(f(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,p=null,g=null;const y=new Promise(t=>{u=t}),w=new Promise((t,n)=>{p=t,g=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 f=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&&p?.(n):c&&g?.(a("invalid_payload"))},{type:"mqtt/subscribe",topic:`${l}/bridge/response/networkmap`});"function"==typeof f&&b.push(f),await m(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 m(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{p as readZhaTopology,g as refreshZ2mTopology,u as subscribeZigbeeTopology,l as zigbeeTopologyRuntimeSnapshot};
@@ -1 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="fab26ba4f38e0ad405db785685445fcef47de8ffbe84f490e8de7c6b8c1291a7";try{await import("./houseplan-assets/houseplan-card-OIS3Mvzx.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__="34ed8381ef1adf8c591e66e7e06a85168914fdc4d58c21a841ade47a105c7ef0";try{await import("./houseplan-assets/houseplan-card-Dvtr52xr.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)}
File diff suppressed because one or more lines are too long
+53 -1
View File
@@ -39,6 +39,7 @@ const result = await page.evaluate(async (rawFixture) => {
geometry.id = 'upstairs';
geometry.title = 'Upstairs';
fixture.config.spaces = [lighting, geometry];
fixture.config.settings.known_devices = Object.keys(fixture.devices).sort();
fixture.config.markers.push({
id: 'golden-light-one', binding: 'device:golden-light-one', display: 'value',
});
@@ -49,7 +50,7 @@ const result = await page.evaluate(async (rawFixture) => {
const base = window.__mkHass();
const makeHass = (subscriptionMode = 'partial') => {
const calls = { configGets: 0, events: {}, unsubscribed: [] };
const calls = { configGets: 0, configSets: 0, events: {}, unsubscribed: [] };
const connection = {
subscribeEvents: async (callback, event) => {
calls.events[event] = (calls.events[event] || 0) + 1;
@@ -75,6 +76,12 @@ const result = await page.evaluate(async (rawFixture) => {
calls.configGets += 1;
return { config: structuredClone(fixture.config), rev: 131, can_write: false };
}
if (message.type === 'houseplan/config/set') {
calls.configSets += 1;
const error = new Error('Only administrators may edit the configuration');
error.code = 'unauthorized';
throw error;
}
if (message.type === 'houseplan/layout/get') {
return { layout: structuredClone(fixture.layout), rev: 131 };
}
@@ -153,6 +160,51 @@ const result = await page.evaluate(async (rawFixture) => {
out.activeTabClickIsNoop = JSON.stringify(layerSnapshot(cold.card)) === JSON.stringify(beforeClick);
await sleep(700);
out.optionalFailureNoFullRetry = cold.calls.configGets === 1;
const readonlyToasts = [];
cold.card._showToast = (message) => { readonlyToasts.push(message); };
const addedDeviceId = 'readonly-added-light';
const addedEntityId = 'light.readonly_added_light';
cold.card.hass = {
...cold.card.hass,
devices: {
...cold.card.hass.devices,
[addedDeviceId]: {
id: addedDeviceId,
name: 'Readonly added light',
model: 'READONLY-NEW',
area_id: 'golden_light_left',
identifiers: [['houseplan_golden', addedDeviceId]],
config_entries: ['golden_entry'],
entry_type: null,
via_device_id: null,
disabled_by: null,
},
},
entities: {
...cold.card.hass.entities,
[addedEntityId]: {
entity_id: addedEntityId,
device_id: addedDeviceId,
platform: 'houseplan_golden',
config_entry_id: 'golden_entry',
disabled_by: null,
},
},
states: {
...cold.card.hass.states,
[addedEntityId]: {
entity_id: addedEntityId,
state: 'off',
attributes: { friendly_name: 'Readonly added light' },
},
},
};
await cold.card.updateComplete;
await sleep(700);
out.readonlyNewDeviceDoesNotWrite = cold.calls.configSets === 0;
out.readonlyNewDeviceDoesNotToast = readonlyToasts.length === 0;
out.readonlyKnownDevicesStayAuthoritative = !cold.card._settings.known_devices.includes(addedDeviceId);
cold.card.remove();
await sleep(20);
out.successfulSubscriptionCleanedUp = cold.calls.unsubscribed.includes('houseplan_layout_updated');
+144 -144
View File
@@ -1,312 +1,312 @@
{
"schema": 1,
"fingerprint": "fab26ba4f38e0ad405db785685445fcef47de8ffbe84f490e8de7c6b8c1291a7",
"fingerprint": "34ed8381ef1adf8c591e66e7e06a85168914fdc4d58c21a841ade47a105c7ef0",
"entry": "houseplan-card.js",
"panelEntry": "houseplan-panel.js",
"initialViewFiles": [
"houseplan-assets/houseplan-card-OIS3Mvzx.js",
"houseplan-assets/houseplan-card-Dvtr52xr.js",
"houseplan-card.js"
],
"initialViewGzipBytes": 290838,
"initialViewGzipBytes": 290841,
"initialPanelFiles": [
"houseplan-assets/houseplan-card-OIS3Mvzx.js",
"houseplan-assets/houseplan-card-Dvtr52xr.js",
"houseplan-panel.js"
],
"initialPanelGzipBytes": 292360,
"initialPanelGzipBytes": 292363,
"initialPanelOnlyFiles": [
"houseplan-panel.js"
],
"initialPanelOnlyGzipBytes": 2324,
"initialPanelOnlyGzipBytes": 2322,
"lazyFiles": [
"houseplan-assets/backdrop-pick-Cw68iWqr.js",
"houseplan-assets/de-gIMcxW3P.js",
"houseplan-assets/editor-CA7MKuk8.js",
"houseplan-assets/form-kit.styles-HxyRNtFW.js",
"houseplan-assets/fr-DmdKwehD.js",
"houseplan-assets/furniture-plan-art.generated-CWQQHnJL.js",
"houseplan-assets/houseplan-editor-runtime-BcL3Rj9i.js",
"houseplan-assets/houseplan-onboarding-runtime-DIQStHYP.js",
"houseplan-assets/hp-zigbee-topology-overlay-CfzcT25m.js",
"houseplan-assets/iso-scene-render-CtsBhANN.js",
"houseplan-assets/live-interaction-runtime-CrYU-Xe2.js",
"houseplan-assets/pdf-export-IUs8Loq8.js",
"houseplan-assets/summary-panel-runtime-loaded-CJhgoeV3.js",
"houseplan-assets/zigbee-topology-4qCSmPRR.js",
"houseplan-assets/zigbee-topology-runtime-ul8YAth8.js"
"houseplan-assets/backdrop-pick-4y8dV8Ve.js",
"houseplan-assets/de-Cf-Yh-qD.js",
"houseplan-assets/editor-COYbDg2h.js",
"houseplan-assets/form-kit.styles-eIw2y67V.js",
"houseplan-assets/fr-C5bQpwdy.js",
"houseplan-assets/furniture-plan-art.generated-CkHr8lOA.js",
"houseplan-assets/houseplan-editor-runtime-C54tPnne.js",
"houseplan-assets/houseplan-onboarding-runtime-Ch5D7oRi.js",
"houseplan-assets/hp-zigbee-topology-overlay-CQpKEtLv.js",
"houseplan-assets/iso-scene-render-CqI3ABeb.js",
"houseplan-assets/live-interaction-runtime-qZV2DHRS.js",
"houseplan-assets/pdf-export-Bmt-_V6k.js",
"houseplan-assets/summary-panel-runtime-loaded-CPobCF-I.js",
"houseplan-assets/zigbee-topology-PPd-Bqxz.js",
"houseplan-assets/zigbee-topology-runtime-DlN1vrja.js"
],
"lazyGzipBytes": 460210,
"lazyGzipBytes": 460178,
"lazyEditorFiles": [
"houseplan-assets/backdrop-pick-Cw68iWqr.js",
"houseplan-assets/editor-CA7MKuk8.js",
"houseplan-assets/form-kit.styles-HxyRNtFW.js",
"houseplan-assets/furniture-plan-art.generated-CWQQHnJL.js",
"houseplan-assets/houseplan-editor-runtime-BcL3Rj9i.js",
"houseplan-assets/zigbee-topology-4qCSmPRR.js"
"houseplan-assets/backdrop-pick-4y8dV8Ve.js",
"houseplan-assets/editor-COYbDg2h.js",
"houseplan-assets/form-kit.styles-eIw2y67V.js",
"houseplan-assets/furniture-plan-art.generated-CkHr8lOA.js",
"houseplan-assets/houseplan-editor-runtime-C54tPnne.js",
"houseplan-assets/zigbee-topology-PPd-Bqxz.js"
],
"lazyEditorGzipBytes": 243659,
"lazyEditorGzipBytes": 243641,
"lazyOnboardingFiles": [
"houseplan-assets/backdrop-pick-Cw68iWqr.js",
"houseplan-assets/form-kit.styles-HxyRNtFW.js",
"houseplan-assets/houseplan-onboarding-runtime-DIQStHYP.js"
"houseplan-assets/backdrop-pick-4y8dV8Ve.js",
"houseplan-assets/form-kit.styles-eIw2y67V.js",
"houseplan-assets/houseplan-onboarding-runtime-Ch5D7oRi.js"
],
"lazyOnboardingGzipBytes": 34057,
"lazyOnboardingGzipBytes": 34053,
"lazyLocaleFiles": [
"houseplan-assets/de-gIMcxW3P.js",
"houseplan-assets/fr-DmdKwehD.js"
"houseplan-assets/de-Cf-Yh-qD.js",
"houseplan-assets/fr-C5bQpwdy.js"
],
"lazyLocaleGzipBytes": 55363,
"lazyLocaleGzipBytes": 55369,
"lazyIsometricFiles": [
"houseplan-assets/iso-scene-render-CtsBhANN.js"
"houseplan-assets/iso-scene-render-CqI3ABeb.js"
],
"lazyIsometricGzipBytes": 17642,
"lazyIsometricGzipBytes": 17639,
"lazyFurnitureArtFiles": [
"houseplan-assets/furniture-plan-art.generated-CWQQHnJL.js"
"houseplan-assets/furniture-plan-art.generated-CkHr8lOA.js"
],
"lazyFurnitureArtGzipBytes": 16942,
"lazyFurnitureArtGzipBytes": 16939,
"lazyPdfFiles": [
"houseplan-assets/furniture-plan-art.generated-CWQQHnJL.js",
"houseplan-assets/pdf-export-IUs8Loq8.js"
"houseplan-assets/furniture-plan-art.generated-CkHr8lOA.js",
"houseplan-assets/pdf-export-Bmt-_V6k.js"
],
"lazyPdfGzipBytes": 126831,
"lazyPdfGzipBytes": 126825,
"files": [
{
"path": "houseplan-assets/backdrop-pick-Cw68iWqr.js",
"sha256": "4d86bc7c941e260641e7b4e9c169fa16e206f38fa9cb9d70192536a8d66af928",
"path": "houseplan-assets/backdrop-pick-4y8dV8Ve.js",
"sha256": "16794f5a4841f5a099f9e788342a0b36517795f667591e798fccc9d7c66259b7",
"rawBytes": 74683,
"gzipBytes": 24173,
"gzipBytes": 24171,
"isEntry": false,
"imports": [
"houseplan-assets/form-kit.styles-HxyRNtFW.js",
"houseplan-assets/houseplan-card-OIS3Mvzx.js"
"houseplan-assets/form-kit.styles-eIw2y67V.js",
"houseplan-assets/houseplan-card-Dvtr52xr.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/de-gIMcxW3P.js",
"sha256": "6d6967e057eca2c9848fdbe74083fb4629d7466222fb9adb910c047412c354d2",
"path": "houseplan-assets/de-Cf-Yh-qD.js",
"sha256": "26098db87918225904088f44664b86f8c803177f05081cfab7869afa5459b268",
"rawBytes": 92496,
"gzipBytes": 27924,
"gzipBytes": 27926,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/editor-CA7MKuk8.js",
"sha256": "161461fa1331a4dc738cbc1e0106dc7465e10b3b374f6be14a133fb4899da6bd",
"path": "houseplan-assets/editor-COYbDg2h.js",
"sha256": "47233950f346534ac171ab2bc9cd000c21bfbeaae8cc18f3c4c3d99533ece040",
"rawBytes": 3833,
"gzipBytes": 1583,
"gzipBytes": 1581,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-OIS3Mvzx.js"
"houseplan-assets/houseplan-card-Dvtr52xr.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/form-kit.styles-HxyRNtFW.js",
"sha256": "e09fa7879efc12edc1a1d034cbe85c0361fc1be10512aa5d28f5094d05763d28",
"path": "houseplan-assets/form-kit.styles-eIw2y67V.js",
"sha256": "9e92c98fab6738941682b03c6a21153dd96de8211de3edd83e86ec8a0e09f847",
"rawBytes": 25600,
"gzipBytes": 5056,
"gzipBytes": 5054,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/fr-DmdKwehD.js",
"sha256": "e447713cc06ac0794252390a1a044fa12a7cba59c76f68c2f8222de07cdcd4a4",
"path": "houseplan-assets/fr-C5bQpwdy.js",
"sha256": "3133e01d3bee3c3038d4c4dc1f0c1fa06d1e8d4ae3d21731533aff1b219c84a1",
"rawBytes": 94813,
"gzipBytes": 27439,
"gzipBytes": 27443,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/furniture-plan-art.generated-CWQQHnJL.js",
"sha256": "7f8a02bf9c007e6b4167d6ec11427d7ce952933442b45367943cd3ae078e9834",
"path": "houseplan-assets/furniture-plan-art.generated-CkHr8lOA.js",
"sha256": "56d372ba8e0b7d8c30259ccebd3c7c25715c6f980c800477223c46b23e932b1e",
"rawBytes": 52035,
"gzipBytes": 16942,
"gzipBytes": 16939,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/houseplan-card-OIS3Mvzx.js",
"sha256": "866afdc9095bc6338d0f3fb6e2cd6b7c3ff9171d590a8e3146a5b87f9414d899",
"rawBytes": 1031507,
"gzipBytes": 290036,
"path": "houseplan-assets/houseplan-card-Dvtr52xr.js",
"sha256": "c8f730ccefec2a91571c000911d1fb8d0efc4e872edeb08fb1d8a17fc453447d",
"rawBytes": 1031560,
"gzipBytes": 290041,
"isEntry": false,
"imports": [],
"dynamicImports": [
"houseplan-assets/de-gIMcxW3P.js",
"houseplan-assets/editor-CA7MKuk8.js",
"houseplan-assets/fr-DmdKwehD.js",
"houseplan-assets/furniture-plan-art.generated-CWQQHnJL.js",
"houseplan-assets/houseplan-editor-runtime-BcL3Rj9i.js",
"houseplan-assets/houseplan-onboarding-runtime-DIQStHYP.js",
"houseplan-assets/hp-zigbee-topology-overlay-CfzcT25m.js",
"houseplan-assets/iso-scene-render-CtsBhANN.js",
"houseplan-assets/live-interaction-runtime-CrYU-Xe2.js",
"houseplan-assets/pdf-export-IUs8Loq8.js",
"houseplan-assets/summary-panel-runtime-loaded-CJhgoeV3.js"
"houseplan-assets/de-Cf-Yh-qD.js",
"houseplan-assets/editor-COYbDg2h.js",
"houseplan-assets/fr-C5bQpwdy.js",
"houseplan-assets/furniture-plan-art.generated-CkHr8lOA.js",
"houseplan-assets/houseplan-editor-runtime-C54tPnne.js",
"houseplan-assets/houseplan-onboarding-runtime-Ch5D7oRi.js",
"houseplan-assets/hp-zigbee-topology-overlay-CQpKEtLv.js",
"houseplan-assets/iso-scene-render-CqI3ABeb.js",
"houseplan-assets/live-interaction-runtime-qZV2DHRS.js",
"houseplan-assets/pdf-export-Bmt-_V6k.js",
"houseplan-assets/summary-panel-runtime-loaded-CPobCF-I.js"
]
},
{
"path": "houseplan-assets/houseplan-editor-runtime-BcL3Rj9i.js",
"sha256": "8a8c626d0c2c186981a6911c2db173d6cb69ceb58c3fe3bf997747aebeae813a",
"path": "houseplan-assets/houseplan-editor-runtime-C54tPnne.js",
"sha256": "972acd8d6e338b16e197c2eadac07457034cf3fefea39c5a9b1c37d08d4a8ab8",
"rawBytes": 677942,
"gzipBytes": 188476,
"gzipBytes": 188472,
"isEntry": false,
"imports": [
"houseplan-assets/backdrop-pick-Cw68iWqr.js",
"houseplan-assets/form-kit.styles-HxyRNtFW.js",
"houseplan-assets/furniture-plan-art.generated-CWQQHnJL.js",
"houseplan-assets/houseplan-card-OIS3Mvzx.js",
"houseplan-assets/zigbee-topology-4qCSmPRR.js"
"houseplan-assets/backdrop-pick-4y8dV8Ve.js",
"houseplan-assets/form-kit.styles-eIw2y67V.js",
"houseplan-assets/furniture-plan-art.generated-CkHr8lOA.js",
"houseplan-assets/houseplan-card-Dvtr52xr.js",
"houseplan-assets/zigbee-topology-PPd-Bqxz.js"
],
"dynamicImports": [
"houseplan-assets/zigbee-topology-runtime-ul8YAth8.js"
"houseplan-assets/zigbee-topology-runtime-DlN1vrja.js"
]
},
{
"path": "houseplan-assets/houseplan-onboarding-runtime-DIQStHYP.js",
"sha256": "5d38adbc5c64caea18e81f136c3e60f859eae9baa9789b6edef95c1765261c83",
"path": "houseplan-assets/houseplan-onboarding-runtime-Ch5D7oRi.js",
"sha256": "b40d0ea3bd87b970334ee2482338cd8aa3674e6fd7a51a53d06bc4720273dfed",
"rawBytes": 15667,
"gzipBytes": 4828,
"isEntry": false,
"imports": [
"houseplan-assets/backdrop-pick-Cw68iWqr.js",
"houseplan-assets/form-kit.styles-HxyRNtFW.js",
"houseplan-assets/houseplan-card-OIS3Mvzx.js"
"houseplan-assets/backdrop-pick-4y8dV8Ve.js",
"houseplan-assets/form-kit.styles-eIw2y67V.js",
"houseplan-assets/houseplan-card-Dvtr52xr.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/hp-zigbee-topology-overlay-CfzcT25m.js",
"sha256": "200adf925b2a7c1097fe9a9eb0bac0d4274c5b48a7790ecff57cf488e5312253",
"path": "houseplan-assets/hp-zigbee-topology-overlay-CQpKEtLv.js",
"sha256": "9d4f76a5c0326ff856c2dae97f233ded939549480a4e60c6d42d7b407aeadcd7",
"rawBytes": 10759,
"gzipBytes": 3684,
"gzipBytes": 3680,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-OIS3Mvzx.js",
"houseplan-assets/zigbee-topology-4qCSmPRR.js",
"houseplan-assets/zigbee-topology-runtime-ul8YAth8.js"
"houseplan-assets/houseplan-card-Dvtr52xr.js",
"houseplan-assets/zigbee-topology-PPd-Bqxz.js",
"houseplan-assets/zigbee-topology-runtime-DlN1vrja.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/iso-scene-render-CtsBhANN.js",
"sha256": "563aa1d2051de0c18ac59590d0c4803e5623929811d55f5affc9579092ed7b9c",
"path": "houseplan-assets/iso-scene-render-CqI3ABeb.js",
"sha256": "dc1afe7f4524595faf6dbca1dbd1430c795182070291ab48f037eb9099c4d110",
"rawBytes": 51983,
"gzipBytes": 17642,
"gzipBytes": 17639,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-OIS3Mvzx.js"
"houseplan-assets/houseplan-card-Dvtr52xr.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/live-interaction-runtime-CrYU-Xe2.js",
"sha256": "778330eb3a4cc03ceff627f4d0a8fa6e501666d6c69012ef6d63fdf2f9a9dc48",
"path": "houseplan-assets/live-interaction-runtime-qZV2DHRS.js",
"sha256": "dd2853b8ecd883ad55f15dc30219ba5ab1417c9fbfd48df9f0a4d76aa0971008",
"rawBytes": 8216,
"gzipBytes": 3207,
"gzipBytes": 3204,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-OIS3Mvzx.js"
"houseplan-assets/houseplan-card-Dvtr52xr.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/pdf-export-IUs8Loq8.js",
"sha256": "6b9cddfde0743d06fa3dba3a04aee68175f31d48aae40b01254656af821329f0",
"path": "houseplan-assets/pdf-export-Bmt-_V6k.js",
"sha256": "c90d4fa9c838be1a1132109ec13f6ad04e3e4cea6a3298e0177413677a2298a1",
"rawBytes": 236264,
"gzipBytes": 109889,
"gzipBytes": 109886,
"isEntry": false,
"imports": [
"houseplan-assets/furniture-plan-art.generated-CWQQHnJL.js",
"houseplan-assets/houseplan-card-OIS3Mvzx.js"
"houseplan-assets/furniture-plan-art.generated-CkHr8lOA.js",
"houseplan-assets/houseplan-card-Dvtr52xr.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/summary-panel-editor-vVUmBjBs.js",
"sha256": "88766397f714c720249bfc11fdb0bb46a272218fb6b222b6be8e553cb33abdf0",
"path": "houseplan-assets/summary-panel-editor-BBxrM3sF.js",
"sha256": "bfedcc5ca13c71e1623ec92dc5979359192caa4c49bf993fe385734adcb9293c",
"rawBytes": 14862,
"gzipBytes": 3426,
"gzipBytes": 3420,
"isEntry": false,
"imports": [
"houseplan-assets/form-kit.styles-HxyRNtFW.js",
"houseplan-assets/houseplan-card-OIS3Mvzx.js",
"houseplan-assets/summary-panel-runtime-loaded-CJhgoeV3.js"
"houseplan-assets/form-kit.styles-eIw2y67V.js",
"houseplan-assets/houseplan-card-Dvtr52xr.js",
"houseplan-assets/summary-panel-runtime-loaded-CPobCF-I.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/summary-panel-metrics-B-djAqRO.js",
"sha256": "48144253e983f08e364dfa59713d3a91a087f62af6cf5f1e4c8ad758b6b24d95",
"path": "houseplan-assets/summary-panel-metrics-Ck5HHl5d.js",
"sha256": "d691ab7cbb3a76f1337147091c4443cea8fb51f133dcf788c49aaafb81bcd2c2",
"rawBytes": 2611,
"gzipBytes": 1307,
"gzipBytes": 1306,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-OIS3Mvzx.js"
"houseplan-assets/houseplan-card-Dvtr52xr.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/summary-panel-runtime-loaded-CJhgoeV3.js",
"sha256": "ec0ebaf80af3fcff7f7792d67dc21811398456c37286eff4175ff8e3cb9086a4",
"path": "houseplan-assets/summary-panel-runtime-loaded-CPobCF-I.js",
"sha256": "d782b2a4faa18bb30a1099aa9384d4a837b18b5884fad9cf9b32c89ac4d70b0b",
"rawBytes": 72733,
"gzipBytes": 20174,
"gzipBytes": 20169,
"isEntry": false,
"imports": [
"houseplan-assets/form-kit.styles-HxyRNtFW.js",
"houseplan-assets/houseplan-card-OIS3Mvzx.js"
"houseplan-assets/form-kit.styles-eIw2y67V.js",
"houseplan-assets/houseplan-card-Dvtr52xr.js"
],
"dynamicImports": [
"houseplan-assets/summary-panel-editor-vVUmBjBs.js",
"houseplan-assets/summary-panel-metrics-B-djAqRO.js"
"houseplan-assets/summary-panel-editor-BBxrM3sF.js",
"houseplan-assets/summary-panel-metrics-Ck5HHl5d.js"
]
},
{
"path": "houseplan-assets/zigbee-topology-4qCSmPRR.js",
"sha256": "19c6b44a2a83f8b9542f66cdd301e0766c5443a2adf20d96696daa5c21543572",
"path": "houseplan-assets/zigbee-topology-PPd-Bqxz.js",
"sha256": "26dafa1b5f06ec4fe01aab1e492c80896593fd62a7f16e9766075d25b15e88fb",
"rawBytes": 18962,
"gzipBytes": 7429,
"gzipBytes": 7424,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-OIS3Mvzx.js"
"houseplan-assets/houseplan-card-Dvtr52xr.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/zigbee-topology-runtime-ul8YAth8.js",
"sha256": "0f9ffcb2b82a8e40aca694268395bddd4895ad080c34a3a69e1b2b06412d46f3",
"path": "houseplan-assets/zigbee-topology-runtime-DlN1vrja.js",
"sha256": "26dd9b4f4962e0f6b19cba4a4e7d222de6fa6324eea56bb9cd2db1a807a91486",
"rawBytes": 3942,
"gzipBytes": 1764,
"gzipBytes": 1762,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-OIS3Mvzx.js",
"houseplan-assets/zigbee-topology-4qCSmPRR.js"
"houseplan-assets/houseplan-card-Dvtr52xr.js",
"houseplan-assets/zigbee-topology-PPd-Bqxz.js"
],
"dynamicImports": []
},
{
"path": "houseplan-card.js",
"sha256": "ca44bf40de6ccf2d41a79c05b2a59553c1aabd87a79b87c541ef907dd5143f77",
"sha256": "ed977d6515b2c79736c48c1e4c67526abd633cfb2b308099119b2c8b601d98f3",
"rawBytes": 1205,
"gzipBytes": 802,
"gzipBytes": 800,
"isEntry": true,
"imports": [
"houseplan-assets/houseplan-card-OIS3Mvzx.js"
"houseplan-assets/houseplan-card-Dvtr52xr.js"
],
"dynamicImports": []
},
{
"path": "houseplan-panel.js",
"sha256": "18c3b3f1580e6c14c5949b8ad67c2f36a4979cce87112d4930dfe89ea9bb1bfc",
"sha256": "4ab6d42187cda8188950e8e64f71b3cda0f44cb4955eeb2b07bb0ad87c8a7f82",
"rawBytes": 6165,
"gzipBytes": 2324,
"gzipBytes": 2322,
"isEntry": true,
"imports": [
"houseplan-assets/houseplan-card-OIS3Mvzx.js"
"houseplan-assets/houseplan-card-Dvtr52xr.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__="fab26ba4f38e0ad405db785685445fcef47de8ffbe84f490e8de7c6b8c1291a7";import{az as e,l as o,aC as t,e8 as s,A as a,e9 as i,ea as l,eb as n,E as r,c}from"./houseplan-card-OIS3Mvzx.js";class f 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,f={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")},h=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
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="34ed8381ef1adf8c591e66e7e06a85168914fdc4d58c21a841ade47a105c7ef0";import{az as e,l as o,aC as t,e8 as s,A as a,e9 as i,ea as l,eb as n,E as r,c}from"./houseplan-card-Dvtr52xr.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=>f[e.name]||e.name}
.computeLabel=${e=>h[e.name]||e.name}
@value-changed=${this._valueChanged}
></ha-form>`;return c`
${d(h.slice(0,3))}
${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:_})}
</div>`:a}
${d(h.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)}}f.properties={hass:{attribute:!1},_config:{state:!0},_spaces:{state:!0}},customElements.get("houseplan-card-editor")||customElements.define("houseplan-card-editor",f);
${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
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__="fab26ba4f38e0ad405db785685445fcef47de8ffbe84f490e8de7c6b8c1291a7";import{l as t,br as s,A as e,aC as o,c as a,g as i,cF as l,cG as h,cH as n,bo as r,cI as c,cN as p,cJ as d,cK as _,cL as u,cM as g,cO as m,cP as f}from"./houseplan-card-OIS3Mvzx.js";import{D as b,C as v,E as y,G as w,H as D,I as $,J as S,v as C}from"./backdrop-pick-Cw68iWqr.js";import"./form-kit.styles-HxyRNtFW.js";const k="fab26ba4f38e0ad405db785685445fcef47de8ffbe84f490e8de7c6b8c1291a7";class F{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(i){const l=`${i}.aria`,h=t(this.host.hass,this.host._config?.language);return s(h,i)&&s(h,l)?a`<hp-help data-help-key=${i}
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="34ed8381ef1adf8c591e66e7e06a85168914fdc4d58c21a841ade47a105c7ef0";import{l as t,br as s,A as e,aC as o,c as a,g as i,cF as l,cG as h,cH as n,bo as r,cI as c,cN as p,cJ as d,cK as _,cL as u,cM as g,cO as m,cP as f}from"./houseplan-card-Dvtr52xr.js";import{D as b,C as v,E as y,G as w,H as D,I as $,J as S,v as C}from"./backdrop-pick-4y8dV8Ve.js";import"./form-kit.styles-eIw2y67V.js";const k="34ed8381ef1adf8c591e66e7e06a85168914fdc4d58c21a841ade47a105c7ef0";class F{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(i){const l=`${i}.aria`,h=t(this.host.hass,this.host._config?.language);return s(h,i)&&s(h,l)?a`<hp-help data-help-key=${i}
.text=${o(h,i)} .ariaLabel=${o(h,l)}></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 o=i(e),a=e.settings?.custom_fill&&"object"==typeof e.settings.custom_fill?l(e.settings.custom_fill):null,p="none"===o.fill?{...a||h,a:0}:a;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:o.showBorders,showNames:o.showNames,zeroWallStyle:c(e),displayTouched:!0,hideDecor:o.hideDecor,hideOpenings:o.hideOpenings,roomColor:o.color,roomOpacity:o.opacity,fillMode:"none"===o.fill?"custom":o.fill,customFill:p,glowEnabled:o.glow,bgColor:o.bgColor,bgMode:"static"===e.settings?.bg_mode||"daynight"===e.settings?.bg_mode?e.settings.bg_mode:null,northDeg:r({},e.settings),sunRays:"boolean"==typeof e.settings?.sun_rays?e.settings.sun_rays:null,tempMin:o.tempMin,tempMax:o.tempMax,showLqi:o.showLqi??this.host._config?.show_signal??!0,cardFontScale:o.cardFontScale,labelTemp:o.labelTemp,labelHum:o.labelHum,labelLqi:o.labelLqi,labelLight:o.labelLight,cellCm:Number(e.cell_cm)>0?Number(e.cell_cm):5,cellCmInput:n(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:n(e,this.host._imperial),cellCmTouched:!1,busy:!1},b(this.host,this.host._spaceDialog)}async _pickPlanFile(t){const s=t.target,e=s.files?.[0];if(!e||!this.host._spaceDialog)return;s.value="";const o=await v(e);if("reject"===o.kind)return void this.host._showToast(this.host._t("toast.plan_formats"));if("guard"===o.kind)return void(this.host._backdropGuard=o.state);const a=await y(e,o.ext,e.name);this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:a})}_renderBackdropGuard(){return w(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}),o=this.host._spaceDialog;return o&&o.planUrl===t&&Number.isFinite(e)&&e>0?(this.host._spaceDialog={...o,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 o=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")}),a=this.host._spaceDialog,i=a?.saved?.find(s=>s.name===t);if(o&&a&&i&&i.url===e.url&&i.modified===e.modified&&!i.used_by.length&&i.url!==a.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 a`<div class="savedplans muted">${this.host._t("space.loading")}</div>`;const s=t.saved||[];if(!s.length)return a`<div class="savedplans muted">${this.host._t("space.no_saved")}</div>`;return a`<div class="savedplans">
${s.map(s=>{return a`
<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
@@ -1,4 +1,4 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="fab26ba4f38e0ad405db785685445fcef47de8ffbe84f490e8de7c6b8c1291a7";import{c as a,A as e}from"./houseplan-card-OIS3Mvzx.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-CJhgoeV3.js";import"./form-kit.styles-HxyRNtFW.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__="34ed8381ef1adf8c591e66e7e06a85168914fdc4d58c21a841ade47a105c7ef0";import{c as a,A as e}from"./houseplan-card-Dvtr52xr.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-CPobCF-I.js";import"./form-kit.styles-eIw2y67V.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__="fab26ba4f38e0ad405db785685445fcef47de8ffbe84f490e8de7c6b8c1291a7";import{ee as e,J as t,aX as n,H as i,aa as o,a8 as r,bP as a,bO as s,aW as l,aV as c,aY as d,ef as u,eg as f,bR as m,eh as g}from"./houseplan-card-OIS3Mvzx.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),a=i.binding.slice(o+1),s="device"===r?e.registry.devices?.[a]:null,l="entity"===r?e.registry.entities?.[a]:null,c="device"===r?a:l?.device_id,d="device"===r?s?.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(a))&&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 s=t(e);if(!s)continue;const l=n(f.rooms,e.id,m.walls,m.openCuts,i,m.cellCm,o,r,g.roomGeom,g.multiWallNodes)||s;v=y(v,a(l,m.physicalBodies)),yield}const _=m.cellCm/o;u+=s(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__="34ed8381ef1adf8c591e66e7e06a85168914fdc4d58c21a841ade47a105c7ef0";import{ee as e,J as t,aX as n,H as i,aa as o,a8 as r,bP as a,bO as s,aW as c,aV as l,aY as d,ef as u,eg as f,bR as m,eh as g}from"./houseplan-card-Dvtr52xr.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),a=i.binding.slice(o+1),s="device"===r?e.registry.devices?.[a]:null,c="entity"===r?e.registry.entities?.[a]:null,l="device"===r?a:c?.device_id,d="device"===r?s?.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(a))&&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 s=t(e);if(!s)continue;const c=n(f.rooms,e.id,m.walls,m.openCuts,i,m.cellCm,o,r,g.roomGeom,g.multiWallNodes)||s;v=y(v,a(c,m.physicalBodies)),yield}const _=m.cellCm/o;u+=s(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 S(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 b(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,b as summaryEntityValue,S as summarySystemValue,p as totalCleanFloorAreaM2};
@@ -1 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="fab26ba4f38e0ad405db785685445fcef47de8ffbe84f490e8de7c6b8c1291a7";import{n as t,b as n}from"./zigbee-topology-4qCSmPRR.js";import{aI as e}from"./houseplan-card-OIS3Mvzx.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 f(t){if(!0!==t?.user?.is_admin)throw a("permission")}function p(n){const e=i(n);return e?c(e,"zha",async()=>{if(f(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 m(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 g(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(f(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,p=null,g=null;const y=new Promise(t=>{u=t}),w=new Promise((t,n)=>{p=t,g=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 f=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&&p?.(n):c&&g?.(a("invalid_payload"))},{type:"mqtt/subscribe",topic:`${l}/bridge/response/networkmap`});"function"==typeof f&&b.push(f),await m(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 m(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{p as readZhaTopology,g as refreshZ2mTopology,u as subscribeZigbeeTopology,l as zigbeeTopologyRuntimeSnapshot};
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="34ed8381ef1adf8c591e66e7e06a85168914fdc4d58c21a841ade47a105c7ef0";import{n as t,b as n}from"./zigbee-topology-PPd-Bqxz.js";import{aI as e}from"./houseplan-card-Dvtr52xr.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 f(t){if(!0!==t?.user?.is_admin)throw a("permission")}function p(n){const e=i(n);return e?c(e,"zha",async()=>{if(f(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 m(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 g(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(f(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,p=null,g=null;const y=new Promise(t=>{u=t}),w=new Promise((t,n)=>{p=t,g=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 f=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&&p?.(n):c&&g?.(a("invalid_payload"))},{type:"mqtt/subscribe",topic:`${l}/bridge/response/networkmap`});"function"==typeof f&&b.push(f),await m(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 m(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{p as readZhaTopology,g as refreshZ2mTopology,u as subscribeZigbeeTopology,l as zigbeeTopologyRuntimeSnapshot};
+1 -1
View File
@@ -1 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="fab26ba4f38e0ad405db785685445fcef47de8ffbe84f490e8de7c6b8c1291a7";try{await import("./houseplan-assets/houseplan-card-OIS3Mvzx.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__="34ed8381ef1adf8c591e66e7e06a85168914fdc4d58c21a841ade47a105c7ef0";try{await import("./houseplan-assets/houseplan-card-Dvtr52xr.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
+4
View File
@@ -2,6 +2,10 @@
## Unreleased
- Read-only household and kiosk views no longer show an administrator-only
error when Home Assistant discovers a new device; config conflicts in View
now refresh safely even though the editor has never been loaded
([#612](https://github.com/Matysh/houseplan-card/issues/612)).
- The unsaved-settings prompt is now unambiguous in Russian: **Return** keeps
the draft, **Don't save** discards it, and the discard action no longer uses
an open-lock icon ([#610](https://github.com/Matysh/houseplan-card/issues/610)).
+5
View File
@@ -8,6 +8,11 @@
## Не выпущено
- Read-only экраны домочадцев и kiosk больше не показывают ошибку о правах
администратора при появлении нового устройства в Home Assistant; конфликт
конфига в режиме просмотра теперь безопасно обновляет данные, даже если
редактор ещё не загружался
([#612](https://github.com/Matysh/houseplan-card/issues/612)).
- В вопросе о несохранённых настройках действия теперь названы однозначно:
**«Вернуться»** сохраняет черновик, а **«Не сохранять»** сбрасывает его;
иконка потери правок больше не выглядит как открытый замок
+12 -12
View File
@@ -3,7 +3,7 @@
"fixture": "synthetic-only",
"chromium": "151.0.7922.34",
"oxipng": "oxipng 10.2.0",
"sourceFingerprint": "39cf779bcc7ecfa8128f959d9c84097df1a355f8a934f2074eeb1e17422b284f",
"sourceFingerprint": "93850d41a22fb6adc94ef8d5d04e22aa6ce1f52b1b19b02b2c9df73c8dab8c10",
"captureScriptSha256": "e2d14d89de793011615662af7c83c433768d4761f6cec7f0b3860c797494299e",
"command": "npm run build && node demo/docs/capture.mjs",
"scenarios": {
@@ -15,7 +15,7 @@
},
"theme": "dark",
"language": "en",
"sourceSha256": "39cf779bcc7ecfa8128f959d9c84097df1a355f8a934f2074eeb1e17422b284f",
"sourceSha256": "93850d41a22fb6adc94ef8d5d04e22aa6ce1f52b1b19b02b2c9df73c8dab8c10",
"imageSha256": "5d1e816c2fde72316809991e9651e242d3cbcd897fb9db0554dc3bde943486f5"
},
"view-touch": {
@@ -26,7 +26,7 @@
},
"theme": "dark",
"language": "en",
"sourceSha256": "39cf779bcc7ecfa8128f959d9c84097df1a355f8a934f2074eeb1e17422b284f",
"sourceSha256": "93850d41a22fb6adc94ef8d5d04e22aa6ce1f52b1b19b02b2c9df73c8dab8c10",
"imageSha256": "bc2001f9cd51715a38ad8d913b1c5a4f2220b3917c8dc03b2de65cfb3f62f808"
},
"space-create": {
@@ -37,7 +37,7 @@
},
"theme": "dark",
"language": "en",
"sourceSha256": "39cf779bcc7ecfa8128f959d9c84097df1a355f8a934f2074eeb1e17422b284f",
"sourceSha256": "93850d41a22fb6adc94ef8d5d04e22aa6ce1f52b1b19b02b2c9df73c8dab8c10",
"imageSha256": "a74330dcdd0d590e2e0008c7030a9dc11df9793682b1a050a7aaa734c651cc30"
},
"room-contour-close": {
@@ -48,7 +48,7 @@
},
"theme": "dark",
"language": "en",
"sourceSha256": "39cf779bcc7ecfa8128f959d9c84097df1a355f8a934f2074eeb1e17422b284f",
"sourceSha256": "93850d41a22fb6adc94ef8d5d04e22aa6ce1f52b1b19b02b2c9df73c8dab8c10",
"imageSha256": "0c354a79f9c3660788b6c5e889a27b6bd78b1f209dc0eef6bb43e2c1344028c4"
},
"plan-context-tray": {
@@ -59,7 +59,7 @@
},
"theme": "dark",
"language": "en",
"sourceSha256": "39cf779bcc7ecfa8128f959d9c84097df1a355f8a934f2074eeb1e17422b284f",
"sourceSha256": "93850d41a22fb6adc94ef8d5d04e22aa6ce1f52b1b19b02b2c9df73c8dab8c10",
"imageSha256": "64169c543291bc4df806dcf8ff484b42c8ea55eb343323d945344e0e28f2ce97"
},
"device-editor": {
@@ -70,7 +70,7 @@
},
"theme": "dark",
"language": "en",
"sourceSha256": "39cf779bcc7ecfa8128f959d9c84097df1a355f8a934f2074eeb1e17422b284f",
"sourceSha256": "93850d41a22fb6adc94ef8d5d04e22aa6ce1f52b1b19b02b2c9df73c8dab8c10",
"imageSha256": "a4c1f55438e669fe7533a01185d50f7396e6fab23a3f2b9c8a669c6a28e6b200"
},
"device-display-preview": {
@@ -81,7 +81,7 @@
},
"theme": "dark",
"language": "en",
"sourceSha256": "39cf779bcc7ecfa8128f959d9c84097df1a355f8a934f2074eeb1e17422b284f",
"sourceSha256": "93850d41a22fb6adc94ef8d5d04e22aa6ce1f52b1b19b02b2c9df73c8dab8c10",
"imageSha256": "8029b1cd7329e3fc921ae9ca19abe6f7f2c7246eb45c891d088baedf9972fac2"
},
"background-editor": {
@@ -92,7 +92,7 @@
},
"theme": "dark",
"language": "en",
"sourceSha256": "39cf779bcc7ecfa8128f959d9c84097df1a355f8a934f2074eeb1e17422b284f",
"sourceSha256": "93850d41a22fb6adc94ef8d5d04e22aa6ce1f52b1b19b02b2c9df73c8dab8c10",
"imageSha256": "375900a29aa62632883ede6727b7dbb8b48cabe9d7d0e16425f9779c837f3dd9"
},
"room-card": {
@@ -103,7 +103,7 @@
},
"theme": "dark",
"language": "en",
"sourceSha256": "39cf779bcc7ecfa8128f959d9c84097df1a355f8a934f2074eeb1e17422b284f",
"sourceSha256": "93850d41a22fb6adc94ef8d5d04e22aa6ce1f52b1b19b02b2c9df73c8dab8c10",
"imageSha256": "c985783769da1bce50c9abe92ce1c6852d62701ce940f6f0a041d634ac21e888"
},
"device-info": {
@@ -114,7 +114,7 @@
},
"theme": "dark",
"language": "en",
"sourceSha256": "39cf779bcc7ecfa8128f959d9c84097df1a355f8a934f2074eeb1e17422b284f",
"sourceSha256": "93850d41a22fb6adc94ef8d5d04e22aa6ce1f52b1b19b02b2c9df73c8dab8c10",
"imageSha256": "19e247d5bf49375b238292d45ae32e9eb38a83f5d1a53f6ddde860ed4adcef42"
},
"pdf-export": {
@@ -125,7 +125,7 @@
},
"theme": "light",
"language": "en",
"sourceSha256": "39cf779bcc7ecfa8128f959d9c84097df1a355f8a934f2074eeb1e17422b284f",
"sourceSha256": "93850d41a22fb6adc94ef8d5d04e22aa6ce1f52b1b19b02b2c9df73c8dab8c10",
"imageSha256": "4537692fd57a3ed95528eddd748eee5cb6e456ffab7cc49169853d62459252cd"
}
},
+24
View File
@@ -72,6 +72,30 @@ function relocateEditorPatch(patch, cardSource, editorSource) {
// `find` обязан встречаться в файле ровно один раз: патч, который ложится «куда
// попало», проверяет не то, что объявлен проверять. Это контролирует --check.
const MUTANT_DEFINITIONS = [
{
id: 'view-conflict-requires-editor-runtime',
guard: 'node --test test/config-write-conflict.test.mjs',
because: '#612 AC1: View legitimately has no editor runtime, but its background config writes '
+ 'can still conflict. Requiring the editor restores the unhandled exception and prevents the '
+ 'authoritative reload.',
patches: [{
file: 'src/config-write-conflict.ts',
find: ' editorRuntime?._cancelPath();\n void reload();',
replace: ' editorRuntime!._cancelPath(); // mutant: View has no runtime\n void reload();',
}],
},
{
id: 'readonly-view-syncs-new-devices',
guard: 'node demo/smoke_readonly_cold_start.mjs',
because: '#612 AC2: a read-only household or kiosk View must never attempt the shared '
+ 'known_devices write. Removing the authority guard restores the unauthorized toast for '
+ 'every newly discovered HA device.',
patches: [{
file: 'src/houseplan-card.ts',
find: ' if (!this._norm || !this._loadOk || !this._serverCfg || !this._canEdit) return;',
replace: ' if (!this._norm || !this._loadOk || !this._serverCfg) return; // mutant: ignore write authority',
}],
},
{
id: 'discard-confirm-action-icon-falls-back-to-lock',
guard: 'node demo/smoke_discard_copy.mjs',
+16
View File
@@ -0,0 +1,16 @@
export interface ConfigConflictEditorRuntime {
_cancelPath(): void;
}
/**
* Drop an editor-only draft when one exists, then refresh the authoritative
* config. View deliberately has no editor runtime, but it can still own
* background config writes and therefore must recover from their conflicts.
*/
export function recoverConfigWriteConflict(
editorRuntime: ConfigConflictEditorRuntime | null,
reload: () => void | Promise<void>,
): void {
editorRuntime?._cancelPath();
void reload();
}
+3 -4
View File
@@ -176,6 +176,7 @@ import {
adoptAuthoritativeGated, createConfigAdoption,
type ConfigAdoption, type ConfigAdoptionHostPort, type GatedAdoptionInput, type GatedAdoptionResult,
} from './config-adoption';
import { recoverConfigWriteConflict } from './config-write-conflict';
import {
configReloadContext,
ConfigReloadAuthority,
@@ -5144,7 +5145,7 @@ export class HouseplanCard extends LitElement {
* so an upgrade never floods the plan with dots.
*/
private _syncNewDevices(): void {
if (!this._norm || !this._loadOk || !this._serverCfg) return;
if (!this._norm || !this._loadOk || !this._serverCfg || !this._canEdit) return;
// only auto-appearing icons: area devices and light groups; markers are user-made
const autoIds = this._devices.filter((d) => !d.marker && !d.virtual).map((d) => d.id).sort();
const key = autoIds.join(',');
@@ -5158,7 +5159,6 @@ export class HouseplanCard extends LitElement {
...this._serverCfg,
settings: { ...st, known_devices: known, new_device_ids: newIds },
};
// best-effort persist: non-admins under admin_only just keep the local view
this._saveConfig();
}
}
@@ -8016,8 +8016,7 @@ export class HouseplanCard extends LitElement {
// a real one now: another window wrote between our read and our write
this._showToast(this._t('toast.conflict'));
if (!physicalRollback) {
this._cancelPath();
void this._reloadConfigOnly(true);
recoverConfigWriteConflict(this._editorRuntime, () => this._reloadConfigOnly(true));
}
} else {
this._showToast(this._t('toast.cfg_save_failed', { err: this._errText(e) }));
+23
View File
@@ -0,0 +1,23 @@
import test from 'node:test';
import assert from 'node:assert/strict';
import { recoverConfigWriteConflict } from '../test-build/config-write-conflict.js';
test('#612 AC1: a View conflict reloads without an editor runtime or exception', async () => {
const events = [];
assert.doesNotThrow(() => recoverConfigWriteConflict(null, () => {
events.push('reload');
}));
assert.deepEqual(events, ['reload']);
});
test('#612: an editor conflict cancels its draft before reloading', () => {
const events = [];
recoverConfigWriteConflict(
{ _cancelPath: () => events.push('cancel') },
() => { events.push('reload'); },
);
assert.deepEqual(events, ['cancel', 'reload']);
});
+1 -1
View File
@@ -21,7 +21,7 @@
"src/resize.ts", "src/resize-labels.ts", "src/resize-controller.ts", "src/wall-record-preservation.ts",
"src/rules.ts",
"src/devices.ts", "src/device-inbox.ts",
"src/virtual-light-state.ts", "src/config-store.ts", "src/config-reload-authority.ts", "src/summary-panel.ts", "src/summary-panel-metrics.ts", "src/summary-panel-i18n.ts", "src/summary-panel-identity.ts", "src/summary-panel-picker.ts", "src/summary-panel-runtime-loaded.ts",
"src/virtual-light-state.ts", "src/config-store.ts", "src/config-reload-authority.ts", "src/config-write-conflict.ts", "src/summary-panel.ts", "src/summary-panel-metrics.ts", "src/summary-panel-i18n.ts", "src/summary-panel-identity.ts", "src/summary-panel-picker.ts", "src/summary-panel-runtime-loaded.ts",
"src/backdrop-probe.ts",
"src/types.ts",
"src/space-geometry.ts", "src/junction-limits.ts",