fix: address Zigbee route review

Issue: #457
User-Visible: no
This commit is contained in:
Sergey Matyunin
2026-09-05 10:50:19 +03:00
parent 7cb1eee386
commit 896ceecf3a
30 changed files with 307 additions and 216 deletions
@@ -1,57 +1,57 @@
{
"schema": 1,
"fingerprint": "4ee1af967e8c303dcc691e9d85991cfec23c0787b69a7a4790eea2084797a225",
"fingerprint": "b2baa797361b836964adc96221eabf4f8e9123b02ae55fe32b18f4d4662a8e9c",
"entry": "houseplan-card.js",
"initialViewFiles": [
"houseplan-assets/houseplan-card-C7v6ZaXI.js",
"houseplan-assets/houseplan-card-BPjCRsTo.js",
"houseplan-card.js"
],
"initialViewGzipBytes": 297497,
"initialViewGzipBytes": 297496,
"lazyFiles": [
"houseplan-assets/backdrop-pick-CJW_7B5r.js",
"houseplan-assets/de-D9OIgG_J.js",
"houseplan-assets/editor-CNjTVHsf.js",
"houseplan-assets/fr-DA4YsYk_.js",
"houseplan-assets/houseplan-editor-runtime-BfZCPv8j.js",
"houseplan-assets/houseplan-onboarding-runtime-DQQls19P.js",
"houseplan-assets/hp-zigbee-topology-overlay-D-a7FHcb.js",
"houseplan-assets/live-interaction-runtime-DSM24Tou.js",
"houseplan-assets/zigbee-topology-runtime-Dvx229IG.js",
"houseplan-assets/zigbee-topology-tpWwm6RD.js"
"houseplan-assets/backdrop-pick-Duf1Bdh6.js",
"houseplan-assets/de-CFYVEfKY.js",
"houseplan-assets/editor-QjNx89iq.js",
"houseplan-assets/fr-CGt9f7iD.js",
"houseplan-assets/houseplan-editor-runtime-CZxl3GH6.js",
"houseplan-assets/houseplan-onboarding-runtime-8y08OhqH.js",
"houseplan-assets/hp-zigbee-topology-overlay-CAtxncsA.js",
"houseplan-assets/live-interaction-runtime-CrPD9yL6.js",
"houseplan-assets/zigbee-topology-OesQErJ9.js",
"houseplan-assets/zigbee-topology-runtime-D1hCsInw.js"
],
"lazyGzipBytes": 246048,
"lazyGzipBytes": 246064,
"lazyEditorFiles": [
"houseplan-assets/backdrop-pick-CJW_7B5r.js",
"houseplan-assets/editor-CNjTVHsf.js",
"houseplan-assets/houseplan-editor-runtime-BfZCPv8j.js",
"houseplan-assets/zigbee-topology-tpWwm6RD.js"
"houseplan-assets/backdrop-pick-Duf1Bdh6.js",
"houseplan-assets/editor-QjNx89iq.js",
"houseplan-assets/houseplan-editor-runtime-CZxl3GH6.js",
"houseplan-assets/zigbee-topology-OesQErJ9.js"
],
"lazyEditorGzipBytes": 182031,
"lazyEditorGzipBytes": 182047,
"lazyOnboardingFiles": [
"houseplan-assets/backdrop-pick-CJW_7B5r.js",
"houseplan-assets/houseplan-onboarding-runtime-DQQls19P.js"
"houseplan-assets/backdrop-pick-Duf1Bdh6.js",
"houseplan-assets/houseplan-onboarding-runtime-8y08OhqH.js"
],
"lazyOnboardingGzipBytes": 14316,
"lazyOnboardingGzipBytes": 14312,
"lazyLocaleFiles": [
"houseplan-assets/de-D9OIgG_J.js",
"houseplan-assets/fr-DA4YsYk_.js"
"houseplan-assets/de-CFYVEfKY.js",
"houseplan-assets/fr-CGt9f7iD.js"
],
"lazyLocaleGzipBytes": 49936,
"files": [
{
"path": "houseplan-assets/backdrop-pick-CJW_7B5r.js",
"sha256": "5cf5cf2fcd26339e8b0c296485a5de428c42b9d9b6281e2eecee17eceea22246",
"path": "houseplan-assets/backdrop-pick-Duf1Bdh6.js",
"sha256": "ff2459214cc7acc882b60728643b19e44e74c4e79d48b782adf92606dbb40615",
"rawBytes": 21592,
"gzipBytes": 7358,
"gzipBytes": 7356,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-C7v6ZaXI.js"
"houseplan-assets/houseplan-card-BPjCRsTo.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/de-D9OIgG_J.js",
"sha256": "74a91bb138de808cca05d54476a374b9879d136393358fd72f45814b10336d57",
"path": "houseplan-assets/de-CFYVEfKY.js",
"sha256": "c1212390cf12249c112bcbfcf0cf06e71e4dc2f6363f0603cf70ef723b10e105",
"rawBytes": 83907,
"gzipBytes": 25243,
"isEntry": false,
@@ -59,19 +59,19 @@
"dynamicImports": []
},
{
"path": "houseplan-assets/editor-CNjTVHsf.js",
"sha256": "01b4a6040b2ef8d27e87ba053ff34a15c1e57cb3dc414453146e2be5ac329982",
"path": "houseplan-assets/editor-QjNx89iq.js",
"sha256": "946aec7527760fdb7639dba4fe12dcc2d537c0dfba326223472f7005f5dd670f",
"rawBytes": 3831,
"gzipBytes": 1583,
"gzipBytes": 1582,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-C7v6ZaXI.js"
"houseplan-assets/houseplan-card-BPjCRsTo.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/fr-DA4YsYk_.js",
"sha256": "1dc5e95f7b41708b1a27d66b2b9809ef902af8de4c2ca0107edd0f28e7462707",
"path": "houseplan-assets/fr-CGt9f7iD.js",
"sha256": "6ce0f731f24895065b1913df18eb74fa7723f8a07b32b8b313f4088aea0e1137",
"rawBytes": 85967,
"gzipBytes": 24693,
"isEntry": false,
@@ -79,104 +79,104 @@
"dynamicImports": []
},
{
"path": "houseplan-assets/houseplan-card-C7v6ZaXI.js",
"sha256": "98a861f189a501ae757c0b8f0348ba5940ad204f473e6fb52558a85d44eb17e8",
"path": "houseplan-assets/houseplan-card-BPjCRsTo.js",
"sha256": "18163614454db07163e74e89d6114ddceb1404a532cca505b2a3c5422d1f4d78",
"rawBytes": 1058176,
"gzipBytes": 296701,
"isEntry": false,
"imports": [],
"dynamicImports": [
"houseplan-assets/de-D9OIgG_J.js",
"houseplan-assets/editor-CNjTVHsf.js",
"houseplan-assets/fr-DA4YsYk_.js",
"houseplan-assets/houseplan-editor-runtime-BfZCPv8j.js",
"houseplan-assets/houseplan-onboarding-runtime-DQQls19P.js",
"houseplan-assets/hp-zigbee-topology-overlay-D-a7FHcb.js",
"houseplan-assets/live-interaction-runtime-DSM24Tou.js"
"houseplan-assets/de-CFYVEfKY.js",
"houseplan-assets/editor-QjNx89iq.js",
"houseplan-assets/fr-CGt9f7iD.js",
"houseplan-assets/houseplan-editor-runtime-CZxl3GH6.js",
"houseplan-assets/houseplan-onboarding-runtime-8y08OhqH.js",
"houseplan-assets/hp-zigbee-topology-overlay-CAtxncsA.js",
"houseplan-assets/live-interaction-runtime-CrPD9yL6.js"
]
},
{
"path": "houseplan-assets/houseplan-editor-runtime-BfZCPv8j.js",
"sha256": "d31cd465b2858ef30e3b21c380def3464a150a8840d29bc61814a36a7e6b8b3a",
"path": "houseplan-assets/houseplan-editor-runtime-CZxl3GH6.js",
"sha256": "723a2e68ba55c84805c1150b8edb4da2154a3ec59a31a7e0f61a45ae6fca1004",
"rawBytes": 630790,
"gzipBytes": 167373,
"gzipBytes": 167370,
"isEntry": false,
"imports": [
"houseplan-assets/backdrop-pick-CJW_7B5r.js",
"houseplan-assets/houseplan-card-C7v6ZaXI.js",
"houseplan-assets/zigbee-topology-tpWwm6RD.js"
"houseplan-assets/backdrop-pick-Duf1Bdh6.js",
"houseplan-assets/houseplan-card-BPjCRsTo.js",
"houseplan-assets/zigbee-topology-OesQErJ9.js"
],
"dynamicImports": [
"houseplan-assets/zigbee-topology-runtime-Dvx229IG.js"
"houseplan-assets/zigbee-topology-runtime-D1hCsInw.js"
]
},
{
"path": "houseplan-assets/houseplan-onboarding-runtime-DQQls19P.js",
"sha256": "5b4e62bc117fc92d8b729030c3dc473122039df7b68087cf0376a643eacbd9e6",
"path": "houseplan-assets/houseplan-onboarding-runtime-8y08OhqH.js",
"sha256": "3cc7f96f2f1f2f7bc599eddc08259ead9a1988f6ee430e6b55e2ab29a4567fcd",
"rawBytes": 28088,
"gzipBytes": 6958,
"gzipBytes": 6956,
"isEntry": false,
"imports": [
"houseplan-assets/backdrop-pick-CJW_7B5r.js",
"houseplan-assets/houseplan-card-C7v6ZaXI.js"
"houseplan-assets/backdrop-pick-Duf1Bdh6.js",
"houseplan-assets/houseplan-card-BPjCRsTo.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/hp-zigbee-topology-overlay-D-a7FHcb.js",
"sha256": "4ecb15d8107ad4df4f19f7e79533ac0a9d7c7689f2717bc8826eea7b5bac09a6",
"path": "houseplan-assets/hp-zigbee-topology-overlay-CAtxncsA.js",
"sha256": "9d4a14157ef14fc6bdf3fdb9f5c631a59b8badea973fb492b3084a1e0cfbcf7f",
"rawBytes": 8626,
"gzipBytes": 3235,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-C7v6ZaXI.js",
"houseplan-assets/zigbee-topology-runtime-Dvx229IG.js",
"houseplan-assets/zigbee-topology-tpWwm6RD.js"
"houseplan-assets/houseplan-card-BPjCRsTo.js",
"houseplan-assets/zigbee-topology-OesQErJ9.js",
"houseplan-assets/zigbee-topology-runtime-D1hCsInw.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/live-interaction-runtime-DSM24Tou.js",
"sha256": "bb134dbd7d66d9bbff2cb577c45590b06a432cd9f96f8a5c954b1dd4885be20a",
"path": "houseplan-assets/live-interaction-runtime-CrPD9yL6.js",
"sha256": "eb857c35a83da4fbbec97eb73cfb512274735db10e997ff61828ad6aa4c7ed7e",
"rawBytes": 5196,
"gzipBytes": 2127,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-C7v6ZaXI.js"
"houseplan-assets/houseplan-card-BPjCRsTo.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/zigbee-topology-runtime-Dvx229IG.js",
"sha256": "bff66c639d375243863dc2db9a7ca99430346eea79c990b651393c5ed582dde8",
"path": "houseplan-assets/zigbee-topology-OesQErJ9.js",
"sha256": "b22a1723c06f787f7c8512ac031c98eaf1a76ce3ef0182de48a65366b4fd7b4b",
"rawBytes": 15135,
"gzipBytes": 5739,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-BPjCRsTo.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/zigbee-topology-runtime-D1hCsInw.js",
"sha256": "67a225b4f8267dd2d3233fa5071448b233aa900405b2d3dfbce1a570bc04881f",
"rawBytes": 3941,
"gzipBytes": 1761,
"gzipBytes": 1763,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-C7v6ZaXI.js",
"houseplan-assets/zigbee-topology-tpWwm6RD.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/zigbee-topology-tpWwm6RD.js",
"sha256": "a2604893361f5d7d3a2c6c99dd21d38fcd5df6f9bb5965c89db95d6fa00bd7df",
"rawBytes": 15046,
"gzipBytes": 5717,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-C7v6ZaXI.js"
"houseplan-assets/houseplan-card-BPjCRsTo.js",
"houseplan-assets/zigbee-topology-OesQErJ9.js"
],
"dynamicImports": []
},
{
"path": "houseplan-card.js",
"sha256": "fa6fc2603eebd049d2c26059d6138707c7c6b53d9cf5229cc4fa4048f334b60f",
"sha256": "02ece7d8bc4d5ff924159e80dbed70959bd7b39bc55932f3599c50f01dad32f9",
"rawBytes": 1183,
"gzipBytes": 796,
"gzipBytes": 795,
"isEntry": true,
"imports": [
"houseplan-assets/houseplan-card-C7v6ZaXI.js"
"houseplan-assets/houseplan-card-BPjCRsTo.js"
],
"dynamicImports": []
}
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="4ee1af967e8c303dcc691e9d85991cfec23c0787b69a7a4790eea2084797a225";import{v as e,l as o,z as t,dt as s,A as a,du as i,dv as l,dw as n,E as r,c}from"./houseplan-card-C7v6ZaXI.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
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="b2baa797361b836964adc96221eabf4f8e9123b02ae55fe32b18f4d4662a8e9c";import{v as e,l as o,z as t,dt as s,A as a,du as i,dv as l,dw as n,E as r,c}from"./houseplan-card-BPjCRsTo.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}
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="4ee1af967e8c303dcc691e9d85991cfec23c0787b69a7a4790eea2084797a225";import{l as t,a$ as s,A as e,z as o,c as a,cj as l,ck as i,cl as h,cm as c,aY as n,cn as r,cs as p,co as _,cp as d,cq as u,cr as g,dj as m,aX as b,aZ as $,dk as v}from"./houseplan-card-C7v6ZaXI.js";import{i as f,c as y,e as w,r as D,a as k,b as S,g as C,t as M}from"./backdrop-pick-CJW_7B5r.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="4ee1af967e8c303dcc691e9d85991cfec23c0787b69a7a4790eea2084797a225";class L{constructor(t){this.host=t,this._toggleServerPlans=async()=>{const t=this.host._spaceDialog;if(t)if(t.pickSaved)this.host._spaceDialog={...t,pickSaved:!1};else{this.host._spaceDialog={...t,pickSaved:!0,savedBusy:!0};try{const t=await this.host.hass.callWS({type:"houseplan/plans/list"}),s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:t?.plans||[],savedBusy:!1})}catch(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:[],savedBusy:!1}),this.host._showToast(this.host._t("toast.plans_list_failed",{err:this.host._errText(t)}))}}}}_help(l){const i=`${l}.aria`,h=t(this.host.hass,this.host._config?.language);return s(h,l)&&s(h,i)?a`<hp-help data-help-key=${l}
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="b2baa797361b836964adc96221eabf4f8e9123b02ae55fe32b18f4d4662a8e9c";import{l as t,a$ as s,A as e,z as o,c as a,cj as l,ck as i,cl as h,cm as c,aY as n,cn as r,cs as p,co as _,cp as d,cq as u,cr as g,dj as m,aX as b,aZ as $,dk as v}from"./houseplan-card-BPjCRsTo.js";import{i as f,c as y,e as w,r as D,a as k,b as S,g as C,t as M}from"./backdrop-pick-Duf1Bdh6.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="b2baa797361b836964adc96221eabf4f8e9123b02ae55fe32b18f4d4662a8e9c";class L{constructor(t){this.host=t,this._toggleServerPlans=async()=>{const t=this.host._spaceDialog;if(t)if(t.pickSaved)this.host._spaceDialog={...t,pickSaved:!1};else{this.host._spaceDialog={...t,pickSaved:!0,savedBusy:!0};try{const t=await this.host.hass.callWS({type:"houseplan/plans/list"}),s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:t?.plans||[],savedBusy:!1})}catch(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:[],savedBusy:!1}),this.host._showToast(this.host._t("toast.plans_list_failed",{err:this.host._errText(t)}))}}}}_help(l){const i=`${l}.aria`,h=t(this.host.hass,this.host._config?.language);return s(h,l)&&s(h,i)?a`<hp-help data-help-key=${l}
.text=${o(h,l)} .ariaLabel=${o(h,i)}></hp-help>`:e}_openSpaceDialog(t,s){if(!this.host._serverStorage||!this.host._serverCfg)return void this.host._showToast(this.host._t("toast.integration_missing"));if("edit"===t){const e=this.host._serverCfg.spaces.find(t=>t.id===s);if(!e)return;const o=l(e),a=e.settings?.custom_fill&&"object"==typeof e.settings.custom_fill?i(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:r(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:n({},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:c(Number(e.cell_cm)>0?Number(e.cell_cm):5,this.host._imperial),cellCmTouched:!1,busy:!1})}const e=p(this.host._imperial);this.host._spaceDialog={mode:t,title:"",planUrl:null,planFile:null,...f(),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:d,tempMax:_,showLqi:this.host._config?.show_signal??!0,cardFontScale:1,labelTemp:!1,labelHum:!1,labelLqi:!1,labelLight:!1,cellCm:e,cellCmInput:c(e,this.host._imperial),cellCmTouched:!1,busy:!1}}async _pickPlanFile(t){const s=t.target,e=s.files?.[0];if(!e||!this.host._spaceDialog)return;s.value="";const o=await y(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 w(e,o.ext,e.name);this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:a})}_renderBackdropGuard(){return D(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,l=a?.saved?.find(s=>s.name===t);if(o&&a&&l&&l.url===e.url&&l.modified===e.modified&&!l.used_by.length&&l.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 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="4ee1af967e8c303dcc691e9d85991cfec23c0787b69a7a4790eea2084797a225";import{n as t,b as n}from"./zigbee-topology-tpWwm6RD.js";import{I as e}from"./houseplan-card-C7v6ZaXI.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__="b2baa797361b836964adc96221eabf4f8e9123b02ae55fe32b18f4d4662a8e9c";import{n as t,b as n}from"./zigbee-topology-OesQErJ9.js";import{I as e}from"./houseplan-card-BPjCRsTo.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__="4ee1af967e8c303dcc691e9d85991cfec23c0787b69a7a4790eea2084797a225";try{await import("./houseplan-assets/houseplan-card-C7v6ZaXI.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__="b2baa797361b836964adc96221eabf4f8e9123b02ae55fe32b18f4d4662a8e9c";try{await import("./houseplan-assets/houseplan-card-BPjCRsTo.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)}
+62
View File
@@ -154,5 +154,67 @@ const result = await page.evaluate(async () => {
return out;
});
for (const [aspect, viewport] of Object.entries({
wide: { width: 1100, height: 500 },
tall: { width: 480, height: 900 },
})) {
await page.setViewportSize(viewport);
for (const [zoomName, zoom] of Object.entries({ min: 1 / 3, default: 1, max: 8 })) {
result[`geometry_${aspect}_${zoomName}`] = await page.evaluate(async ({ zoom, hostWidth }) => {
const card = window.__card;
const root = () => card.shadowRoot || card.renderRoot;
const wait = (predicate, timeout = 5000) => new Promise((resolve, reject) => {
const started = performance.now();
const tick = () => {
if (predicate()) return resolve();
if (performance.now() - started > timeout) return reject(new Error('topology geometry timeout'));
setTimeout(tick, 20);
};
tick();
});
document.querySelector('#host').style.width = `${hostWidth}px`;
card.hass = { ...card.hass, user: { ...card.hass.user, is_admin: true } };
card._setMode('view');
card._commitSpace('f1', true);
card._zoom = 1;
card._view = null;
card.requestUpdate();
await card.updateComplete;
card._applyView(zoom, 0.32, 0.36);
card.requestUpdate();
await card.updateComplete;
await new Promise((resolve) => requestAnimationFrame(() => requestAnimationFrame(resolve)));
const source = root().querySelector('.dev[data-id="d_light1"]');
source.dispatchEvent(new PointerEvent('pointerover', {
pointerType: 'mouse', bubbles: true, composed: true, clientX: 200, clientY: 200,
}));
await wait(() => root().querySelector('hp-zigbee-topology-overlay')?.shadowRoot
?.querySelector('[data-hp="zigbee-topology-arrow"]'));
const overlay = root().querySelector('hp-zigbee-topology-overlay');
await overlay.updateComplete;
const svg = overlay.shadowRoot.querySelector('svg');
const arrow = overlay.shadowRoot.querySelector('[data-hp="zigbee-topology-arrow"]');
const line = overlay.shadowRoot.querySelector('line[data-direction="toward-neighbor"]');
const points = arrow.getAttribute('points').trim().split(/\s+/).map((pair) => {
const [x, y] = pair.split(',').map(Number);
return new DOMPoint(x, y).matrixTransform(svg.getScreenCTM());
});
const tip = points[0];
const base = new DOMPoint((points[1].x + points[2].x) / 2, (points[1].y + points[2].y) / 2);
const length = Math.hypot(tip.x - base.x, tip.y - base.y);
const halfWidth = Math.hypot(points[1].x - points[2].x, points[1].y - points[2].y) / 2;
const lineVector = {
x: Number(line.getAttribute('x2')) - Number(line.getAttribute('x1')),
y: Number(line.getAttribute('y2')) - Number(line.getAttribute('y1')),
};
const arrowVector = { x: tip.x - base.x, y: tip.y - base.y };
const alignment = (lineVector.x * arrowVector.x + lineVector.y * arrowVector.y)
/ (Math.hypot(lineVector.x, lineVector.y) * Math.hypot(arrowVector.x, arrowVector.y));
return length > 8.5 && length < 9.5 && halfWidth > 4 && halfWidth < 5
&& alignment > 0.999 && getComputedStyle(overlay).pointerEvents === 'none';
}, { zoom, hostWidth: Math.max(320, viewport.width - 40) });
}
}
checkAll(result);
await finish(browser, result);
+84 -84
View File
@@ -1,57 +1,57 @@
{
"schema": 1,
"fingerprint": "4ee1af967e8c303dcc691e9d85991cfec23c0787b69a7a4790eea2084797a225",
"fingerprint": "b2baa797361b836964adc96221eabf4f8e9123b02ae55fe32b18f4d4662a8e9c",
"entry": "houseplan-card.js",
"initialViewFiles": [
"houseplan-assets/houseplan-card-C7v6ZaXI.js",
"houseplan-assets/houseplan-card-BPjCRsTo.js",
"houseplan-card.js"
],
"initialViewGzipBytes": 297497,
"initialViewGzipBytes": 297496,
"lazyFiles": [
"houseplan-assets/backdrop-pick-CJW_7B5r.js",
"houseplan-assets/de-D9OIgG_J.js",
"houseplan-assets/editor-CNjTVHsf.js",
"houseplan-assets/fr-DA4YsYk_.js",
"houseplan-assets/houseplan-editor-runtime-BfZCPv8j.js",
"houseplan-assets/houseplan-onboarding-runtime-DQQls19P.js",
"houseplan-assets/hp-zigbee-topology-overlay-D-a7FHcb.js",
"houseplan-assets/live-interaction-runtime-DSM24Tou.js",
"houseplan-assets/zigbee-topology-runtime-Dvx229IG.js",
"houseplan-assets/zigbee-topology-tpWwm6RD.js"
"houseplan-assets/backdrop-pick-Duf1Bdh6.js",
"houseplan-assets/de-CFYVEfKY.js",
"houseplan-assets/editor-QjNx89iq.js",
"houseplan-assets/fr-CGt9f7iD.js",
"houseplan-assets/houseplan-editor-runtime-CZxl3GH6.js",
"houseplan-assets/houseplan-onboarding-runtime-8y08OhqH.js",
"houseplan-assets/hp-zigbee-topology-overlay-CAtxncsA.js",
"houseplan-assets/live-interaction-runtime-CrPD9yL6.js",
"houseplan-assets/zigbee-topology-OesQErJ9.js",
"houseplan-assets/zigbee-topology-runtime-D1hCsInw.js"
],
"lazyGzipBytes": 246048,
"lazyGzipBytes": 246064,
"lazyEditorFiles": [
"houseplan-assets/backdrop-pick-CJW_7B5r.js",
"houseplan-assets/editor-CNjTVHsf.js",
"houseplan-assets/houseplan-editor-runtime-BfZCPv8j.js",
"houseplan-assets/zigbee-topology-tpWwm6RD.js"
"houseplan-assets/backdrop-pick-Duf1Bdh6.js",
"houseplan-assets/editor-QjNx89iq.js",
"houseplan-assets/houseplan-editor-runtime-CZxl3GH6.js",
"houseplan-assets/zigbee-topology-OesQErJ9.js"
],
"lazyEditorGzipBytes": 182031,
"lazyEditorGzipBytes": 182047,
"lazyOnboardingFiles": [
"houseplan-assets/backdrop-pick-CJW_7B5r.js",
"houseplan-assets/houseplan-onboarding-runtime-DQQls19P.js"
"houseplan-assets/backdrop-pick-Duf1Bdh6.js",
"houseplan-assets/houseplan-onboarding-runtime-8y08OhqH.js"
],
"lazyOnboardingGzipBytes": 14316,
"lazyOnboardingGzipBytes": 14312,
"lazyLocaleFiles": [
"houseplan-assets/de-D9OIgG_J.js",
"houseplan-assets/fr-DA4YsYk_.js"
"houseplan-assets/de-CFYVEfKY.js",
"houseplan-assets/fr-CGt9f7iD.js"
],
"lazyLocaleGzipBytes": 49936,
"files": [
{
"path": "houseplan-assets/backdrop-pick-CJW_7B5r.js",
"sha256": "5cf5cf2fcd26339e8b0c296485a5de428c42b9d9b6281e2eecee17eceea22246",
"path": "houseplan-assets/backdrop-pick-Duf1Bdh6.js",
"sha256": "ff2459214cc7acc882b60728643b19e44e74c4e79d48b782adf92606dbb40615",
"rawBytes": 21592,
"gzipBytes": 7358,
"gzipBytes": 7356,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-C7v6ZaXI.js"
"houseplan-assets/houseplan-card-BPjCRsTo.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/de-D9OIgG_J.js",
"sha256": "74a91bb138de808cca05d54476a374b9879d136393358fd72f45814b10336d57",
"path": "houseplan-assets/de-CFYVEfKY.js",
"sha256": "c1212390cf12249c112bcbfcf0cf06e71e4dc2f6363f0603cf70ef723b10e105",
"rawBytes": 83907,
"gzipBytes": 25243,
"isEntry": false,
@@ -59,19 +59,19 @@
"dynamicImports": []
},
{
"path": "houseplan-assets/editor-CNjTVHsf.js",
"sha256": "01b4a6040b2ef8d27e87ba053ff34a15c1e57cb3dc414453146e2be5ac329982",
"path": "houseplan-assets/editor-QjNx89iq.js",
"sha256": "946aec7527760fdb7639dba4fe12dcc2d537c0dfba326223472f7005f5dd670f",
"rawBytes": 3831,
"gzipBytes": 1583,
"gzipBytes": 1582,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-C7v6ZaXI.js"
"houseplan-assets/houseplan-card-BPjCRsTo.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/fr-DA4YsYk_.js",
"sha256": "1dc5e95f7b41708b1a27d66b2b9809ef902af8de4c2ca0107edd0f28e7462707",
"path": "houseplan-assets/fr-CGt9f7iD.js",
"sha256": "6ce0f731f24895065b1913df18eb74fa7723f8a07b32b8b313f4088aea0e1137",
"rawBytes": 85967,
"gzipBytes": 24693,
"isEntry": false,
@@ -79,104 +79,104 @@
"dynamicImports": []
},
{
"path": "houseplan-assets/houseplan-card-C7v6ZaXI.js",
"sha256": "98a861f189a501ae757c0b8f0348ba5940ad204f473e6fb52558a85d44eb17e8",
"path": "houseplan-assets/houseplan-card-BPjCRsTo.js",
"sha256": "18163614454db07163e74e89d6114ddceb1404a532cca505b2a3c5422d1f4d78",
"rawBytes": 1058176,
"gzipBytes": 296701,
"isEntry": false,
"imports": [],
"dynamicImports": [
"houseplan-assets/de-D9OIgG_J.js",
"houseplan-assets/editor-CNjTVHsf.js",
"houseplan-assets/fr-DA4YsYk_.js",
"houseplan-assets/houseplan-editor-runtime-BfZCPv8j.js",
"houseplan-assets/houseplan-onboarding-runtime-DQQls19P.js",
"houseplan-assets/hp-zigbee-topology-overlay-D-a7FHcb.js",
"houseplan-assets/live-interaction-runtime-DSM24Tou.js"
"houseplan-assets/de-CFYVEfKY.js",
"houseplan-assets/editor-QjNx89iq.js",
"houseplan-assets/fr-CGt9f7iD.js",
"houseplan-assets/houseplan-editor-runtime-CZxl3GH6.js",
"houseplan-assets/houseplan-onboarding-runtime-8y08OhqH.js",
"houseplan-assets/hp-zigbee-topology-overlay-CAtxncsA.js",
"houseplan-assets/live-interaction-runtime-CrPD9yL6.js"
]
},
{
"path": "houseplan-assets/houseplan-editor-runtime-BfZCPv8j.js",
"sha256": "d31cd465b2858ef30e3b21c380def3464a150a8840d29bc61814a36a7e6b8b3a",
"path": "houseplan-assets/houseplan-editor-runtime-CZxl3GH6.js",
"sha256": "723a2e68ba55c84805c1150b8edb4da2154a3ec59a31a7e0f61a45ae6fca1004",
"rawBytes": 630790,
"gzipBytes": 167373,
"gzipBytes": 167370,
"isEntry": false,
"imports": [
"houseplan-assets/backdrop-pick-CJW_7B5r.js",
"houseplan-assets/houseplan-card-C7v6ZaXI.js",
"houseplan-assets/zigbee-topology-tpWwm6RD.js"
"houseplan-assets/backdrop-pick-Duf1Bdh6.js",
"houseplan-assets/houseplan-card-BPjCRsTo.js",
"houseplan-assets/zigbee-topology-OesQErJ9.js"
],
"dynamicImports": [
"houseplan-assets/zigbee-topology-runtime-Dvx229IG.js"
"houseplan-assets/zigbee-topology-runtime-D1hCsInw.js"
]
},
{
"path": "houseplan-assets/houseplan-onboarding-runtime-DQQls19P.js",
"sha256": "5b4e62bc117fc92d8b729030c3dc473122039df7b68087cf0376a643eacbd9e6",
"path": "houseplan-assets/houseplan-onboarding-runtime-8y08OhqH.js",
"sha256": "3cc7f96f2f1f2f7bc599eddc08259ead9a1988f6ee430e6b55e2ab29a4567fcd",
"rawBytes": 28088,
"gzipBytes": 6958,
"gzipBytes": 6956,
"isEntry": false,
"imports": [
"houseplan-assets/backdrop-pick-CJW_7B5r.js",
"houseplan-assets/houseplan-card-C7v6ZaXI.js"
"houseplan-assets/backdrop-pick-Duf1Bdh6.js",
"houseplan-assets/houseplan-card-BPjCRsTo.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/hp-zigbee-topology-overlay-D-a7FHcb.js",
"sha256": "4ecb15d8107ad4df4f19f7e79533ac0a9d7c7689f2717bc8826eea7b5bac09a6",
"path": "houseplan-assets/hp-zigbee-topology-overlay-CAtxncsA.js",
"sha256": "9d4a14157ef14fc6bdf3fdb9f5c631a59b8badea973fb492b3084a1e0cfbcf7f",
"rawBytes": 8626,
"gzipBytes": 3235,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-C7v6ZaXI.js",
"houseplan-assets/zigbee-topology-runtime-Dvx229IG.js",
"houseplan-assets/zigbee-topology-tpWwm6RD.js"
"houseplan-assets/houseplan-card-BPjCRsTo.js",
"houseplan-assets/zigbee-topology-OesQErJ9.js",
"houseplan-assets/zigbee-topology-runtime-D1hCsInw.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/live-interaction-runtime-DSM24Tou.js",
"sha256": "bb134dbd7d66d9bbff2cb577c45590b06a432cd9f96f8a5c954b1dd4885be20a",
"path": "houseplan-assets/live-interaction-runtime-CrPD9yL6.js",
"sha256": "eb857c35a83da4fbbec97eb73cfb512274735db10e997ff61828ad6aa4c7ed7e",
"rawBytes": 5196,
"gzipBytes": 2127,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-C7v6ZaXI.js"
"houseplan-assets/houseplan-card-BPjCRsTo.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/zigbee-topology-runtime-Dvx229IG.js",
"sha256": "bff66c639d375243863dc2db9a7ca99430346eea79c990b651393c5ed582dde8",
"path": "houseplan-assets/zigbee-topology-OesQErJ9.js",
"sha256": "b22a1723c06f787f7c8512ac031c98eaf1a76ce3ef0182de48a65366b4fd7b4b",
"rawBytes": 15135,
"gzipBytes": 5739,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-BPjCRsTo.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/zigbee-topology-runtime-D1hCsInw.js",
"sha256": "67a225b4f8267dd2d3233fa5071448b233aa900405b2d3dfbce1a570bc04881f",
"rawBytes": 3941,
"gzipBytes": 1761,
"gzipBytes": 1763,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-C7v6ZaXI.js",
"houseplan-assets/zigbee-topology-tpWwm6RD.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/zigbee-topology-tpWwm6RD.js",
"sha256": "a2604893361f5d7d3a2c6c99dd21d38fcd5df6f9bb5965c89db95d6fa00bd7df",
"rawBytes": 15046,
"gzipBytes": 5717,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-C7v6ZaXI.js"
"houseplan-assets/houseplan-card-BPjCRsTo.js",
"houseplan-assets/zigbee-topology-OesQErJ9.js"
],
"dynamicImports": []
},
{
"path": "houseplan-card.js",
"sha256": "fa6fc2603eebd049d2c26059d6138707c7c6b53d9cf5229cc4fa4048f334b60f",
"sha256": "02ece7d8bc4d5ff924159e80dbed70959bd7b39bc55932f3599c50f01dad32f9",
"rawBytes": 1183,
"gzipBytes": 796,
"gzipBytes": 795,
"isEntry": true,
"imports": [
"houseplan-assets/houseplan-card-C7v6ZaXI.js"
"houseplan-assets/houseplan-card-BPjCRsTo.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,4 +1,4 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="4ee1af967e8c303dcc691e9d85991cfec23c0787b69a7a4790eea2084797a225";import{v as e,l as o,z as t,dt as s,A as a,du as i,dv as l,dw as n,E as r,c}from"./houseplan-card-C7v6ZaXI.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
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="b2baa797361b836964adc96221eabf4f8e9123b02ae55fe32b18f4d4662a8e9c";import{v as e,l as o,z as t,dt as s,A as a,du as i,dv as l,dw as n,E as r,c}from"./houseplan-card-BPjCRsTo.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}
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__="4ee1af967e8c303dcc691e9d85991cfec23c0787b69a7a4790eea2084797a225";import{l as t,a$ as s,A as e,z as o,c as a,cj as l,ck as i,cl as h,cm as c,aY as n,cn as r,cs as p,co as _,cp as d,cq as u,cr as g,dj as m,aX as b,aZ as $,dk as v}from"./houseplan-card-C7v6ZaXI.js";import{i as f,c as y,e as w,r as D,a as k,b as S,g as C,t as M}from"./backdrop-pick-CJW_7B5r.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="4ee1af967e8c303dcc691e9d85991cfec23c0787b69a7a4790eea2084797a225";class L{constructor(t){this.host=t,this._toggleServerPlans=async()=>{const t=this.host._spaceDialog;if(t)if(t.pickSaved)this.host._spaceDialog={...t,pickSaved:!1};else{this.host._spaceDialog={...t,pickSaved:!0,savedBusy:!0};try{const t=await this.host.hass.callWS({type:"houseplan/plans/list"}),s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:t?.plans||[],savedBusy:!1})}catch(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:[],savedBusy:!1}),this.host._showToast(this.host._t("toast.plans_list_failed",{err:this.host._errText(t)}))}}}}_help(l){const i=`${l}.aria`,h=t(this.host.hass,this.host._config?.language);return s(h,l)&&s(h,i)?a`<hp-help data-help-key=${l}
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="b2baa797361b836964adc96221eabf4f8e9123b02ae55fe32b18f4d4662a8e9c";import{l as t,a$ as s,A as e,z as o,c as a,cj as l,ck as i,cl as h,cm as c,aY as n,cn as r,cs as p,co as _,cp as d,cq as u,cr as g,dj as m,aX as b,aZ as $,dk as v}from"./houseplan-card-BPjCRsTo.js";import{i as f,c as y,e as w,r as D,a as k,b as S,g as C,t as M}from"./backdrop-pick-Duf1Bdh6.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="b2baa797361b836964adc96221eabf4f8e9123b02ae55fe32b18f4d4662a8e9c";class L{constructor(t){this.host=t,this._toggleServerPlans=async()=>{const t=this.host._spaceDialog;if(t)if(t.pickSaved)this.host._spaceDialog={...t,pickSaved:!1};else{this.host._spaceDialog={...t,pickSaved:!0,savedBusy:!0};try{const t=await this.host.hass.callWS({type:"houseplan/plans/list"}),s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:t?.plans||[],savedBusy:!1})}catch(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:[],savedBusy:!1}),this.host._showToast(this.host._t("toast.plans_list_failed",{err:this.host._errText(t)}))}}}}_help(l){const i=`${l}.aria`,h=t(this.host.hass,this.host._config?.language);return s(h,l)&&s(h,i)?a`<hp-help data-help-key=${l}
.text=${o(h,l)} .ariaLabel=${o(h,i)}></hp-help>`:e}_openSpaceDialog(t,s){if(!this.host._serverStorage||!this.host._serverCfg)return void this.host._showToast(this.host._t("toast.integration_missing"));if("edit"===t){const e=this.host._serverCfg.spaces.find(t=>t.id===s);if(!e)return;const o=l(e),a=e.settings?.custom_fill&&"object"==typeof e.settings.custom_fill?i(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:r(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:n({},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:c(Number(e.cell_cm)>0?Number(e.cell_cm):5,this.host._imperial),cellCmTouched:!1,busy:!1})}const e=p(this.host._imperial);this.host._spaceDialog={mode:t,title:"",planUrl:null,planFile:null,...f(),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:d,tempMax:_,showLqi:this.host._config?.show_signal??!0,cardFontScale:1,labelTemp:!1,labelHum:!1,labelLqi:!1,labelLight:!1,cellCm:e,cellCmInput:c(e,this.host._imperial),cellCmTouched:!1,busy:!1}}async _pickPlanFile(t){const s=t.target,e=s.files?.[0];if(!e||!this.host._spaceDialog)return;s.value="";const o=await y(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 w(e,o.ext,e.name);this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:a})}_renderBackdropGuard(){return D(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,l=a?.saved?.find(s=>s.name===t);if(o&&a&&l&&l.url===e.url&&l.modified===e.modified&&!l.used_by.length&&l.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 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="4ee1af967e8c303dcc691e9d85991cfec23c0787b69a7a4790eea2084797a225";import{n as t,b as n}from"./zigbee-topology-tpWwm6RD.js";import{I as e}from"./houseplan-card-C7v6ZaXI.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__="b2baa797361b836964adc96221eabf4f8e9123b02ae55fe32b18f4d4662a8e9c";import{n as t,b as n}from"./zigbee-topology-OesQErJ9.js";import{I as e}from"./houseplan-card-BPjCRsTo.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__="4ee1af967e8c303dcc691e9d85991cfec23c0787b69a7a4790eea2084797a225";try{await import("./houseplan-assets/houseplan-card-C7v6ZaXI.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__="b2baa797361b836964adc96221eabf4f8e9123b02ae55fe32b18f4d4662a8e9c";try{await import("./houseplan-assets/houseplan-card-BPjCRsTo.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)}
+11
View File
@@ -5837,6 +5837,17 @@ const MUTANT_DEFINITIONS = [
replace: ' try { void unsubscribe; } catch { /* cleanup is best effort */ }',
}],
},
{
id: 'zigbee-route-relationship-separators-normalized',
guard: 'node --test --test-name-pattern="Z2M relationship strings" test/zigbee-topology.test.mjs',
because: 'provider relationship strings must ignore separators before the parent tie-break '
+ 'uses them (#457 section 6.3 and code-review r1)',
patches: [{
file: 'src/zigbee-topology.ts',
find: " const compact = value.trim().toLowerCase().replace(/[\\s_-]+/g, '');",
replace: " const compact = value.trim().toLowerCase();",
}],
},
{
id: 'zigbee-route-parent-keeps-bfs-level',
guard: 'node --test --test-name-pattern="uplink tree is deterministic" test/zigbee-topology.test.mjs',
+3 -2
View File
@@ -111,8 +111,9 @@ const Z2M_RELATIONSHIPS = ['parent', 'child', 'sibling', 'none', 'previous_child
function relationshipOf(value: unknown): string | undefined {
if (typeof value === 'number') return Z2M_RELATIONSHIPS[value];
return typeof value === 'string'
? value.trim().toLowerCase().slice(0, 40) || undefined : undefined;
if (typeof value !== 'string') return undefined;
const compact = value.trim().toLowerCase().replace(/[\s_-]+/g, '');
return compact === 'previouschild' ? 'previous_child' : compact.slice(0, 40) || undefined;
}
function observation(value: unknown): ZigbeeDirectionalObservation {
+17
View File
@@ -112,6 +112,23 @@ test('Z2M normalization keeps snake_case compatibility and prefers flat link IEE
assert.ok(topology.warnings.some((item) => item.code === 'self_link'));
});
test('Z2M relationship strings ignore case and separators', () => {
const topology = normalizeZ2mTopology({ data: { value: JSON.stringify({
nodes: [
{ ieeeAddr: '00124b0000000001', type: 'Coordinator' },
{ ieeeAddr: '00124b0000000002', type: 'Router' },
{ ieeeAddr: '00124b0000000003', type: 'EndDevice' },
],
links: [
{ sourceIeeeAddr: '00124b0000000001', targetIeeeAddr: '00124b0000000002',
relationship: ' PREVIOUS-child ' },
{ sourceIeeeAddr: '00124b0000000002', targetIeeeAddr: '00124b0000000003',
relationship: ' P_a-r ent ' },
],
}) } }, 'zigbee2mqtt');
assert.deepEqual(topology.links.map((link) => link.aToB.relationship), ['previous_child', 'parent']);
});
test('exact device/entity mapping yields local lines and a deduplicated remote count', () => {
const topology = normalizeZhaTopology([
{ ieee: '00124b0000000001', device_reg_id: 'da', neighbors: [