fix: address isometric stage 3 review

Issue: #160
User-Visible: no
This commit is contained in:
Sergey Matyunin
2026-09-06 07:48:03 +03:00
parent 77c28076a2
commit bd60edd238
37 changed files with 656 additions and 536 deletions
@@ -1,199 +1,199 @@
{ {
"schema": 1, "schema": 1,
"fingerprint": "bb91e548ad4161d1eec31d88569f3a77e47865846e524dd99d718a3ecd348caa", "fingerprint": "ee07f194e535fbbe6bcab60998a32b7bd32025914663740939ae9f7942b5cd0d",
"entry": "houseplan-card.js", "entry": "houseplan-card.js",
"initialViewFiles": [ "initialViewFiles": [
"houseplan-assets/houseplan-card-DlNVdCIc.js", "houseplan-assets/houseplan-card-h7CLgil-.js",
"houseplan-card.js" "houseplan-card.js"
], ],
"initialViewGzipBytes": 299464, "initialViewGzipBytes": 299495,
"lazyFiles": [ "lazyFiles": [
"houseplan-assets/backdrop-pick-z06DVBiX.js", "houseplan-assets/backdrop-pick-BdNxo7sy.js",
"houseplan-assets/de-B9k4OTKD.js", "houseplan-assets/de-9rJdVNqo.js",
"houseplan-assets/editor-CpADL-Po.js", "houseplan-assets/editor-B9JBe9YT.js",
"houseplan-assets/fr-D2aMxrYb.js", "houseplan-assets/fr-B1YMVVHy.js",
"houseplan-assets/houseplan-editor-runtime-B8MzWgfl.js", "houseplan-assets/houseplan-editor-runtime-BQxfLmCJ.js",
"houseplan-assets/houseplan-onboarding-runtime-CQWdVdoD.js", "houseplan-assets/houseplan-onboarding-runtime-BkPkAgsT.js",
"houseplan-assets/hp-zigbee-topology-overlay-BxvD87oe.js", "houseplan-assets/hp-zigbee-topology-overlay-BJvwogZl.js",
"houseplan-assets/iso-scene-render-BLVbTyKE.js", "houseplan-assets/iso-scene-render-BacpVxOg.js",
"houseplan-assets/live-interaction-runtime-DIiVVHS_.js", "houseplan-assets/live-interaction-runtime-CLqXDVvg.js",
"houseplan-assets/zigbee-topology-CwVLuz6S.js", "houseplan-assets/zigbee-topology-BPCx22ZF.js",
"houseplan-assets/zigbee-topology-runtime-foMTa-yu.js" "houseplan-assets/zigbee-topology-runtime-PXmJ-UR0.js"
], ],
"lazyGzipBytes": 263446, "lazyGzipBytes": 263411,
"lazyEditorFiles": [ "lazyEditorFiles": [
"houseplan-assets/backdrop-pick-z06DVBiX.js", "houseplan-assets/backdrop-pick-BdNxo7sy.js",
"houseplan-assets/editor-CpADL-Po.js", "houseplan-assets/editor-B9JBe9YT.js",
"houseplan-assets/houseplan-editor-runtime-B8MzWgfl.js", "houseplan-assets/houseplan-editor-runtime-BQxfLmCJ.js",
"houseplan-assets/zigbee-topology-CwVLuz6S.js" "houseplan-assets/zigbee-topology-BPCx22ZF.js"
], ],
"lazyEditorGzipBytes": 186624, "lazyEditorGzipBytes": 186628,
"lazyOnboardingFiles": [ "lazyOnboardingFiles": [
"houseplan-assets/backdrop-pick-z06DVBiX.js", "houseplan-assets/backdrop-pick-BdNxo7sy.js",
"houseplan-assets/houseplan-onboarding-runtime-CQWdVdoD.js" "houseplan-assets/houseplan-onboarding-runtime-BkPkAgsT.js"
], ],
"lazyOnboardingGzipBytes": 14324, "lazyOnboardingGzipBytes": 14321,
"lazyLocaleFiles": [ "lazyLocaleFiles": [
"houseplan-assets/de-B9k4OTKD.js", "houseplan-assets/de-9rJdVNqo.js",
"houseplan-assets/fr-D2aMxrYb.js" "houseplan-assets/fr-B1YMVVHy.js"
], ],
"lazyLocaleGzipBytes": 50146, "lazyLocaleGzipBytes": 50152,
"lazyIsometricFiles": [ "lazyIsometricFiles": [
"houseplan-assets/iso-scene-render-BLVbTyKE.js" "houseplan-assets/iso-scene-render-BacpVxOg.js"
], ],
"lazyIsometricGzipBytes": 12083, "lazyIsometricGzipBytes": 12043,
"files": [ "files": [
{ {
"path": "houseplan-assets/backdrop-pick-z06DVBiX.js", "path": "houseplan-assets/backdrop-pick-BdNxo7sy.js",
"sha256": "75e6d7af19c3aba5060dfa8c5f6dc06beaab66a27c417a0de527c5b942dbfbc9", "sha256": "85e78b3b7e19b6fbc9cd7f5f9eeabf60c143e8d84361ce4ae51dcf39eed34ca1",
"rawBytes": 21592, "rawBytes": 21592,
"gzipBytes": 7355, "gzipBytes": 7356,
"isEntry": false, "isEntry": false,
"imports": [ "imports": [
"houseplan-assets/houseplan-card-DlNVdCIc.js" "houseplan-assets/houseplan-card-h7CLgil-.js"
], ],
"dynamicImports": [] "dynamicImports": []
}, },
{ {
"path": "houseplan-assets/de-B9k4OTKD.js", "path": "houseplan-assets/de-9rJdVNqo.js",
"sha256": "4ada0cf6cf1f71ff8f5dc9053fe9e70dc3b74a7a87df63c8c833d2dd5053a650", "sha256": "bc7a8a69292c1cbf12d063ac1c92569660679446dad3b08d783a42a3ecf0fea2",
"rawBytes": 84232, "rawBytes": 84232,
"gzipBytes": 25350, "gzipBytes": 25353,
"isEntry": false, "isEntry": false,
"imports": [], "imports": [],
"dynamicImports": [] "dynamicImports": []
}, },
{ {
"path": "houseplan-assets/editor-CpADL-Po.js", "path": "houseplan-assets/editor-B9JBe9YT.js",
"sha256": "d30ad5dcfbf0c604332774e7ff8213b061c214e0dab24d6752062e76dc8e3eed", "sha256": "dc1d6039050ae2135e3608e118a19065a827024e26a3f32363afa5db40f7e7ed",
"rawBytes": 3831, "rawBytes": 3831,
"gzipBytes": 1585, "gzipBytes": 1584,
"isEntry": false, "isEntry": false,
"imports": [ "imports": [
"houseplan-assets/houseplan-card-DlNVdCIc.js" "houseplan-assets/houseplan-card-h7CLgil-.js"
], ],
"dynamicImports": [] "dynamicImports": []
}, },
{ {
"path": "houseplan-assets/fr-D2aMxrYb.js", "path": "houseplan-assets/fr-B1YMVVHy.js",
"sha256": "a74ec4c4934908ebe04a01a26626770e17ae169a7b60eeadf5b5f4ff5e78b36c", "sha256": "af1be2253d149fb4888961067211a6f77ff5d05f44bdb9dfd75f1b710962a1d8",
"rawBytes": 86273, "rawBytes": 86273,
"gzipBytes": 24796, "gzipBytes": 24799,
"isEntry": false, "isEntry": false,
"imports": [], "imports": [],
"dynamicImports": [] "dynamicImports": []
}, },
{ {
"path": "houseplan-assets/houseplan-card-DlNVdCIc.js", "path": "houseplan-assets/houseplan-card-h7CLgil-.js",
"sha256": "4b15c9335ec994b8182f1d491090fdbafe5c8f1d16ccb13db9cda5e439346050", "sha256": "2d088763554fb5194378ef7a615b1b4022a6e9eaf7c7adb6a8e2c0b32b6073a5",
"rawBytes": 1071991, "rawBytes": 1072052,
"gzipBytes": 298670, "gzipBytes": 298700,
"isEntry": false, "isEntry": false,
"imports": [], "imports": [],
"dynamicImports": [ "dynamicImports": [
"houseplan-assets/de-B9k4OTKD.js", "houseplan-assets/de-9rJdVNqo.js",
"houseplan-assets/editor-CpADL-Po.js", "houseplan-assets/editor-B9JBe9YT.js",
"houseplan-assets/fr-D2aMxrYb.js", "houseplan-assets/fr-B1YMVVHy.js",
"houseplan-assets/houseplan-editor-runtime-B8MzWgfl.js", "houseplan-assets/houseplan-editor-runtime-BQxfLmCJ.js",
"houseplan-assets/houseplan-onboarding-runtime-CQWdVdoD.js", "houseplan-assets/houseplan-onboarding-runtime-BkPkAgsT.js",
"houseplan-assets/hp-zigbee-topology-overlay-BxvD87oe.js", "houseplan-assets/hp-zigbee-topology-overlay-BJvwogZl.js",
"houseplan-assets/iso-scene-render-BLVbTyKE.js", "houseplan-assets/iso-scene-render-BacpVxOg.js",
"houseplan-assets/live-interaction-runtime-DIiVVHS_.js" "houseplan-assets/live-interaction-runtime-CLqXDVvg.js"
] ]
}, },
{ {
"path": "houseplan-assets/houseplan-editor-runtime-B8MzWgfl.js", "path": "houseplan-assets/houseplan-editor-runtime-BQxfLmCJ.js",
"sha256": "06aa1e075def4eb03262e4ad308a96b500c0a73c59cf7641f9f5a3fa618cb41f", "sha256": "969d84a3adeb14e3f1b5ca1c1cd9dd6c0e173dba9a20577c2585eab65ac520d3",
"rawBytes": 639580, "rawBytes": 639580,
"gzipBytes": 170260, "gzipBytes": 170264,
"isEntry": false, "isEntry": false,
"imports": [ "imports": [
"houseplan-assets/backdrop-pick-z06DVBiX.js", "houseplan-assets/backdrop-pick-BdNxo7sy.js",
"houseplan-assets/houseplan-card-DlNVdCIc.js", "houseplan-assets/houseplan-card-h7CLgil-.js",
"houseplan-assets/zigbee-topology-CwVLuz6S.js" "houseplan-assets/zigbee-topology-BPCx22ZF.js"
], ],
"dynamicImports": [ "dynamicImports": [
"houseplan-assets/zigbee-topology-runtime-foMTa-yu.js" "houseplan-assets/zigbee-topology-runtime-PXmJ-UR0.js"
] ]
}, },
{ {
"path": "houseplan-assets/houseplan-onboarding-runtime-CQWdVdoD.js", "path": "houseplan-assets/houseplan-onboarding-runtime-BkPkAgsT.js",
"sha256": "fdac5dd01af4bc78089208ac7acf671a76aa05d21f1f5e1db90429bfcb3965d9", "sha256": "f6da0d6184406def22e1e7e2e0aad25e60499f04a326deafc835d109c79b4c92",
"rawBytes": 28071, "rawBytes": 28071,
"gzipBytes": 6969, "gzipBytes": 6965,
"isEntry": false, "isEntry": false,
"imports": [ "imports": [
"houseplan-assets/backdrop-pick-z06DVBiX.js", "houseplan-assets/backdrop-pick-BdNxo7sy.js",
"houseplan-assets/houseplan-card-DlNVdCIc.js" "houseplan-assets/houseplan-card-h7CLgil-.js"
], ],
"dynamicImports": [] "dynamicImports": []
}, },
{ {
"path": "houseplan-assets/hp-zigbee-topology-overlay-BxvD87oe.js", "path": "houseplan-assets/hp-zigbee-topology-overlay-BJvwogZl.js",
"sha256": "d5b48f961b1e6b208bb2b1dd1343e62fabc7455f77dbb40fffc569dc540a1be7", "sha256": "5ea4c8d30c1b21395080ae3cd12311a2daad0c4cd263ed00da805ab67da3a3c9",
"rawBytes": 11034, "rawBytes": 11034,
"gzipBytes": 3733, "gzipBytes": 3734,
"isEntry": false, "isEntry": false,
"imports": [ "imports": [
"houseplan-assets/houseplan-card-DlNVdCIc.js", "houseplan-assets/houseplan-card-h7CLgil-.js",
"houseplan-assets/zigbee-topology-CwVLuz6S.js", "houseplan-assets/zigbee-topology-BPCx22ZF.js",
"houseplan-assets/zigbee-topology-runtime-foMTa-yu.js" "houseplan-assets/zigbee-topology-runtime-PXmJ-UR0.js"
], ],
"dynamicImports": [] "dynamicImports": []
}, },
{ {
"path": "houseplan-assets/iso-scene-render-BLVbTyKE.js", "path": "houseplan-assets/iso-scene-render-BacpVxOg.js",
"sha256": "4660a76ce22af17fce7d858e98d71bcc8b8d97b80a85e7b96926a12299283d3d", "sha256": "6a86291c3c1399b13c0e9693bbe47be0f4f50113a8ec3f234fe25efa2cfe98b1",
"rawBytes": 35916, "rawBytes": 35885,
"gzipBytes": 12083, "gzipBytes": 12043,
"isEntry": false, "isEntry": false,
"imports": [ "imports": [
"houseplan-assets/houseplan-card-DlNVdCIc.js" "houseplan-assets/houseplan-card-h7CLgil-.js"
], ],
"dynamicImports": [] "dynamicImports": []
}, },
{ {
"path": "houseplan-assets/live-interaction-runtime-DIiVVHS_.js", "path": "houseplan-assets/live-interaction-runtime-CLqXDVvg.js",
"sha256": "a953a0bbe4ab2476395f4d0358c0c3d7c7ab4e19d2c49dc943f5302f35dae756", "sha256": "bd74a816bde6b4327ba1a2fb3da462b3d113028540d656c1caa7f8738a4d40ab",
"rawBytes": 5196, "rawBytes": 5196,
"gzipBytes": 2127, "gzipBytes": 2126,
"isEntry": false, "isEntry": false,
"imports": [ "imports": [
"houseplan-assets/houseplan-card-DlNVdCIc.js" "houseplan-assets/houseplan-card-h7CLgil-.js"
], ],
"dynamicImports": [] "dynamicImports": []
}, },
{ {
"path": "houseplan-assets/zigbee-topology-CwVLuz6S.js", "path": "houseplan-assets/zigbee-topology-BPCx22ZF.js",
"sha256": "db18356891ee72d824847aa55361ee43089ab5a22de436590576136344b90a22", "sha256": "32a5fef33e2255f51bdd928a999245a548a4c7a9d180bf700559235a8f2779fd",
"rawBytes": 18961, "rawBytes": 18961,
"gzipBytes": 7424, "gzipBytes": 7424,
"isEntry": false, "isEntry": false,
"imports": [ "imports": [
"houseplan-assets/houseplan-card-DlNVdCIc.js" "houseplan-assets/houseplan-card-h7CLgil-.js"
], ],
"dynamicImports": [] "dynamicImports": []
}, },
{ {
"path": "houseplan-assets/zigbee-topology-runtime-foMTa-yu.js", "path": "houseplan-assets/zigbee-topology-runtime-PXmJ-UR0.js",
"sha256": "f92eccdb7413e3c6c03ec80043ab40811643d9c7ba60c8c0ac0e62b55ecf1174", "sha256": "59e3eee3dcfea4b2e02bf54391ea9617777c9a52df6602951b7f25dbe3da9abb",
"rawBytes": 3941, "rawBytes": 3941,
"gzipBytes": 1764, "gzipBytes": 1763,
"isEntry": false, "isEntry": false,
"imports": [ "imports": [
"houseplan-assets/houseplan-card-DlNVdCIc.js", "houseplan-assets/houseplan-card-h7CLgil-.js",
"houseplan-assets/zigbee-topology-CwVLuz6S.js" "houseplan-assets/zigbee-topology-BPCx22ZF.js"
], ],
"dynamicImports": [] "dynamicImports": []
}, },
{ {
"path": "houseplan-card.js", "path": "houseplan-card.js",
"sha256": "f0e9bac231ea537556eab041e22de408ca82bd2f3bfb5bf064cb2b5b72cb16c8", "sha256": "8331dfd72f55bc93e145b767aa88fff0f99ef6a046d8bd48ee184b082550361f",
"rawBytes": 1183, "rawBytes": 1183,
"gzipBytes": 794, "gzipBytes": 795,
"isEntry": true, "isEntry": true,
"imports": [ "imports": [
"houseplan-assets/houseplan-card-DlNVdCIc.js" "houseplan-assets/houseplan-card-h7CLgil-.js"
], ],
"dynamicImports": [] "dynamicImports": []
} }
File diff suppressed because one or more lines are too long
@@ -1,14 +1,14 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="bb91e548ad4161d1eec31d88569f3a77e47865846e524dd99d718a3ecd348caa";import{v as e,l as o,z as t,dJ as s,A as a,dK as i,dL as l,dM as n,E as r,c}from"./houseplan-card-DlNVdCIc.js";class h extends e{constructor(){super(...arguments),this._spaces=null,this._spacesLoading=!1,this._spacesAuthoritative=!1}setConfig(e){this._config=e}async _loadSpaces(){if(!this._spaces&&!this._spacesLoading&&this.hass){this._spacesLoading=!0;try{const e=await this.hass.callWS({type:"houseplan/config/get"});this._spaces=(e?.config?.spaces||[]).map(e=>({value:e.id,label:e.title||e.id})),this._spacesAuthoritative=!0}catch{this._spaces=[],this._spacesAuthoritative=!1}finally{this._spacesLoading=!1}}}get _lang(){return o(this.hass,this._config?.language)}get _floorToken(){const e=this._config?.floor;return"number"==typeof e?`__houseplan_yaml_floor_index__:${String(e)}`:null}get _formData(){const e={...this._config},o=this._floorToken;return o?e.floor=o:Object.prototype.hasOwnProperty.call(e,"floor")||(e.floor=""),e}get _schema(){const e=this._spaces||[],o=this._lang,a=[{value:"",label:t(o,"editor.floor_none")}],i=this._floorToken;i&&a.push({value:i,label:t(o,"editor.floor_index",{index:String(this._config?.floor)})});const l="string"==typeof this._config?.floor?this._config.floor:"";l&&!e.some(e=>e.value===l)&&a.push({value:l,label:l}),a.push(...e);const n="string"==typeof this._config?.default_floor?this._config.default_floor:"",r=[...e];return n&&!e.some(e=>e.value===n)&&r.unshift({value:n,label:n}),[{name:"title",selector:{text:{}}},{name:"floor",selector:{select:{mode:"dropdown",options:a}}},e.length?{name:"default_floor",selector:{select:{mode:"dropdown",options:r}}}:{name:"default_floor",selector:{text:{}}},{name:"language",selector:{select:{mode:"dropdown",options:s(t(o,"editor.lang_auto"),this._config?.language)}}},{name:"icon_size",selector:{number:{min:1,max:6,step:.1,mode:"box"}}},{name:"show_temperature",selector:{boolean:{}}},{name:"live_states",selector:{boolean:{}}},{name:"show_signal",selector:{boolean:{}}},{name:"kiosk",selector:{boolean:{}}},{name:"cycle",selector:{number:{min:0,max:3600,step:5,mode:"box"}}}]}render(){if(!this.hass||!this._config)return a;const e=i(this,l,o(this.hass,this._config.language));if("cold"===e)return n();if("warm"===e)return r;this._loadSpaces();const s=this._lang,h={title:t(s,"editor.title"),floor:t(s,"editor.floor"),default_floor:t(s,"editor.default_floor"),language:t(s,"editor.language"),icon_size:t(s,"editor.icon_size"),show_temperature:t(s,"editor.show_temperature"),live_states:t(s,"editor.live_states"),show_signal:t(s,"editor.show_signal"),kiosk:t(s,"editor.kiosk"),cycle:t(s,"editor.cycle")},_=this._schema,f=function(e,o,t){if(!t||null===o)return null;const s="string"==typeof e?.default_floor?e.default_floor:"";return!s||o.some(e=>e.value===s)?null:s}(this._config,this._spaces,this._spacesAuthoritative),d=e=>c`<ha-form globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="ee07f194e535fbbe6bcab60998a32b7bd32025914663740939ae9f7942b5cd0d";import{v as e,l as o,z as t,dK as s,A as a,dL as i,dM as l,dN as n,E as r,c}from"./houseplan-card-h7CLgil-.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} .hass=${this.hass}
.data=${this._formData} .data=${this._formData}
.schema=${e} .schema=${e}
.computeLabel=${e=>h[e.name]||e.name} .computeLabel=${e=>h[e.name]||e.name}
@value-changed=${this._valueChanged} @value-changed=${this._valueChanged}
></ha-form>`;return c` ></ha-form>`;return c`
${d(_.slice(0,3))} ${d(f.slice(0,3))}
${f?c`<div class="default-floor-error" role="alert" ${_?c`<div class="default-floor-error" role="alert"
style="color:var(--error-color,#db4437);margin:-4px 0 12px;overflow-wrap:anywhere"> style="color:var(--error-color,#db4437);margin:-4px 0 12px;overflow-wrap:anywhere">
${t(s,"editor.default_floor_missing",{id:f})} ${t(s,"editor.default_floor_missing",{id:_})}
</div>`:a} </div>`:a}
${d(_.slice(3))} ${d(f.slice(3))}
`}_valueChanged(e){const o={...this._config,...e.detail.value};""===o.floor?delete o.floor:o.floor===this._floorToken&&(o.floor=this._config?.floor);const t=new Event("config-changed",{bubbles:!0,composed:!0});t.detail={config:o},this.dispatchEvent(t)}}h.properties={hass:{attribute:!1},_config:{state:!0},_spaces:{state:!0}},customElements.get("houseplan-card-editor")||customElements.define("houseplan-card-editor",h); `}_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 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="bb91e548ad4161d1eec31d88569f3a77e47865846e524dd99d718a3ecd348caa";import{n as t,b as n}from"./zigbee-topology-CwVLuz6S.js";import{I as e}from"./houseplan-card-DlNVdCIc.js";const o=new WeakMap;function i(t){const n=function(t){const n=t?.connection||t;return!n||"object"!=typeof n&&"function"!=typeof n?null:n}(t);if(!n)return null;let e=o.get(n);return e||(e={revision:0,topologies:[],states:{},listeners:new Set,inflight:new Map},o.set(n,e)),e}function r(t,n,e){t.states={...t.states,[n]:e},function(t){t.revision++;for(const n of t.listeners)n()}(t)}function s(t){const n=t?.code;if("permission"===n||"unsupported"===n||"timeout"===n||"invalid_topic"===n||"invalid_payload"===n)return n;const e=String(t?.message||"").toLowerCase();return e.includes("unauthor")||e.includes("permission")?"permission":e.includes("unknown_command")||e.includes("not found")?"unsupported":"provider"}function a(t){return Object.assign(new Error(t),{code:t})}function c(t,n,e){const o=t.inflight.get(n);if(o)return o;r(t,n,{phase:"loading"});const i=e().then(n=>{if(!n.nodes.length&&n.warnings.some(t=>"invalid_payload"===t.code))throw a("invalid_payload");!function(t,n){t.topologies=[...t.topologies.filter(t=>!(t.provider===n.provider&&t.instanceId===n.instanceId)),n],r(t,"zha"===n.provider?"zha":`z2m:${n.instanceId}`,{phase:"ready",obtainedAt:n.obtainedAt,partial:n.warnings.length>0})}(t,n)}).catch(e=>{r(t,n,{phase:"error",error:s(e)})}).finally(()=>t.inflight.delete(n));return t.inflight.set(n,i),i}function l(t){const n=i(t);return n?{revision:n.revision,topologies:n.topologies,states:n.states}:{revision:0,topologies:[],states:{}}}function u(t,n){const e=i(t);return e?(e.listeners.add(n),()=>e.listeners.delete(n)):()=>{}}function p(t){if(!0!==t?.user?.is_admin)throw a("permission")}function f(n){const e=i(n);return e?c(e,"zha",async()=>{if(p(n),"function"!=typeof n?.callWS)throw a("unsupported");return t(await n.callWS({type:"zha/devices"}))}):Promise.resolve()}function d(t){return null!==t&&"object"==typeof t?t:null}function h(t){const n=d(t),e=n?.payload??t;if("string"!=typeof e)return e;try{return JSON.parse(e)}catch{return null}}async function 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(p(t),!l)throw a("invalid_topic");const e=t.connection,o=e?.subscribeMessage;if("function"!=typeof o||"function"!=typeof t?.callService)throw a("unsupported");const i=function(){const t=globalThis.crypto;return"function"==typeof t?.randomUUID?`houseplan-${t.randomUUID()}`:`houseplan-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}(),s=Date.now()+Math.max(1,r);let c=!1,u=null,f=null,g=null;const y=new Promise(t=>{u=t}),w=new Promise((t,n)=>{f=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 p=await o.call(e,t=>{if(!0===d(t)?.retain)return;const n=h(t);null!==n?n&&function(t){const n=d(t),e=n?.transaction??d(n?.data)?.transaction;return"string"==typeof e||"number"==typeof e?String(e):null}(n)===i&&f?.(n):c&&g?.(a("invalid_payload"))},{type:"mqtt/subscribe",topic:`${l}/bridge/response/networkmap`});"function"==typeof p&&b.push(p),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{f as readZhaTopology,g as refreshZ2mTopology,u as subscribeZigbeeTopology,l as zigbeeTopologyRuntimeSnapshot}; globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="ee07f194e535fbbe6bcab60998a32b7bd32025914663740939ae9f7942b5cd0d";import{n as t,b as n}from"./zigbee-topology-BPCx22ZF.js";import{I as e}from"./houseplan-card-h7CLgil-.js";const o=new WeakMap;function i(t){const n=function(t){const n=t?.connection||t;return!n||"object"!=typeof n&&"function"!=typeof n?null:n}(t);if(!n)return null;let e=o.get(n);return e||(e={revision:0,topologies:[],states:{},listeners:new Set,inflight:new Map},o.set(n,e)),e}function r(t,n,e){t.states={...t.states,[n]:e},function(t){t.revision++;for(const n of t.listeners)n()}(t)}function s(t){const n=t?.code;if("permission"===n||"unsupported"===n||"timeout"===n||"invalid_topic"===n||"invalid_payload"===n)return n;const e=String(t?.message||"").toLowerCase();return e.includes("unauthor")||e.includes("permission")?"permission":e.includes("unknown_command")||e.includes("not found")?"unsupported":"provider"}function a(t){return Object.assign(new Error(t),{code:t})}function c(t,n,e){const o=t.inflight.get(n);if(o)return o;r(t,n,{phase:"loading"});const i=e().then(n=>{if(!n.nodes.length&&n.warnings.some(t=>"invalid_payload"===t.code))throw a("invalid_payload");!function(t,n){t.topologies=[...t.topologies.filter(t=>!(t.provider===n.provider&&t.instanceId===n.instanceId)),n],r(t,"zha"===n.provider?"zha":`z2m:${n.instanceId}`,{phase:"ready",obtainedAt:n.obtainedAt,partial:n.warnings.length>0})}(t,n)}).catch(e=>{r(t,n,{phase:"error",error:s(e)})}).finally(()=>t.inflight.delete(n));return t.inflight.set(n,i),i}function l(t){const n=i(t);return n?{revision:n.revision,topologies:n.topologies,states:n.states}:{revision:0,topologies:[],states:{}}}function u(t,n){const e=i(t);return e?(e.listeners.add(n),()=>e.listeners.delete(n)):()=>{}}function p(t){if(!0!==t?.user?.is_admin)throw a("permission")}function f(n){const e=i(n);return e?c(e,"zha",async()=>{if(p(n),"function"!=typeof n?.callWS)throw a("unsupported");return t(await n.callWS({type:"zha/devices"}))}):Promise.resolve()}function d(t){return null!==t&&"object"==typeof t?t:null}function h(t){const n=d(t),e=n?.payload??t;if("string"!=typeof e)return e;try{return JSON.parse(e)}catch{return null}}async function 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(p(t),!l)throw a("invalid_topic");const e=t.connection,o=e?.subscribeMessage;if("function"!=typeof o||"function"!=typeof t?.callService)throw a("unsupported");const i=function(){const t=globalThis.crypto;return"function"==typeof t?.randomUUID?`houseplan-${t.randomUUID()}`:`houseplan-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}(),s=Date.now()+Math.max(1,r);let c=!1,u=null,f=null,g=null;const y=new Promise(t=>{u=t}),w=new Promise((t,n)=>{f=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 p=await o.call(e,t=>{if(!0===d(t)?.retain)return;const n=h(t);null!==n?n&&function(t){const n=d(t),e=n?.transaction??d(n?.data)?.transaction;return"string"==typeof e||"number"==typeof e?String(e):null}(n)===i&&f?.(n):c&&g?.(a("invalid_payload"))},{type:"mqtt/subscribe",topic:`${l}/bridge/response/networkmap`});"function"==typeof p&&b.push(p),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{f as readZhaTopology,g as refreshZ2mTopology,u as subscribeZigbeeTopology,l as zigbeeTopologyRuntimeSnapshot};
@@ -1 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="bb91e548ad4161d1eec31d88569f3a77e47865846e524dd99d718a3ecd348caa";try{await import("./houseplan-assets/houseplan-card-DlNVdCIc.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 entry: the main chunk is unavailable",e)} globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="ee07f194e535fbbe6bcab60998a32b7bd32025914663740939ae9f7942b5cd0d";try{await import("./houseplan-assets/houseplan-card-h7CLgil-.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 entry: the main chunk is unavailable",e)}
+92 -92
View File
@@ -1,199 +1,199 @@
{ {
"schema": 1, "schema": 1,
"fingerprint": "bb91e548ad4161d1eec31d88569f3a77e47865846e524dd99d718a3ecd348caa", "fingerprint": "ee07f194e535fbbe6bcab60998a32b7bd32025914663740939ae9f7942b5cd0d",
"entry": "houseplan-card.js", "entry": "houseplan-card.js",
"initialViewFiles": [ "initialViewFiles": [
"houseplan-assets/houseplan-card-DlNVdCIc.js", "houseplan-assets/houseplan-card-h7CLgil-.js",
"houseplan-card.js" "houseplan-card.js"
], ],
"initialViewGzipBytes": 299464, "initialViewGzipBytes": 299495,
"lazyFiles": [ "lazyFiles": [
"houseplan-assets/backdrop-pick-z06DVBiX.js", "houseplan-assets/backdrop-pick-BdNxo7sy.js",
"houseplan-assets/de-B9k4OTKD.js", "houseplan-assets/de-9rJdVNqo.js",
"houseplan-assets/editor-CpADL-Po.js", "houseplan-assets/editor-B9JBe9YT.js",
"houseplan-assets/fr-D2aMxrYb.js", "houseplan-assets/fr-B1YMVVHy.js",
"houseplan-assets/houseplan-editor-runtime-B8MzWgfl.js", "houseplan-assets/houseplan-editor-runtime-BQxfLmCJ.js",
"houseplan-assets/houseplan-onboarding-runtime-CQWdVdoD.js", "houseplan-assets/houseplan-onboarding-runtime-BkPkAgsT.js",
"houseplan-assets/hp-zigbee-topology-overlay-BxvD87oe.js", "houseplan-assets/hp-zigbee-topology-overlay-BJvwogZl.js",
"houseplan-assets/iso-scene-render-BLVbTyKE.js", "houseplan-assets/iso-scene-render-BacpVxOg.js",
"houseplan-assets/live-interaction-runtime-DIiVVHS_.js", "houseplan-assets/live-interaction-runtime-CLqXDVvg.js",
"houseplan-assets/zigbee-topology-CwVLuz6S.js", "houseplan-assets/zigbee-topology-BPCx22ZF.js",
"houseplan-assets/zigbee-topology-runtime-foMTa-yu.js" "houseplan-assets/zigbee-topology-runtime-PXmJ-UR0.js"
], ],
"lazyGzipBytes": 263446, "lazyGzipBytes": 263411,
"lazyEditorFiles": [ "lazyEditorFiles": [
"houseplan-assets/backdrop-pick-z06DVBiX.js", "houseplan-assets/backdrop-pick-BdNxo7sy.js",
"houseplan-assets/editor-CpADL-Po.js", "houseplan-assets/editor-B9JBe9YT.js",
"houseplan-assets/houseplan-editor-runtime-B8MzWgfl.js", "houseplan-assets/houseplan-editor-runtime-BQxfLmCJ.js",
"houseplan-assets/zigbee-topology-CwVLuz6S.js" "houseplan-assets/zigbee-topology-BPCx22ZF.js"
], ],
"lazyEditorGzipBytes": 186624, "lazyEditorGzipBytes": 186628,
"lazyOnboardingFiles": [ "lazyOnboardingFiles": [
"houseplan-assets/backdrop-pick-z06DVBiX.js", "houseplan-assets/backdrop-pick-BdNxo7sy.js",
"houseplan-assets/houseplan-onboarding-runtime-CQWdVdoD.js" "houseplan-assets/houseplan-onboarding-runtime-BkPkAgsT.js"
], ],
"lazyOnboardingGzipBytes": 14324, "lazyOnboardingGzipBytes": 14321,
"lazyLocaleFiles": [ "lazyLocaleFiles": [
"houseplan-assets/de-B9k4OTKD.js", "houseplan-assets/de-9rJdVNqo.js",
"houseplan-assets/fr-D2aMxrYb.js" "houseplan-assets/fr-B1YMVVHy.js"
], ],
"lazyLocaleGzipBytes": 50146, "lazyLocaleGzipBytes": 50152,
"lazyIsometricFiles": [ "lazyIsometricFiles": [
"houseplan-assets/iso-scene-render-BLVbTyKE.js" "houseplan-assets/iso-scene-render-BacpVxOg.js"
], ],
"lazyIsometricGzipBytes": 12083, "lazyIsometricGzipBytes": 12043,
"files": [ "files": [
{ {
"path": "houseplan-assets/backdrop-pick-z06DVBiX.js", "path": "houseplan-assets/backdrop-pick-BdNxo7sy.js",
"sha256": "75e6d7af19c3aba5060dfa8c5f6dc06beaab66a27c417a0de527c5b942dbfbc9", "sha256": "85e78b3b7e19b6fbc9cd7f5f9eeabf60c143e8d84361ce4ae51dcf39eed34ca1",
"rawBytes": 21592, "rawBytes": 21592,
"gzipBytes": 7355, "gzipBytes": 7356,
"isEntry": false, "isEntry": false,
"imports": [ "imports": [
"houseplan-assets/houseplan-card-DlNVdCIc.js" "houseplan-assets/houseplan-card-h7CLgil-.js"
], ],
"dynamicImports": [] "dynamicImports": []
}, },
{ {
"path": "houseplan-assets/de-B9k4OTKD.js", "path": "houseplan-assets/de-9rJdVNqo.js",
"sha256": "4ada0cf6cf1f71ff8f5dc9053fe9e70dc3b74a7a87df63c8c833d2dd5053a650", "sha256": "bc7a8a69292c1cbf12d063ac1c92569660679446dad3b08d783a42a3ecf0fea2",
"rawBytes": 84232, "rawBytes": 84232,
"gzipBytes": 25350, "gzipBytes": 25353,
"isEntry": false, "isEntry": false,
"imports": [], "imports": [],
"dynamicImports": [] "dynamicImports": []
}, },
{ {
"path": "houseplan-assets/editor-CpADL-Po.js", "path": "houseplan-assets/editor-B9JBe9YT.js",
"sha256": "d30ad5dcfbf0c604332774e7ff8213b061c214e0dab24d6752062e76dc8e3eed", "sha256": "dc1d6039050ae2135e3608e118a19065a827024e26a3f32363afa5db40f7e7ed",
"rawBytes": 3831, "rawBytes": 3831,
"gzipBytes": 1585, "gzipBytes": 1584,
"isEntry": false, "isEntry": false,
"imports": [ "imports": [
"houseplan-assets/houseplan-card-DlNVdCIc.js" "houseplan-assets/houseplan-card-h7CLgil-.js"
], ],
"dynamicImports": [] "dynamicImports": []
}, },
{ {
"path": "houseplan-assets/fr-D2aMxrYb.js", "path": "houseplan-assets/fr-B1YMVVHy.js",
"sha256": "a74ec4c4934908ebe04a01a26626770e17ae169a7b60eeadf5b5f4ff5e78b36c", "sha256": "af1be2253d149fb4888961067211a6f77ff5d05f44bdb9dfd75f1b710962a1d8",
"rawBytes": 86273, "rawBytes": 86273,
"gzipBytes": 24796, "gzipBytes": 24799,
"isEntry": false, "isEntry": false,
"imports": [], "imports": [],
"dynamicImports": [] "dynamicImports": []
}, },
{ {
"path": "houseplan-assets/houseplan-card-DlNVdCIc.js", "path": "houseplan-assets/houseplan-card-h7CLgil-.js",
"sha256": "4b15c9335ec994b8182f1d491090fdbafe5c8f1d16ccb13db9cda5e439346050", "sha256": "2d088763554fb5194378ef7a615b1b4022a6e9eaf7c7adb6a8e2c0b32b6073a5",
"rawBytes": 1071991, "rawBytes": 1072052,
"gzipBytes": 298670, "gzipBytes": 298700,
"isEntry": false, "isEntry": false,
"imports": [], "imports": [],
"dynamicImports": [ "dynamicImports": [
"houseplan-assets/de-B9k4OTKD.js", "houseplan-assets/de-9rJdVNqo.js",
"houseplan-assets/editor-CpADL-Po.js", "houseplan-assets/editor-B9JBe9YT.js",
"houseplan-assets/fr-D2aMxrYb.js", "houseplan-assets/fr-B1YMVVHy.js",
"houseplan-assets/houseplan-editor-runtime-B8MzWgfl.js", "houseplan-assets/houseplan-editor-runtime-BQxfLmCJ.js",
"houseplan-assets/houseplan-onboarding-runtime-CQWdVdoD.js", "houseplan-assets/houseplan-onboarding-runtime-BkPkAgsT.js",
"houseplan-assets/hp-zigbee-topology-overlay-BxvD87oe.js", "houseplan-assets/hp-zigbee-topology-overlay-BJvwogZl.js",
"houseplan-assets/iso-scene-render-BLVbTyKE.js", "houseplan-assets/iso-scene-render-BacpVxOg.js",
"houseplan-assets/live-interaction-runtime-DIiVVHS_.js" "houseplan-assets/live-interaction-runtime-CLqXDVvg.js"
] ]
}, },
{ {
"path": "houseplan-assets/houseplan-editor-runtime-B8MzWgfl.js", "path": "houseplan-assets/houseplan-editor-runtime-BQxfLmCJ.js",
"sha256": "06aa1e075def4eb03262e4ad308a96b500c0a73c59cf7641f9f5a3fa618cb41f", "sha256": "969d84a3adeb14e3f1b5ca1c1cd9dd6c0e173dba9a20577c2585eab65ac520d3",
"rawBytes": 639580, "rawBytes": 639580,
"gzipBytes": 170260, "gzipBytes": 170264,
"isEntry": false, "isEntry": false,
"imports": [ "imports": [
"houseplan-assets/backdrop-pick-z06DVBiX.js", "houseplan-assets/backdrop-pick-BdNxo7sy.js",
"houseplan-assets/houseplan-card-DlNVdCIc.js", "houseplan-assets/houseplan-card-h7CLgil-.js",
"houseplan-assets/zigbee-topology-CwVLuz6S.js" "houseplan-assets/zigbee-topology-BPCx22ZF.js"
], ],
"dynamicImports": [ "dynamicImports": [
"houseplan-assets/zigbee-topology-runtime-foMTa-yu.js" "houseplan-assets/zigbee-topology-runtime-PXmJ-UR0.js"
] ]
}, },
{ {
"path": "houseplan-assets/houseplan-onboarding-runtime-CQWdVdoD.js", "path": "houseplan-assets/houseplan-onboarding-runtime-BkPkAgsT.js",
"sha256": "fdac5dd01af4bc78089208ac7acf671a76aa05d21f1f5e1db90429bfcb3965d9", "sha256": "f6da0d6184406def22e1e7e2e0aad25e60499f04a326deafc835d109c79b4c92",
"rawBytes": 28071, "rawBytes": 28071,
"gzipBytes": 6969, "gzipBytes": 6965,
"isEntry": false, "isEntry": false,
"imports": [ "imports": [
"houseplan-assets/backdrop-pick-z06DVBiX.js", "houseplan-assets/backdrop-pick-BdNxo7sy.js",
"houseplan-assets/houseplan-card-DlNVdCIc.js" "houseplan-assets/houseplan-card-h7CLgil-.js"
], ],
"dynamicImports": [] "dynamicImports": []
}, },
{ {
"path": "houseplan-assets/hp-zigbee-topology-overlay-BxvD87oe.js", "path": "houseplan-assets/hp-zigbee-topology-overlay-BJvwogZl.js",
"sha256": "d5b48f961b1e6b208bb2b1dd1343e62fabc7455f77dbb40fffc569dc540a1be7", "sha256": "5ea4c8d30c1b21395080ae3cd12311a2daad0c4cd263ed00da805ab67da3a3c9",
"rawBytes": 11034, "rawBytes": 11034,
"gzipBytes": 3733, "gzipBytes": 3734,
"isEntry": false, "isEntry": false,
"imports": [ "imports": [
"houseplan-assets/houseplan-card-DlNVdCIc.js", "houseplan-assets/houseplan-card-h7CLgil-.js",
"houseplan-assets/zigbee-topology-CwVLuz6S.js", "houseplan-assets/zigbee-topology-BPCx22ZF.js",
"houseplan-assets/zigbee-topology-runtime-foMTa-yu.js" "houseplan-assets/zigbee-topology-runtime-PXmJ-UR0.js"
], ],
"dynamicImports": [] "dynamicImports": []
}, },
{ {
"path": "houseplan-assets/iso-scene-render-BLVbTyKE.js", "path": "houseplan-assets/iso-scene-render-BacpVxOg.js",
"sha256": "4660a76ce22af17fce7d858e98d71bcc8b8d97b80a85e7b96926a12299283d3d", "sha256": "6a86291c3c1399b13c0e9693bbe47be0f4f50113a8ec3f234fe25efa2cfe98b1",
"rawBytes": 35916, "rawBytes": 35885,
"gzipBytes": 12083, "gzipBytes": 12043,
"isEntry": false, "isEntry": false,
"imports": [ "imports": [
"houseplan-assets/houseplan-card-DlNVdCIc.js" "houseplan-assets/houseplan-card-h7CLgil-.js"
], ],
"dynamicImports": [] "dynamicImports": []
}, },
{ {
"path": "houseplan-assets/live-interaction-runtime-DIiVVHS_.js", "path": "houseplan-assets/live-interaction-runtime-CLqXDVvg.js",
"sha256": "a953a0bbe4ab2476395f4d0358c0c3d7c7ab4e19d2c49dc943f5302f35dae756", "sha256": "bd74a816bde6b4327ba1a2fb3da462b3d113028540d656c1caa7f8738a4d40ab",
"rawBytes": 5196, "rawBytes": 5196,
"gzipBytes": 2127, "gzipBytes": 2126,
"isEntry": false, "isEntry": false,
"imports": [ "imports": [
"houseplan-assets/houseplan-card-DlNVdCIc.js" "houseplan-assets/houseplan-card-h7CLgil-.js"
], ],
"dynamicImports": [] "dynamicImports": []
}, },
{ {
"path": "houseplan-assets/zigbee-topology-CwVLuz6S.js", "path": "houseplan-assets/zigbee-topology-BPCx22ZF.js",
"sha256": "db18356891ee72d824847aa55361ee43089ab5a22de436590576136344b90a22", "sha256": "32a5fef33e2255f51bdd928a999245a548a4c7a9d180bf700559235a8f2779fd",
"rawBytes": 18961, "rawBytes": 18961,
"gzipBytes": 7424, "gzipBytes": 7424,
"isEntry": false, "isEntry": false,
"imports": [ "imports": [
"houseplan-assets/houseplan-card-DlNVdCIc.js" "houseplan-assets/houseplan-card-h7CLgil-.js"
], ],
"dynamicImports": [] "dynamicImports": []
}, },
{ {
"path": "houseplan-assets/zigbee-topology-runtime-foMTa-yu.js", "path": "houseplan-assets/zigbee-topology-runtime-PXmJ-UR0.js",
"sha256": "f92eccdb7413e3c6c03ec80043ab40811643d9c7ba60c8c0ac0e62b55ecf1174", "sha256": "59e3eee3dcfea4b2e02bf54391ea9617777c9a52df6602951b7f25dbe3da9abb",
"rawBytes": 3941, "rawBytes": 3941,
"gzipBytes": 1764, "gzipBytes": 1763,
"isEntry": false, "isEntry": false,
"imports": [ "imports": [
"houseplan-assets/houseplan-card-DlNVdCIc.js", "houseplan-assets/houseplan-card-h7CLgil-.js",
"houseplan-assets/zigbee-topology-CwVLuz6S.js" "houseplan-assets/zigbee-topology-BPCx22ZF.js"
], ],
"dynamicImports": [] "dynamicImports": []
}, },
{ {
"path": "houseplan-card.js", "path": "houseplan-card.js",
"sha256": "f0e9bac231ea537556eab041e22de408ca82bd2f3bfb5bf064cb2b5b72cb16c8", "sha256": "8331dfd72f55bc93e145b767aa88fff0f99ef6a046d8bd48ee184b082550361f",
"rawBytes": 1183, "rawBytes": 1183,
"gzipBytes": 794, "gzipBytes": 795,
"isEntry": true, "isEntry": true,
"imports": [ "imports": [
"houseplan-assets/houseplan-card-DlNVdCIc.js" "houseplan-assets/houseplan-card-h7CLgil-.js"
], ],
"dynamicImports": [] "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__="bb91e548ad4161d1eec31d88569f3a77e47865846e524dd99d718a3ecd348caa";import{v as e,l as o,z as t,dJ as s,A as a,dK as i,dL as l,dM as n,E as r,c}from"./houseplan-card-DlNVdCIc.js";class h extends e{constructor(){super(...arguments),this._spaces=null,this._spacesLoading=!1,this._spacesAuthoritative=!1}setConfig(e){this._config=e}async _loadSpaces(){if(!this._spaces&&!this._spacesLoading&&this.hass){this._spacesLoading=!0;try{const e=await this.hass.callWS({type:"houseplan/config/get"});this._spaces=(e?.config?.spaces||[]).map(e=>({value:e.id,label:e.title||e.id})),this._spacesAuthoritative=!0}catch{this._spaces=[],this._spacesAuthoritative=!1}finally{this._spacesLoading=!1}}}get _lang(){return o(this.hass,this._config?.language)}get _floorToken(){const e=this._config?.floor;return"number"==typeof e?`__houseplan_yaml_floor_index__:${String(e)}`:null}get _formData(){const e={...this._config},o=this._floorToken;return o?e.floor=o:Object.prototype.hasOwnProperty.call(e,"floor")||(e.floor=""),e}get _schema(){const e=this._spaces||[],o=this._lang,a=[{value:"",label:t(o,"editor.floor_none")}],i=this._floorToken;i&&a.push({value:i,label:t(o,"editor.floor_index",{index:String(this._config?.floor)})});const l="string"==typeof this._config?.floor?this._config.floor:"";l&&!e.some(e=>e.value===l)&&a.push({value:l,label:l}),a.push(...e);const n="string"==typeof this._config?.default_floor?this._config.default_floor:"",r=[...e];return n&&!e.some(e=>e.value===n)&&r.unshift({value:n,label:n}),[{name:"title",selector:{text:{}}},{name:"floor",selector:{select:{mode:"dropdown",options:a}}},e.length?{name:"default_floor",selector:{select:{mode:"dropdown",options:r}}}:{name:"default_floor",selector:{text:{}}},{name:"language",selector:{select:{mode:"dropdown",options:s(t(o,"editor.lang_auto"),this._config?.language)}}},{name:"icon_size",selector:{number:{min:1,max:6,step:.1,mode:"box"}}},{name:"show_temperature",selector:{boolean:{}}},{name:"live_states",selector:{boolean:{}}},{name:"show_signal",selector:{boolean:{}}},{name:"kiosk",selector:{boolean:{}}},{name:"cycle",selector:{number:{min:0,max:3600,step:5,mode:"box"}}}]}render(){if(!this.hass||!this._config)return a;const e=i(this,l,o(this.hass,this._config.language));if("cold"===e)return n();if("warm"===e)return r;this._loadSpaces();const s=this._lang,h={title:t(s,"editor.title"),floor:t(s,"editor.floor"),default_floor:t(s,"editor.default_floor"),language:t(s,"editor.language"),icon_size:t(s,"editor.icon_size"),show_temperature:t(s,"editor.show_temperature"),live_states:t(s,"editor.live_states"),show_signal:t(s,"editor.show_signal"),kiosk:t(s,"editor.kiosk"),cycle:t(s,"editor.cycle")},_=this._schema,f=function(e,o,t){if(!t||null===o)return null;const s="string"==typeof e?.default_floor?e.default_floor:"";return!s||o.some(e=>e.value===s)?null:s}(this._config,this._spaces,this._spacesAuthoritative),d=e=>c`<ha-form globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="ee07f194e535fbbe6bcab60998a32b7bd32025914663740939ae9f7942b5cd0d";import{v as e,l as o,z as t,dK as s,A as a,dL as i,dM as l,dN as n,E as r,c}from"./houseplan-card-h7CLgil-.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} .hass=${this.hass}
.data=${this._formData} .data=${this._formData}
.schema=${e} .schema=${e}
.computeLabel=${e=>h[e.name]||e.name} .computeLabel=${e=>h[e.name]||e.name}
@value-changed=${this._valueChanged} @value-changed=${this._valueChanged}
></ha-form>`;return c` ></ha-form>`;return c`
${d(_.slice(0,3))} ${d(f.slice(0,3))}
${f?c`<div class="default-floor-error" role="alert" ${_?c`<div class="default-floor-error" role="alert"
style="color:var(--error-color,#db4437);margin:-4px 0 12px;overflow-wrap:anywhere"> style="color:var(--error-color,#db4437);margin:-4px 0 12px;overflow-wrap:anywhere">
${t(s,"editor.default_floor_missing",{id:f})} ${t(s,"editor.default_floor_missing",{id:_})}
</div>`:a} </div>`:a}
${d(_.slice(3))} ${d(f.slice(3))}
`}_valueChanged(e){const o={...this._config,...e.detail.value};""===o.floor?delete o.floor:o.floor===this._floorToken&&(o.floor=this._config?.floor);const t=new Event("config-changed",{bubbles:!0,composed:!0});t.detail={config:o},this.dispatchEvent(t)}}h.properties={hass:{attribute:!1},_config:{state:!0},_spaces:{state:!0}},customElements.get("houseplan-card-editor")||customElements.define("houseplan-card-editor",h); `}_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
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 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="bb91e548ad4161d1eec31d88569f3a77e47865846e524dd99d718a3ecd348caa";import{n as t,b as n}from"./zigbee-topology-CwVLuz6S.js";import{I as e}from"./houseplan-card-DlNVdCIc.js";const o=new WeakMap;function i(t){const n=function(t){const n=t?.connection||t;return!n||"object"!=typeof n&&"function"!=typeof n?null:n}(t);if(!n)return null;let e=o.get(n);return e||(e={revision:0,topologies:[],states:{},listeners:new Set,inflight:new Map},o.set(n,e)),e}function r(t,n,e){t.states={...t.states,[n]:e},function(t){t.revision++;for(const n of t.listeners)n()}(t)}function s(t){const n=t?.code;if("permission"===n||"unsupported"===n||"timeout"===n||"invalid_topic"===n||"invalid_payload"===n)return n;const e=String(t?.message||"").toLowerCase();return e.includes("unauthor")||e.includes("permission")?"permission":e.includes("unknown_command")||e.includes("not found")?"unsupported":"provider"}function a(t){return Object.assign(new Error(t),{code:t})}function c(t,n,e){const o=t.inflight.get(n);if(o)return o;r(t,n,{phase:"loading"});const i=e().then(n=>{if(!n.nodes.length&&n.warnings.some(t=>"invalid_payload"===t.code))throw a("invalid_payload");!function(t,n){t.topologies=[...t.topologies.filter(t=>!(t.provider===n.provider&&t.instanceId===n.instanceId)),n],r(t,"zha"===n.provider?"zha":`z2m:${n.instanceId}`,{phase:"ready",obtainedAt:n.obtainedAt,partial:n.warnings.length>0})}(t,n)}).catch(e=>{r(t,n,{phase:"error",error:s(e)})}).finally(()=>t.inflight.delete(n));return t.inflight.set(n,i),i}function l(t){const n=i(t);return n?{revision:n.revision,topologies:n.topologies,states:n.states}:{revision:0,topologies:[],states:{}}}function u(t,n){const e=i(t);return e?(e.listeners.add(n),()=>e.listeners.delete(n)):()=>{}}function p(t){if(!0!==t?.user?.is_admin)throw a("permission")}function f(n){const e=i(n);return e?c(e,"zha",async()=>{if(p(n),"function"!=typeof n?.callWS)throw a("unsupported");return t(await n.callWS({type:"zha/devices"}))}):Promise.resolve()}function d(t){return null!==t&&"object"==typeof t?t:null}function h(t){const n=d(t),e=n?.payload??t;if("string"!=typeof e)return e;try{return JSON.parse(e)}catch{return null}}async function 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(p(t),!l)throw a("invalid_topic");const e=t.connection,o=e?.subscribeMessage;if("function"!=typeof o||"function"!=typeof t?.callService)throw a("unsupported");const i=function(){const t=globalThis.crypto;return"function"==typeof t?.randomUUID?`houseplan-${t.randomUUID()}`:`houseplan-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}(),s=Date.now()+Math.max(1,r);let c=!1,u=null,f=null,g=null;const y=new Promise(t=>{u=t}),w=new Promise((t,n)=>{f=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 p=await o.call(e,t=>{if(!0===d(t)?.retain)return;const n=h(t);null!==n?n&&function(t){const n=d(t),e=n?.transaction??d(n?.data)?.transaction;return"string"==typeof e||"number"==typeof e?String(e):null}(n)===i&&f?.(n):c&&g?.(a("invalid_payload"))},{type:"mqtt/subscribe",topic:`${l}/bridge/response/networkmap`});"function"==typeof p&&b.push(p),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{f as readZhaTopology,g as refreshZ2mTopology,u as subscribeZigbeeTopology,l as zigbeeTopologyRuntimeSnapshot}; globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="ee07f194e535fbbe6bcab60998a32b7bd32025914663740939ae9f7942b5cd0d";import{n as t,b as n}from"./zigbee-topology-BPCx22ZF.js";import{I as e}from"./houseplan-card-h7CLgil-.js";const o=new WeakMap;function i(t){const n=function(t){const n=t?.connection||t;return!n||"object"!=typeof n&&"function"!=typeof n?null:n}(t);if(!n)return null;let e=o.get(n);return e||(e={revision:0,topologies:[],states:{},listeners:new Set,inflight:new Map},o.set(n,e)),e}function r(t,n,e){t.states={...t.states,[n]:e},function(t){t.revision++;for(const n of t.listeners)n()}(t)}function s(t){const n=t?.code;if("permission"===n||"unsupported"===n||"timeout"===n||"invalid_topic"===n||"invalid_payload"===n)return n;const e=String(t?.message||"").toLowerCase();return e.includes("unauthor")||e.includes("permission")?"permission":e.includes("unknown_command")||e.includes("not found")?"unsupported":"provider"}function a(t){return Object.assign(new Error(t),{code:t})}function c(t,n,e){const o=t.inflight.get(n);if(o)return o;r(t,n,{phase:"loading"});const i=e().then(n=>{if(!n.nodes.length&&n.warnings.some(t=>"invalid_payload"===t.code))throw a("invalid_payload");!function(t,n){t.topologies=[...t.topologies.filter(t=>!(t.provider===n.provider&&t.instanceId===n.instanceId)),n],r(t,"zha"===n.provider?"zha":`z2m:${n.instanceId}`,{phase:"ready",obtainedAt:n.obtainedAt,partial:n.warnings.length>0})}(t,n)}).catch(e=>{r(t,n,{phase:"error",error:s(e)})}).finally(()=>t.inflight.delete(n));return t.inflight.set(n,i),i}function l(t){const n=i(t);return n?{revision:n.revision,topologies:n.topologies,states:n.states}:{revision:0,topologies:[],states:{}}}function u(t,n){const e=i(t);return e?(e.listeners.add(n),()=>e.listeners.delete(n)):()=>{}}function p(t){if(!0!==t?.user?.is_admin)throw a("permission")}function f(n){const e=i(n);return e?c(e,"zha",async()=>{if(p(n),"function"!=typeof n?.callWS)throw a("unsupported");return t(await n.callWS({type:"zha/devices"}))}):Promise.resolve()}function d(t){return null!==t&&"object"==typeof t?t:null}function h(t){const n=d(t),e=n?.payload??t;if("string"!=typeof e)return e;try{return JSON.parse(e)}catch{return null}}async function 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(p(t),!l)throw a("invalid_topic");const e=t.connection,o=e?.subscribeMessage;if("function"!=typeof o||"function"!=typeof t?.callService)throw a("unsupported");const i=function(){const t=globalThis.crypto;return"function"==typeof t?.randomUUID?`houseplan-${t.randomUUID()}`:`houseplan-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}(),s=Date.now()+Math.max(1,r);let c=!1,u=null,f=null,g=null;const y=new Promise(t=>{u=t}),w=new Promise((t,n)=>{f=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 p=await o.call(e,t=>{if(!0===d(t)?.retain)return;const n=h(t);null!==n?n&&function(t){const n=d(t),e=n?.transaction??d(n?.data)?.transaction;return"string"==typeof e||"number"==typeof e?String(e):null}(n)===i&&f?.(n):c&&g?.(a("invalid_payload"))},{type:"mqtt/subscribe",topic:`${l}/bridge/response/networkmap`});"function"==typeof p&&b.push(p),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{f as readZhaTopology,g as refreshZ2mTopology,u as subscribeZigbeeTopology,l as zigbeeTopologyRuntimeSnapshot};
+1 -1
View File
@@ -1 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="bb91e548ad4161d1eec31d88569f3a77e47865846e524dd99d718a3ecd348caa";try{await import("./houseplan-assets/houseplan-card-DlNVdCIc.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 entry: the main chunk is unavailable",e)} globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="ee07f194e535fbbe6bcab60998a32b7bd32025914663740939ae9f7942b5cd0d";try{await import("./houseplan-assets/houseplan-card-h7CLgil-.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 entry: the main chunk is unavailable",e)}
+2 -2
View File
@@ -142,8 +142,8 @@ export const LOW_HEADROOM_WARNING_BYTES = 15_000;
* 2026-09-05, #160: потолок опущен 301 000 → 300 000 без изменения общего * 2026-09-05, #160: потолок опущен 301 000 → 300 000 без изменения общего
* бюджета. Скрытый Stage 3 вынесен в отдельный alpha-runtime: обычный View * бюджета. Скрытый Stage 3 вынесен в отдельный alpha-runtime: обычный View
* больше не загружает renderer/overlay/opening graph. Измеренный initial факт * больше не загружает renderer/overlay/opening graph. Измеренный initial факт
* 299 464 Б оставляет 536 Б сверху и 1 464 Б до нижней границы полосы; * 299 495 Б оставляет 505 Б сверху и 1 495 Б до нижней границы полосы;
* lazy-isometric graph отдельно измеряется манифестом (12 083 Б gzip). * lazy-isometric graph отдельно измеряется манифестом (12 043 Б gzip).
*/ */
export const INITIAL_VIEW_GZIP_CEILING = 300_000; export const INITIAL_VIEW_GZIP_CEILING = 300_000;
export const INITIAL_VIEW_CEILING_BAND = 2_000; export const INITIAL_VIEW_CEILING_BAND = 2_000;
+11 -13
View File
@@ -378,6 +378,7 @@ import {
openingVisibleMetrics, renderOpeningVisibleGeometry, openingVisibleMetrics, renderOpeningVisibleGeometry,
type OpeningFaceOffset, type OpeningVisibleSpec, type OpeningFaceOffset, type OpeningVisibleSpec,
} from './render/opening-symbol'; } from './render/opening-symbol';
import { openingLockFloorPlacement } from './opening-symbol-placement';
import { import {
openingDefaultLengthCm, openingPlacementPreset, passagePlacementPreviewGeometry, openingDefaultLengthCm, openingPlacementPreset, passagePlacementPreviewGeometry,
resolveOpeningPlacementResult, sameOpeningPlacementInput, resolveOpeningPlacementResult, sameOpeningPlacementInput,
@@ -6166,18 +6167,6 @@ export class HouseplanCard extends LitElement {
const start = unprojectFloorPoint([view.x, view.y]), end = unprojectFloorPoint([view.x + view.w, view.y + view.h]); const start = unprojectFloorPoint([view.x, view.y]), end = unprojectFloorPoint([view.x + view.w, view.y + view.h]);
return { x: start[0], y: start[1], w: end[0] - start[0], h: end[1] - start[1] }; return { x: start[0], y: start[1], w: end[0] - start[0], h: end[1] - start[1] };
} }
/** Shared Flat/Iso host-face semantics for raised opening locks. */
private _openingLockAnchor(opening: RenderOpening, openingWallIndex: OpeningWallIndex): PlanPoint {
const rad = ((opening.angle + 90) * Math.PI) / 180;
const gateFace = opening.type === 'gate'
? this._openingFace(opening, openingWallIndex, !opening.flip_v)
: null;
const lockOffset = gridVisualUnits(16, this._cellCm);
const offset = gateFace
? -lockOffset * gateFace.side
: lockOffset * (opening.flip_v ? -1 : 1);
return [opening.rx + Math.cos(rad) * offset, opening.ry + Math.sin(rad) * offset];
}
/** Stage 3 keeps one immutable floor point and one runtime visual point per /** Stage 3 keeps one immutable floor point and one runtime visual point per
* raised item. This snapshot is presentation-only and never enters config. */ * raised item. This snapshot is presentation-only and never enters config. */
private _isoOverlayScene( private _isoOverlayScene(
@@ -13094,7 +13083,16 @@ export class HouseplanCard extends LitElement {
const st = this._renderPlanHass.states[o.lock!]?.state; const st = this._renderPlanHass.states[o.lock!]?.state;
const locked = st === 'locked'; const locked = st === 'locked';
const known = locked || ['unlocked', 'open', 'opening', 'unlocking', 'locking'].includes(String(st)); const known = locked || ['unlocked', 'open', 'opening', 'unlocking', 'locking'].includes(String(st));
const floorAnchor = this._openingLockAnchor(o, openingWallIndex); const gateFace = o.type === 'gate'
? this._openingFace(o, openingWallIndex, !o.flip_v)
: null;
const floorAnchor = openingLockFloorPlacement({
x: o.rx,
y: o.ry,
angle: o.angle,
flipV: !!o.flip_v,
gateFace,
}, this._cellCm)[0];
const isoPlacement = isoPlacements?.get(String(o.id)); const isoPlacement = isoPlacements?.get(String(o.id));
const point = isoPlacement?.visualScene ?? this._scenePoint(floorAnchor); const point = isoPlacement?.visualScene ?? this._scenePoint(floorAnchor);
const left = ((point[0] - view.x) / view.w) * 100; const left = ((point[0] - view.x) / view.w) * 100;
+9 -8
View File
@@ -35,6 +35,7 @@ import {
type OpeningWallIndex, type WallEntry, type OpeningWallIndex, type WallEntry,
} from './wall-thickness'; } from './wall-thickness';
import { partitionOpeningFace } from './partition-openings'; import { partitionOpeningFace } from './partition-openings';
import { openingLockFloorPlacement } from './opening-symbol-placement';
import { physicalBodyParts, type PartitionOpeningCut } from './physical-geometry'; import { physicalBodyParts, type PartitionOpeningCut } from './physical-geometry';
import { gridVisualScale, gridVisualUnits } from './grid-scale'; import { gridVisualScale, gridVisualUnits } from './grid-scale';
import { iconUnit, type Rect } from './space-geometry'; import { iconUnit, type Rect } from './space-geometry';
@@ -855,7 +856,6 @@ export function isoOpeningLockPlacement(
openingWallIndex: OpeningWallIndex, openingWallIndex: OpeningWallIndex,
cellCm: number, cellCm: number,
): { floorAnchor: PlanPoint; preferredRoomId: string | null } { ): { floorAnchor: PlanPoint; preferredRoomId: string | null } {
const rad = ((opening.angle + 90) * Math.PI) / 180;
const faceFlipV = !opening.flip_v; const faceFlipV = !opening.flip_v;
const gateFace = opening.type === 'gate' const gateFace = opening.type === 'gate'
? opening.partitionHost ? opening.partitionHost
@@ -868,20 +868,21 @@ export function isoOpeningLockPlacement(
flip_v: faceFlipV, flip_v: faceFlipV,
}) })
: null; : null;
const lockOffset = gridVisualUnits(16, cellCm); const [floorAnchor, negativeSide] = openingLockFloorPlacement({
const offset = gateFace ? -lockOffset * gateFace.side : lockOffset * (opening.flip_v ? -1 : 1); x: opening.rx,
const floorAnchor: PlanPoint = [ y: opening.ry,
opening.rx + Math.cos(rad) * offset, angle: opening.angle,
opening.ry + Math.sin(rad) * offset, flipV: !!opening.flip_v,
]; gateFace,
}, cellCm);
if (opening.partitionHost) return { floorAnchor, preferredRoomId: null }; if (opening.partitionHost) return { floorAnchor, preferredRoomId: null };
const side = offset < 0 ? 'negative' : 'positive';
const association = resolveOpeningWallAssociation(openingWallIndex, { const association = resolveOpeningWallAssociation(openingWallIndex, {
x: opening.rx, x: opening.rx,
y: opening.ry, y: opening.ry,
angle: opening.angle, angle: opening.angle,
length: opening.rlen, length: opening.rlen,
}, true); }, true);
const side = negativeSide ? 'negative' : 'positive';
return { floorAnchor, preferredRoomId: association[side]?.roomId || null }; return { floorAnchor, preferredRoomId: association[side]?.roomId || null };
} }
+32
View File
@@ -1,4 +1,5 @@
import type { OpeningCfg } from './types'; import type { OpeningCfg } from './types';
import { gridVisualUnits } from './grid-scale';
export interface OpeningFaceOffset { export interface OpeningFaceOffset {
ox: number; ox: number;
@@ -12,6 +13,19 @@ export interface OpeningSymbolOffset {
oy: number; oy: number;
} }
export interface OpeningLockAnchorInput {
x: number;
y: number;
angle: number;
flipV: boolean;
gateFace?: Pick<OpeningFaceOffset, 'side'> | null;
}
export type OpeningLockFloorPlacement = [
floorAnchor: [number, number],
negativeSide: boolean,
];
/** /**
* Resolve only the visible symbol translation. Every opening symbol stays on * Resolve only the visible symbol translation. Every opening symbol stays on
* the saved wall centreline: wall-face direction/depth and flip direction are * the saved wall centreline: wall-face direction/depth and flip direction are
@@ -25,3 +39,21 @@ export function openingSymbolOffset(
): OpeningSymbolOffset { ): OpeningSymbolOffset {
return { ox: 0, oy: 0 }; return { ox: 0, oy: 0 };
} }
/** One Flat/Iso authority for an opening lock's immutable floor placement. */
export function openingLockFloorPlacement(
opening: OpeningLockAnchorInput, cellCm: number,
): OpeningLockFloorPlacement {
const rad = ((opening.angle + 90) * Math.PI) / 180;
const lockOffset = gridVisualUnits(16, cellCm);
const offset = opening.gateFace
? -lockOffset * opening.gateFace.side
: lockOffset * (opening.flipV ? -1 : 1);
return [
[
opening.x + Math.cos(rad) * offset,
opening.y + Math.sin(rad) * offset,
],
offset < 0,
];
}
+29 -4
View File
@@ -206,11 +206,36 @@ test('state-independent opening bounds contain closed and open leaf tips', () =>
assert.equal(isoOpeningBounds([]), null); assert.equal(isoOpeningBounds([]), null);
}); });
test('flips move structural jamb/basis while HA state changes only projected leaves', () => { test('flipH and flipV independently mirror their exact structural axes', () => {
const normal = buildIsoOpeningBasis(opening());
const horizontal = buildIsoOpeningBasis(opening({ flipH: true }));
const vertical = buildIsoOpeningBasis(opening({ flipV: true }));
const both = buildIsoOpeningBasis(opening({ flipH: true, flipV: true }));
const signature = (basis) => {
const leaf = basis.leaves[0];
const clean = (point) => point.map((value) => Math.abs(value) < 1e-9 ? 0 : value);
return {
hinge: clean(leaf.hinge),
closedVector: clean(leaf.closedVector),
quarterVector: clean(leaf.quarterVector),
};
};
assert.deepEqual(signature(normal), {
hinge: [70, 80], closedVector: [60, 0], quarterVector: [0, 60],
});
assert.deepEqual(signature(horizontal), {
hinge: [130, 80], closedVector: [-60, 0], quarterVector: [0, 60],
});
assert.deepEqual(signature(vertical), {
hinge: [70, 80], closedVector: [60, 0], quarterVector: [0, -60],
});
assert.deepEqual(signature(both), {
hinge: [130, 80], closedVector: [-60, 0], quarterVector: [0, -60],
});
});
test('HA state changes only projected leaves', () => {
const normal = buildIsoOpeningBasis(opening()); const normal = buildIsoOpeningBasis(opening());
const flipped = buildIsoOpeningBasis(opening({ flipH: true, flipV: true }));
assert.notDeepEqual(flipped.leaves.map((leaf) => leaf.hinge),
normal.leaves.map((leaf) => leaf.hinge));
const basisSnapshot = structuredClone(normal); const basisSnapshot = structuredClone(normal);
const noContact = projectIsoOpening(normal, openingAmount('door', null)); const noContact = projectIsoOpening(normal, openingAmount('door', null));
const unavailable = projectIsoOpening(normal, openingAmount('door', 'unavailable')); const unavailable = projectIsoOpening(normal, openingAmount('door', 'unavailable'));
+40
View File
@@ -5,6 +5,7 @@ import {
ISO_OVERLAY_SAFETY_GAP_CSS_PX, ISO_OVERLAY_SAFETY_GAP_CSS_PX,
buildIsoPlatePolygon, buildIsoPlatePolygon,
isoOverlayPlane, isoOverlayPlane,
isoRoomSafePoint,
resolveIsoOverlayOwner, resolveIsoOverlayOwner,
resolveIsoOverlayPlacement, resolveIsoOverlayPlacement,
} from '../test-build/iso-overlays.js'; } from '../test-build/iso-overlays.js';
@@ -92,6 +93,45 @@ test('strict room ownership excludes holes, shared boundaries and outside points
}), null, 'an outside saved point stays ownerless'); }), null, 'an outside saved point stays ownerless');
}); });
test('safe-point search is deterministic and stays strictly inside concave rooms and holes', () => {
const rooms = [
{
id: 'donut',
outer: [[0, 0], [100, 0], [100, 100], [0, 100]],
holes: [[[35, 35], [65, 35], [65, 65], [35, 65]]],
},
{
id: 'concave',
outer: [
[0, 0], [100, 0], [100, 100], [60, 100],
[60, 35], [40, 35], [40, 100], [0, 100],
],
},
];
for (const room of rooms) {
const first = isoRoomSafePoint(room);
assert.ok(first, `${room.id}: bounded search finds an inner point`);
assert.deepEqual(isoRoomSafePoint(room), first, `${room.id}: repeated search is deterministic`);
assert.equal(resolveIsoOverlayOwner({
kind: 'device', floorAnchor: first, rooms: [room],
})?.id, room.id, `${room.id}: result is strictly inside the room and outside every hole`);
}
});
test('a degenerate room has no safe point and placement degrades without throwing', () => {
const degenerate = { id: 'line', outer: [[0, 0], [50, 0], [100, 0]] };
assert.equal(isoRoomSafePoint(degenerate), null);
const result = placement({
rooms: [degenerate],
preferredRoomId: degenerate.id,
wallSilhouettes: [{ outer: buildIsoPlatePolygon([50, 50], [10, 10], ISO_WALL_HEIGHT) }],
});
assert.equal(result.owner, null);
assert.equal(result.status, 'degraded');
assert.equal(result.reason, 'missing-owner');
assert.equal(result.nudged, false);
});
test('plate corners use the same affine camera on the raised plane', () => { test('plate corners use the same affine camera on the raised plane', () => {
const plate = buildIsoPlatePolygon([50, 50], [10, 5], ISO_RAISED_OVERLAY_HEIGHT); const plate = buildIsoPlatePolygon([50, 50], [10, 5], ISO_RAISED_OVERLAY_HEIGHT);
const logical = [[40, 45], [60, 45], [60, 55], [40, 55]]; const logical = [[40, 45], [60, 45], [60, 55], [40, 55]];
+25 -1
View File
@@ -1,6 +1,9 @@
import assert from 'node:assert/strict'; import assert from 'node:assert/strict';
import test from 'node:test'; import test from 'node:test';
import { openingSymbolOffset } from '../test-build/opening-symbol-placement.js'; import {
openingLockFloorPlacement,
openingSymbolOffset,
} from '../test-build/opening-symbol-placement.js';
const positiveFace = { ox: 0, oy: 20, cm: 20, side: 1 }; const positiveFace = { ox: 0, oy: 20, cm: 20, side: 1 };
const negativeFace = { ox: 0, oy: -20, cm: 20, side: -1 }; const negativeFace = { ox: 0, oy: -20, cm: 20, side: -1 };
@@ -27,3 +30,24 @@ test('every opening symbol stays exactly on the wall centreline', () => {
} }
} }
}); });
test('opening lock floor placement owns both the anchor and its host side', () => {
const normalize = (point) => point.map((value) => Math.abs(value) < 1e-9 ? 0 : value);
const regular = openingLockFloorPlacement({
x: 100, y: 80, angle: 0, flipV: false,
}, 5);
assert.deepEqual(normalize(regular[0]), [100, 96]);
assert.equal(regular[1], false);
const flipped = openingLockFloorPlacement({
x: 100, y: 80, angle: 0, flipV: true,
}, 5);
assert.deepEqual(normalize(flipped[0]), [100, 64]);
assert.equal(flipped[1], true);
const gate = openingLockFloorPlacement({
x: 100, y: 80, angle: 0, flipV: false, gateFace: positiveFace,
}, 5);
assert.deepEqual(normalize(gate[0]), [100, 64]);
assert.equal(gate[1], true);
});