mirror of
https://github.com/Matysh/houseplan-card
synced 2026-09-29 03:09:36 +00:00
@@ -51,7 +51,7 @@ SCHEDULED_GRACE_S = 30 * 24 * 3600
|
||||
FILES_DIR = "houseplan/files"
|
||||
ASSETS_DIR = "houseplan/assets"
|
||||
CONF_ADMIN_ONLY = "admin_only"
|
||||
VERSION = "1.72.0-beta.2"
|
||||
VERSION = "1.72.0-beta.3"
|
||||
DECOR_ASSETS_API_VERSION = 1
|
||||
|
||||
# #43: the support transport is deliberately not configurable. A user supplied
|
||||
|
||||
@@ -1,182 +1,182 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"fingerprint": "71049c6ab3188a66c7112a997ed0f56cdd5e60d90668049e62f53c7c7e022ae7",
|
||||
"fingerprint": "e7c2adf422d4fedfe2d4b29c74727ae74dd46823436e7da9250a4777b1ba7418",
|
||||
"entry": "houseplan-card.js",
|
||||
"initialViewFiles": [
|
||||
"houseplan-assets/houseplan-card-Csq_DR2Y.js",
|
||||
"houseplan-assets/houseplan-card-Dzad_CGf.js",
|
||||
"houseplan-card.js"
|
||||
],
|
||||
"initialViewGzipBytes": 296722,
|
||||
"initialViewGzipBytes": 296719,
|
||||
"lazyFiles": [
|
||||
"houseplan-assets/backdrop-pick-CEZBr4qx.js",
|
||||
"houseplan-assets/de-DR62x0IQ.js",
|
||||
"houseplan-assets/editor-BVOuJXsz.js",
|
||||
"houseplan-assets/fr-D4YIJQhT.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-C5_zNXOu.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-C0Zl7v7b.js",
|
||||
"houseplan-assets/hp-zigbee-topology-overlay-CnCZWJj6.js",
|
||||
"houseplan-assets/live-interaction-runtime-C2JvTP_O.js",
|
||||
"houseplan-assets/zigbee-topology-D9L1ESh4.js",
|
||||
"houseplan-assets/zigbee-topology-runtime-DUxfg4Z9.js"
|
||||
"houseplan-assets/backdrop-pick-DMkLFHkR.js",
|
||||
"houseplan-assets/de-Cr-89HP-.js",
|
||||
"houseplan-assets/editor-CJNTjUIy.js",
|
||||
"houseplan-assets/fr-DKZ8hWr9.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-CVoz67fJ.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-D3aymMlw.js",
|
||||
"houseplan-assets/hp-zigbee-topology-overlay-DzOph_RS.js",
|
||||
"houseplan-assets/live-interaction-runtime-eQAnQ-sE.js",
|
||||
"houseplan-assets/zigbee-topology-c40qIaLR.js",
|
||||
"houseplan-assets/zigbee-topology-runtime-fETRrPi1.js"
|
||||
],
|
||||
"lazyGzipBytes": 240676,
|
||||
"lazyGzipBytes": 240647,
|
||||
"lazyEditorFiles": [
|
||||
"houseplan-assets/backdrop-pick-CEZBr4qx.js",
|
||||
"houseplan-assets/editor-BVOuJXsz.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-C5_zNXOu.js",
|
||||
"houseplan-assets/zigbee-topology-D9L1ESh4.js"
|
||||
"houseplan-assets/backdrop-pick-DMkLFHkR.js",
|
||||
"houseplan-assets/editor-CJNTjUIy.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-CVoz67fJ.js",
|
||||
"houseplan-assets/zigbee-topology-c40qIaLR.js"
|
||||
],
|
||||
"lazyEditorGzipBytes": 178334,
|
||||
"lazyEditorGzipBytes": 178325,
|
||||
"lazyOnboardingFiles": [
|
||||
"houseplan-assets/backdrop-pick-CEZBr4qx.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-C0Zl7v7b.js"
|
||||
"houseplan-assets/backdrop-pick-DMkLFHkR.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-D3aymMlw.js"
|
||||
],
|
||||
"lazyOnboardingGzipBytes": 14241,
|
||||
"lazyLocaleFiles": [
|
||||
"houseplan-assets/de-DR62x0IQ.js",
|
||||
"houseplan-assets/fr-D4YIJQhT.js"
|
||||
"houseplan-assets/de-Cr-89HP-.js",
|
||||
"houseplan-assets/fr-DKZ8hWr9.js"
|
||||
],
|
||||
"lazyLocaleGzipBytes": 49115,
|
||||
"lazyLocaleGzipBytes": 49104,
|
||||
"files": [
|
||||
{
|
||||
"path": "houseplan-assets/backdrop-pick-CEZBr4qx.js",
|
||||
"sha256": "709ac3421f7630a539c5c1c27248b39f76e6d9d2b54b75057abb0b4af70bc844",
|
||||
"path": "houseplan-assets/backdrop-pick-DMkLFHkR.js",
|
||||
"sha256": "384450870956f8ca5a72cf2d8d07dc88d87f92c6881ae7e88dc18695d0aca575",
|
||||
"rawBytes": 21417,
|
||||
"gzipBytes": 7282,
|
||||
"gzipBytes": 7281,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-Csq_DR2Y.js"
|
||||
"houseplan-assets/houseplan-card-Dzad_CGf.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/de-DR62x0IQ.js",
|
||||
"sha256": "0377277d00b6e025e587aa7404a3cecea12c56d873fa9741680a4ab246914d09",
|
||||
"path": "houseplan-assets/de-Cr-89HP-.js",
|
||||
"sha256": "3424417404f8b253837205e5b78c734c9bfd5730d0f6c69b117a8412503ea256",
|
||||
"rawBytes": 82182,
|
||||
"gzipBytes": 24827,
|
||||
"gzipBytes": 24821,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/editor-BVOuJXsz.js",
|
||||
"sha256": "efde2f9d2f8bc1f5fb961bb3c57feb8a291018f2871c4c068ab60bae58106446",
|
||||
"path": "houseplan-assets/editor-CJNTjUIy.js",
|
||||
"sha256": "ca584266dd1a4c030504fdfbf3b6e5fa685fd16843fcb3102d4ec43ac8e76a59",
|
||||
"rawBytes": 3831,
|
||||
"gzipBytes": 1583,
|
||||
"gzipBytes": 1581,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-Csq_DR2Y.js"
|
||||
"houseplan-assets/houseplan-card-Dzad_CGf.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/fr-D4YIJQhT.js",
|
||||
"sha256": "e5c0ff025e2826a8a43b53e6af22c7314a5b72effd2b41d7cfd38a128f998925",
|
||||
"path": "houseplan-assets/fr-DKZ8hWr9.js",
|
||||
"sha256": "9e978437d010589c9f0c29889f27077bc2ac39501d955e0f455eccfc1fcc35b4",
|
||||
"rawBytes": 84312,
|
||||
"gzipBytes": 24288,
|
||||
"gzipBytes": 24283,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-card-Csq_DR2Y.js",
|
||||
"sha256": "2751d48b52d10030532b2de87f0f0c7f38c283223bae57c8728b2717b115c353",
|
||||
"path": "houseplan-assets/houseplan-card-Dzad_CGf.js",
|
||||
"sha256": "97483ed191736bdd71f6f7969afac2ce35cd8b9fdc11b7de453e0d5c135994df",
|
||||
"rawBytes": 1053904,
|
||||
"gzipBytes": 295925,
|
||||
"gzipBytes": 295926,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": [
|
||||
"houseplan-assets/de-DR62x0IQ.js",
|
||||
"houseplan-assets/editor-BVOuJXsz.js",
|
||||
"houseplan-assets/fr-D4YIJQhT.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-C5_zNXOu.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-C0Zl7v7b.js",
|
||||
"houseplan-assets/hp-zigbee-topology-overlay-CnCZWJj6.js",
|
||||
"houseplan-assets/live-interaction-runtime-C2JvTP_O.js"
|
||||
"houseplan-assets/de-Cr-89HP-.js",
|
||||
"houseplan-assets/editor-CJNTjUIy.js",
|
||||
"houseplan-assets/fr-DKZ8hWr9.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-CVoz67fJ.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-D3aymMlw.js",
|
||||
"houseplan-assets/hp-zigbee-topology-overlay-DzOph_RS.js",
|
||||
"houseplan-assets/live-interaction-runtime-eQAnQ-sE.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-editor-runtime-C5_zNXOu.js",
|
||||
"sha256": "db3ca36d567fb682fb633555bdfa963db0d2f5e9682c1532bdf6ef81c17591fc",
|
||||
"path": "houseplan-assets/houseplan-editor-runtime-CVoz67fJ.js",
|
||||
"sha256": "46fc38e58a35df471132386af3898a558d0f02e1c0350d2997edcdcdd0e32183",
|
||||
"rawBytes": 622491,
|
||||
"gzipBytes": 164622,
|
||||
"gzipBytes": 164620,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/backdrop-pick-CEZBr4qx.js",
|
||||
"houseplan-assets/houseplan-card-Csq_DR2Y.js",
|
||||
"houseplan-assets/zigbee-topology-D9L1ESh4.js"
|
||||
"houseplan-assets/backdrop-pick-DMkLFHkR.js",
|
||||
"houseplan-assets/houseplan-card-Dzad_CGf.js",
|
||||
"houseplan-assets/zigbee-topology-c40qIaLR.js"
|
||||
],
|
||||
"dynamicImports": [
|
||||
"houseplan-assets/zigbee-topology-runtime-DUxfg4Z9.js"
|
||||
"houseplan-assets/zigbee-topology-runtime-fETRrPi1.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-onboarding-runtime-C0Zl7v7b.js",
|
||||
"sha256": "bb156e1a1244328a728875141ddf47d2ebe0d1e12e763eb1336e2f72837bcfaf",
|
||||
"path": "houseplan-assets/houseplan-onboarding-runtime-D3aymMlw.js",
|
||||
"sha256": "85dfe77718c0ae7b1f8d9e23facc0f7d2670303237b4489af0b3455ce4fbdea8",
|
||||
"rawBytes": 28088,
|
||||
"gzipBytes": 6959,
|
||||
"gzipBytes": 6960,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/backdrop-pick-CEZBr4qx.js",
|
||||
"houseplan-assets/houseplan-card-Csq_DR2Y.js"
|
||||
"houseplan-assets/backdrop-pick-DMkLFHkR.js",
|
||||
"houseplan-assets/houseplan-card-Dzad_CGf.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/hp-zigbee-topology-overlay-CnCZWJj6.js",
|
||||
"sha256": "aac582f8d2e0586aeed749ff9581f1fb7d11bb15493cc939bd37b61f903c05aa",
|
||||
"path": "houseplan-assets/hp-zigbee-topology-overlay-DzOph_RS.js",
|
||||
"sha256": "44b33d85c3783c1317469c33979c9546f4b819065859a5e0bd95ac6a9ff5b4a0",
|
||||
"rawBytes": 6006,
|
||||
"gzipBytes": 2376,
|
||||
"gzipBytes": 2371,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-Csq_DR2Y.js",
|
||||
"houseplan-assets/zigbee-topology-D9L1ESh4.js",
|
||||
"houseplan-assets/zigbee-topology-runtime-DUxfg4Z9.js"
|
||||
"houseplan-assets/houseplan-card-Dzad_CGf.js",
|
||||
"houseplan-assets/zigbee-topology-c40qIaLR.js",
|
||||
"houseplan-assets/zigbee-topology-runtime-fETRrPi1.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/live-interaction-runtime-C2JvTP_O.js",
|
||||
"sha256": "91e8a03ebb3fb35b89c974e2bcf3ee1eff8523f9d9cb1ac93a061c3f751706d1",
|
||||
"path": "houseplan-assets/live-interaction-runtime-eQAnQ-sE.js",
|
||||
"sha256": "20b7763e70a6839fc11ad95edae4032c6f6159d0fa408d7a5bfa50dfbd0ca1eb",
|
||||
"rawBytes": 5196,
|
||||
"gzipBytes": 2128,
|
||||
"gzipBytes": 2126,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-Csq_DR2Y.js"
|
||||
"houseplan-assets/houseplan-card-Dzad_CGf.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/zigbee-topology-D9L1ESh4.js",
|
||||
"sha256": "817e5b42008db12cdf922275098eb06a536408dbd01f464859dccee434c2451b",
|
||||
"path": "houseplan-assets/zigbee-topology-c40qIaLR.js",
|
||||
"sha256": "6d9b329b0e56a525638ba11f388638ad583c94e61c361484d4ba6f85ad6c2732",
|
||||
"rawBytes": 12382,
|
||||
"gzipBytes": 4847,
|
||||
"gzipBytes": 4843,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-Csq_DR2Y.js"
|
||||
"houseplan-assets/houseplan-card-Dzad_CGf.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/zigbee-topology-runtime-DUxfg4Z9.js",
|
||||
"sha256": "8197d48ba2f6eb615024f0cabca6ff12c10a3442fa19ebcd536bd5d3d5586c34",
|
||||
"path": "houseplan-assets/zigbee-topology-runtime-fETRrPi1.js",
|
||||
"sha256": "1c93cc0b92ad7a44c9cbd6c9bab9fded6f21fbb4d6e194befe260eed3fb4c466",
|
||||
"rawBytes": 3941,
|
||||
"gzipBytes": 1764,
|
||||
"gzipBytes": 1761,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-Csq_DR2Y.js",
|
||||
"houseplan-assets/zigbee-topology-D9L1ESh4.js"
|
||||
"houseplan-assets/houseplan-card-Dzad_CGf.js",
|
||||
"houseplan-assets/zigbee-topology-c40qIaLR.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-card.js",
|
||||
"sha256": "dbba45693954cf08e2165d88bdcb9e5c295d3782fe5fae9943e079e22135e22c",
|
||||
"sha256": "26075a61cfd33425279f0906c3e9d2d4a6ca5992ebb58da65f7a83aa79ac79b1",
|
||||
"rawBytes": 1183,
|
||||
"gzipBytes": 797,
|
||||
"gzipBytes": 793,
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-Csq_DR2Y.js"
|
||||
"houseplan-assets/houseplan-card-Dzad_CGf.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
}
|
||||
|
||||
+7
-7
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,4 +1,4 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="71049c6ab3188a66c7112a997ed0f56cdd5e60d90668049e62f53c7c7e022ae7";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-Csq_DR2Y.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__="e7c2adf422d4fedfe2d4b29c74727ae74dd46823436e7da9250a4777b1ba7418";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-Dzad_CGf.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}
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+56
-56
File diff suppressed because one or more lines are too long
+3
-3
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,4 +1,4 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="71049c6ab3188a66c7112a997ed0f56cdd5e60d90668049e62f53c7c7e022ae7";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 d,cp as _,cq as u,cr as g,dj as m,aX as b,aZ as $,dk as v}from"./houseplan-card-Csq_DR2Y.js";import{i as f,c as y,e as w,r as D,a as k,b as S,d as C,t as M}from"./backdrop-pick-CEZBr4qx.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="71049c6ab3188a66c7112a997ed0f56cdd5e60d90668049e62f53c7c7e022ae7";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__="e7c2adf422d4fedfe2d4b29c74727ae74dd46823436e7da9250a4777b1ba7418";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 d,cp as _,cq as u,cr as g,dj as m,aX as b,aZ as $,dk as v}from"./houseplan-card-Dzad_CGf.js";import{i as f,c as y,e as w,r as D,a as k,b as S,d as C,t as M}from"./backdrop-pick-DMkLFHkR.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="e7c2adf422d4fedfe2d4b29c74727ae74dd46823436e7da9250a4777b1ba7418";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:_,tempMax:d,showLqi:this.host._config?.show_signal??!0,cardFontScale:1,labelTemp:!1,labelHum:!1,labelLqi:!1,labelLight:!1,cellCm:e,cellCmInput:c(e,this.host._imperial),cellCmTouched:!1,busy:!1}}async _pickPlanFile(t){const s=t.target,e=s.files?.[0];if(!e||!this.host._spaceDialog)return;s.value="";const 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
@@ -1,4 +1,4 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="71049c6ab3188a66c7112a997ed0f56cdd5e60d90668049e62f53c7c7e022ae7";import{v as e,A as t,dx as i,w as s,c as o,l as r,u as n}from"./houseplan-card-Csq_DR2Y.js";import{a,r as h,t as d}from"./zigbee-topology-D9L1ESh4.js";import{zigbeeTopologyRuntimeSnapshot as p,subscribeZigbeeTopology as c}from"./zigbee-topology-runtime-DUxfg4Z9.js";const l={revision:0,topologies:[],states:{}};class v extends e{constructor(){super(...arguments),this.devices=[],this.currentSpace="",this._runtime=l,this._hovered="",this._pointerOver=e=>{if(!this._mouseAllowed(e))return void this._clear();const t=this._deviceFromEvent(e),i=t?.dataset.id||"";i&&i!==this._hovered&&(this._hovered=i,this.requestUpdate())},this._pointerOut=e=>{const t=this._deviceFromEvent(e);if(!t||t.dataset.id!==this._hovered)return;const i=e.relatedTarget instanceof Element?e.relatedTarget.closest('[data-hp="device"]'):null;i?.dataset.id!==this._hovered&&this._clear()},this._pointerDown=e=>{"mouse"!==e.pointerType&&this._clear()}}connectedCallback(){super.connectedCallback();const e=this.getRootNode();e.host&&"undefined"!=typeof MutationObserver&&(this._hoverGateObserver=new MutationObserver(()=>{e.host.hasAttribute("data-pointer-hover")||this._clear()}),this._hoverGateObserver.observe(e.host,{attributes:!0,attributeFilter:["data-pointer-hover"]})),queueMicrotask(()=>this._connectParent())}disconnectedCallback(){this._release?.(),this._release=void 0,this._disconnectParent(),this._hoverGateObserver?.disconnect(),this._hoverGateObserver=void 0,this._hovered="",super.disconnectedCallback()}updated(e){e.has("hass")&&(this._release?.(),this._runtime=p(this.hass),this._mappedMemo=void 0,this._release=c(this.hass,()=>{this._runtime=p(this.hass),this._mappedMemo=void 0,this.requestUpdate()})),(e.has("currentSpace")||e.has("devices")||e.has("registry"))&&(this._mappedMemo=void 0,this.devices.some(e=>e.id===this._hovered&&e.space===this.currentSpace)||(this._hovered=""))}_connectParent(){const e=this.parentElement;e&&e!==this._parent&&(this._disconnectParent(),this._parent=e,e.addEventListener("pointerover",this._pointerOver),e.addEventListener("pointerout",this._pointerOut),e.addEventListener("pointerdown",this._pointerDown,!0))}_disconnectParent(){this._parent?.removeEventListener("pointerover",this._pointerOver),this._parent?.removeEventListener("pointerout",this._pointerOut),this._parent?.removeEventListener("pointerdown",this._pointerDown,!0),this._parent=void 0}_deviceFromEvent(e){for(const t of e.composedPath())if(t instanceof HTMLElement&&"device"===t.dataset.hp)return t;return null}_mouseAllowed(e){const t=this.getRootNode();return"mouse"===e.pointerType&&t.host?.hasAttribute?.("data-pointer-hover")}_clear(){this._hovered&&(this._hovered="",this.requestUpdate())}_position(e){const t=[...this._parent?.querySelectorAll(".dev[data-id]")||[]].find(t=>t.dataset.id===e);if(!t)return null;const i=Number.parseFloat(t.style.left),s=Number.parseFloat(t.style.top),o=t.getBoundingClientRect();return Number.isFinite(i)&&Number.isFinite(s)?{x:i,y:s,width:o.width,height:o.height}:null}render(){if(!this._hovered||!this.registry||!this._runtime.topologies.length)return t;const e=this._mappedMemo,n=e&&e.runtime===this._runtime&&e.devices===this.devices&&e.registry===this.registry?e.mapped:a(this._runtime.topologies,this.devices,this.registry);e&&n===e.mapped||(this._mappedMemo={runtime:this._runtime,devices:this.devices,registry:this.registry,mapped:n});const p=h(n,this.currentSpace,this._hovered),c=this._position(this._hovered);if(!c)return t;const l=p.lines.map(e=>({...e,point:this._position(e.neighborMarkerId)})).filter(e=>!!e.point);return o`
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="e7c2adf422d4fedfe2d4b29c74727ae74dd46823436e7da9250a4777b1ba7418";import{v as e,A as t,dx as i,w as s,c as o,l as r,u as n}from"./houseplan-card-Dzad_CGf.js";import{a,r as h,t as d}from"./zigbee-topology-c40qIaLR.js";import{zigbeeTopologyRuntimeSnapshot as p,subscribeZigbeeTopology as c}from"./zigbee-topology-runtime-fETRrPi1.js";const l={revision:0,topologies:[],states:{}};class v extends e{constructor(){super(...arguments),this.devices=[],this.currentSpace="",this._runtime=l,this._hovered="",this._pointerOver=e=>{if(!this._mouseAllowed(e))return void this._clear();const t=this._deviceFromEvent(e),i=t?.dataset.id||"";i&&i!==this._hovered&&(this._hovered=i,this.requestUpdate())},this._pointerOut=e=>{const t=this._deviceFromEvent(e);if(!t||t.dataset.id!==this._hovered)return;const i=e.relatedTarget instanceof Element?e.relatedTarget.closest('[data-hp="device"]'):null;i?.dataset.id!==this._hovered&&this._clear()},this._pointerDown=e=>{"mouse"!==e.pointerType&&this._clear()}}connectedCallback(){super.connectedCallback();const e=this.getRootNode();e.host&&"undefined"!=typeof MutationObserver&&(this._hoverGateObserver=new MutationObserver(()=>{e.host.hasAttribute("data-pointer-hover")||this._clear()}),this._hoverGateObserver.observe(e.host,{attributes:!0,attributeFilter:["data-pointer-hover"]})),queueMicrotask(()=>this._connectParent())}disconnectedCallback(){this._release?.(),this._release=void 0,this._disconnectParent(),this._hoverGateObserver?.disconnect(),this._hoverGateObserver=void 0,this._hovered="",super.disconnectedCallback()}updated(e){e.has("hass")&&(this._release?.(),this._runtime=p(this.hass),this._mappedMemo=void 0,this._release=c(this.hass,()=>{this._runtime=p(this.hass),this._mappedMemo=void 0,this.requestUpdate()})),(e.has("currentSpace")||e.has("devices")||e.has("registry"))&&(this._mappedMemo=void 0,this.devices.some(e=>e.id===this._hovered&&e.space===this.currentSpace)||(this._hovered=""))}_connectParent(){const e=this.parentElement;e&&e!==this._parent&&(this._disconnectParent(),this._parent=e,e.addEventListener("pointerover",this._pointerOver),e.addEventListener("pointerout",this._pointerOut),e.addEventListener("pointerdown",this._pointerDown,!0))}_disconnectParent(){this._parent?.removeEventListener("pointerover",this._pointerOver),this._parent?.removeEventListener("pointerout",this._pointerOut),this._parent?.removeEventListener("pointerdown",this._pointerDown,!0),this._parent=void 0}_deviceFromEvent(e){for(const t of e.composedPath())if(t instanceof HTMLElement&&"device"===t.dataset.hp)return t;return null}_mouseAllowed(e){const t=this.getRootNode();return"mouse"===e.pointerType&&t.host?.hasAttribute?.("data-pointer-hover")}_clear(){this._hovered&&(this._hovered="",this.requestUpdate())}_position(e){const t=[...this._parent?.querySelectorAll(".dev[data-id]")||[]].find(t=>t.dataset.id===e);if(!t)return null;const i=Number.parseFloat(t.style.left),s=Number.parseFloat(t.style.top),o=t.getBoundingClientRect();return Number.isFinite(i)&&Number.isFinite(s)?{x:i,y:s,width:o.width,height:o.height}:null}render(){if(!this._hovered||!this.registry||!this._runtime.topologies.length)return t;const e=this._mappedMemo,n=e&&e.runtime===this._runtime&&e.devices===this.devices&&e.registry===this.registry?e.mapped:a(this._runtime.topologies,this.devices,this.registry);e&&n===e.mapped||(this._mappedMemo={runtime:this._runtime,devices:this.devices,registry:this.registry,mapped:n});const p=h(n,this.currentSpace,this._hovered),c=this._position(this._hovered);if(!c)return t;const l=p.lines.map(e=>({...e,point:this._position(e.neighborMarkerId)})).filter(e=>!!e.point);return o`
|
||||
${l.length?s`<svg viewBox="0 0 100 100" preserveAspectRatio="none"
|
||||
aria-hidden="true" data-hp="zigbee-topology-lines">
|
||||
${l.map(e=>s`<line x1=${c.x} y1=${c.y}
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="71049c6ab3188a66c7112a997ed0f56cdd5e60d90668049e62f53c7c7e022ae7";import{n as t,b as n}from"./zigbee-topology-D9L1ESh4.js";import{I as e}from"./houseplan-card-Csq_DR2Y.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__="e7c2adf422d4fedfe2d4b29c74727ae74dd46823436e7da9250a4777b1ba7418";import{n as t,b as n}from"./zigbee-topology-c40qIaLR.js";import{I as e}from"./houseplan-card-Dzad_CGf.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__="71049c6ab3188a66c7112a997ed0f56cdd5e60d90668049e62f53c7c7e022ae7";try{await import("./houseplan-assets/houseplan-card-Csq_DR2Y.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__="e7c2adf422d4fedfe2d4b29c74727ae74dd46823436e7da9250a4777b1ba7418";try{await import("./houseplan-assets/houseplan-card-Dzad_CGf.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)}
|
||||
|
||||
@@ -16,5 +16,5 @@
|
||||
"issue_tracker": "https://github.com/Matysh/houseplan-card/issues",
|
||||
"requirements": [],
|
||||
"single_config_entry": true,
|
||||
"version": "1.72.0-beta.2"
|
||||
"version": "1.72.0-beta.3"
|
||||
}
|
||||
|
||||
Vendored
+82
-82
@@ -1,182 +1,182 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"fingerprint": "71049c6ab3188a66c7112a997ed0f56cdd5e60d90668049e62f53c7c7e022ae7",
|
||||
"fingerprint": "e7c2adf422d4fedfe2d4b29c74727ae74dd46823436e7da9250a4777b1ba7418",
|
||||
"entry": "houseplan-card.js",
|
||||
"initialViewFiles": [
|
||||
"houseplan-assets/houseplan-card-Csq_DR2Y.js",
|
||||
"houseplan-assets/houseplan-card-Dzad_CGf.js",
|
||||
"houseplan-card.js"
|
||||
],
|
||||
"initialViewGzipBytes": 296722,
|
||||
"initialViewGzipBytes": 296719,
|
||||
"lazyFiles": [
|
||||
"houseplan-assets/backdrop-pick-CEZBr4qx.js",
|
||||
"houseplan-assets/de-DR62x0IQ.js",
|
||||
"houseplan-assets/editor-BVOuJXsz.js",
|
||||
"houseplan-assets/fr-D4YIJQhT.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-C5_zNXOu.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-C0Zl7v7b.js",
|
||||
"houseplan-assets/hp-zigbee-topology-overlay-CnCZWJj6.js",
|
||||
"houseplan-assets/live-interaction-runtime-C2JvTP_O.js",
|
||||
"houseplan-assets/zigbee-topology-D9L1ESh4.js",
|
||||
"houseplan-assets/zigbee-topology-runtime-DUxfg4Z9.js"
|
||||
"houseplan-assets/backdrop-pick-DMkLFHkR.js",
|
||||
"houseplan-assets/de-Cr-89HP-.js",
|
||||
"houseplan-assets/editor-CJNTjUIy.js",
|
||||
"houseplan-assets/fr-DKZ8hWr9.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-CVoz67fJ.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-D3aymMlw.js",
|
||||
"houseplan-assets/hp-zigbee-topology-overlay-DzOph_RS.js",
|
||||
"houseplan-assets/live-interaction-runtime-eQAnQ-sE.js",
|
||||
"houseplan-assets/zigbee-topology-c40qIaLR.js",
|
||||
"houseplan-assets/zigbee-topology-runtime-fETRrPi1.js"
|
||||
],
|
||||
"lazyGzipBytes": 240676,
|
||||
"lazyGzipBytes": 240647,
|
||||
"lazyEditorFiles": [
|
||||
"houseplan-assets/backdrop-pick-CEZBr4qx.js",
|
||||
"houseplan-assets/editor-BVOuJXsz.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-C5_zNXOu.js",
|
||||
"houseplan-assets/zigbee-topology-D9L1ESh4.js"
|
||||
"houseplan-assets/backdrop-pick-DMkLFHkR.js",
|
||||
"houseplan-assets/editor-CJNTjUIy.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-CVoz67fJ.js",
|
||||
"houseplan-assets/zigbee-topology-c40qIaLR.js"
|
||||
],
|
||||
"lazyEditorGzipBytes": 178334,
|
||||
"lazyEditorGzipBytes": 178325,
|
||||
"lazyOnboardingFiles": [
|
||||
"houseplan-assets/backdrop-pick-CEZBr4qx.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-C0Zl7v7b.js"
|
||||
"houseplan-assets/backdrop-pick-DMkLFHkR.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-D3aymMlw.js"
|
||||
],
|
||||
"lazyOnboardingGzipBytes": 14241,
|
||||
"lazyLocaleFiles": [
|
||||
"houseplan-assets/de-DR62x0IQ.js",
|
||||
"houseplan-assets/fr-D4YIJQhT.js"
|
||||
"houseplan-assets/de-Cr-89HP-.js",
|
||||
"houseplan-assets/fr-DKZ8hWr9.js"
|
||||
],
|
||||
"lazyLocaleGzipBytes": 49115,
|
||||
"lazyLocaleGzipBytes": 49104,
|
||||
"files": [
|
||||
{
|
||||
"path": "houseplan-assets/backdrop-pick-CEZBr4qx.js",
|
||||
"sha256": "709ac3421f7630a539c5c1c27248b39f76e6d9d2b54b75057abb0b4af70bc844",
|
||||
"path": "houseplan-assets/backdrop-pick-DMkLFHkR.js",
|
||||
"sha256": "384450870956f8ca5a72cf2d8d07dc88d87f92c6881ae7e88dc18695d0aca575",
|
||||
"rawBytes": 21417,
|
||||
"gzipBytes": 7282,
|
||||
"gzipBytes": 7281,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-Csq_DR2Y.js"
|
||||
"houseplan-assets/houseplan-card-Dzad_CGf.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/de-DR62x0IQ.js",
|
||||
"sha256": "0377277d00b6e025e587aa7404a3cecea12c56d873fa9741680a4ab246914d09",
|
||||
"path": "houseplan-assets/de-Cr-89HP-.js",
|
||||
"sha256": "3424417404f8b253837205e5b78c734c9bfd5730d0f6c69b117a8412503ea256",
|
||||
"rawBytes": 82182,
|
||||
"gzipBytes": 24827,
|
||||
"gzipBytes": 24821,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/editor-BVOuJXsz.js",
|
||||
"sha256": "efde2f9d2f8bc1f5fb961bb3c57feb8a291018f2871c4c068ab60bae58106446",
|
||||
"path": "houseplan-assets/editor-CJNTjUIy.js",
|
||||
"sha256": "ca584266dd1a4c030504fdfbf3b6e5fa685fd16843fcb3102d4ec43ac8e76a59",
|
||||
"rawBytes": 3831,
|
||||
"gzipBytes": 1583,
|
||||
"gzipBytes": 1581,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-Csq_DR2Y.js"
|
||||
"houseplan-assets/houseplan-card-Dzad_CGf.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/fr-D4YIJQhT.js",
|
||||
"sha256": "e5c0ff025e2826a8a43b53e6af22c7314a5b72effd2b41d7cfd38a128f998925",
|
||||
"path": "houseplan-assets/fr-DKZ8hWr9.js",
|
||||
"sha256": "9e978437d010589c9f0c29889f27077bc2ac39501d955e0f455eccfc1fcc35b4",
|
||||
"rawBytes": 84312,
|
||||
"gzipBytes": 24288,
|
||||
"gzipBytes": 24283,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-card-Csq_DR2Y.js",
|
||||
"sha256": "2751d48b52d10030532b2de87f0f0c7f38c283223bae57c8728b2717b115c353",
|
||||
"path": "houseplan-assets/houseplan-card-Dzad_CGf.js",
|
||||
"sha256": "97483ed191736bdd71f6f7969afac2ce35cd8b9fdc11b7de453e0d5c135994df",
|
||||
"rawBytes": 1053904,
|
||||
"gzipBytes": 295925,
|
||||
"gzipBytes": 295926,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": [
|
||||
"houseplan-assets/de-DR62x0IQ.js",
|
||||
"houseplan-assets/editor-BVOuJXsz.js",
|
||||
"houseplan-assets/fr-D4YIJQhT.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-C5_zNXOu.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-C0Zl7v7b.js",
|
||||
"houseplan-assets/hp-zigbee-topology-overlay-CnCZWJj6.js",
|
||||
"houseplan-assets/live-interaction-runtime-C2JvTP_O.js"
|
||||
"houseplan-assets/de-Cr-89HP-.js",
|
||||
"houseplan-assets/editor-CJNTjUIy.js",
|
||||
"houseplan-assets/fr-DKZ8hWr9.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-CVoz67fJ.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-D3aymMlw.js",
|
||||
"houseplan-assets/hp-zigbee-topology-overlay-DzOph_RS.js",
|
||||
"houseplan-assets/live-interaction-runtime-eQAnQ-sE.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-editor-runtime-C5_zNXOu.js",
|
||||
"sha256": "db3ca36d567fb682fb633555bdfa963db0d2f5e9682c1532bdf6ef81c17591fc",
|
||||
"path": "houseplan-assets/houseplan-editor-runtime-CVoz67fJ.js",
|
||||
"sha256": "46fc38e58a35df471132386af3898a558d0f02e1c0350d2997edcdcdd0e32183",
|
||||
"rawBytes": 622491,
|
||||
"gzipBytes": 164622,
|
||||
"gzipBytes": 164620,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/backdrop-pick-CEZBr4qx.js",
|
||||
"houseplan-assets/houseplan-card-Csq_DR2Y.js",
|
||||
"houseplan-assets/zigbee-topology-D9L1ESh4.js"
|
||||
"houseplan-assets/backdrop-pick-DMkLFHkR.js",
|
||||
"houseplan-assets/houseplan-card-Dzad_CGf.js",
|
||||
"houseplan-assets/zigbee-topology-c40qIaLR.js"
|
||||
],
|
||||
"dynamicImports": [
|
||||
"houseplan-assets/zigbee-topology-runtime-DUxfg4Z9.js"
|
||||
"houseplan-assets/zigbee-topology-runtime-fETRrPi1.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-onboarding-runtime-C0Zl7v7b.js",
|
||||
"sha256": "bb156e1a1244328a728875141ddf47d2ebe0d1e12e763eb1336e2f72837bcfaf",
|
||||
"path": "houseplan-assets/houseplan-onboarding-runtime-D3aymMlw.js",
|
||||
"sha256": "85dfe77718c0ae7b1f8d9e23facc0f7d2670303237b4489af0b3455ce4fbdea8",
|
||||
"rawBytes": 28088,
|
||||
"gzipBytes": 6959,
|
||||
"gzipBytes": 6960,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/backdrop-pick-CEZBr4qx.js",
|
||||
"houseplan-assets/houseplan-card-Csq_DR2Y.js"
|
||||
"houseplan-assets/backdrop-pick-DMkLFHkR.js",
|
||||
"houseplan-assets/houseplan-card-Dzad_CGf.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/hp-zigbee-topology-overlay-CnCZWJj6.js",
|
||||
"sha256": "aac582f8d2e0586aeed749ff9581f1fb7d11bb15493cc939bd37b61f903c05aa",
|
||||
"path": "houseplan-assets/hp-zigbee-topology-overlay-DzOph_RS.js",
|
||||
"sha256": "44b33d85c3783c1317469c33979c9546f4b819065859a5e0bd95ac6a9ff5b4a0",
|
||||
"rawBytes": 6006,
|
||||
"gzipBytes": 2376,
|
||||
"gzipBytes": 2371,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-Csq_DR2Y.js",
|
||||
"houseplan-assets/zigbee-topology-D9L1ESh4.js",
|
||||
"houseplan-assets/zigbee-topology-runtime-DUxfg4Z9.js"
|
||||
"houseplan-assets/houseplan-card-Dzad_CGf.js",
|
||||
"houseplan-assets/zigbee-topology-c40qIaLR.js",
|
||||
"houseplan-assets/zigbee-topology-runtime-fETRrPi1.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/live-interaction-runtime-C2JvTP_O.js",
|
||||
"sha256": "91e8a03ebb3fb35b89c974e2bcf3ee1eff8523f9d9cb1ac93a061c3f751706d1",
|
||||
"path": "houseplan-assets/live-interaction-runtime-eQAnQ-sE.js",
|
||||
"sha256": "20b7763e70a6839fc11ad95edae4032c6f6159d0fa408d7a5bfa50dfbd0ca1eb",
|
||||
"rawBytes": 5196,
|
||||
"gzipBytes": 2128,
|
||||
"gzipBytes": 2126,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-Csq_DR2Y.js"
|
||||
"houseplan-assets/houseplan-card-Dzad_CGf.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/zigbee-topology-D9L1ESh4.js",
|
||||
"sha256": "817e5b42008db12cdf922275098eb06a536408dbd01f464859dccee434c2451b",
|
||||
"path": "houseplan-assets/zigbee-topology-c40qIaLR.js",
|
||||
"sha256": "6d9b329b0e56a525638ba11f388638ad583c94e61c361484d4ba6f85ad6c2732",
|
||||
"rawBytes": 12382,
|
||||
"gzipBytes": 4847,
|
||||
"gzipBytes": 4843,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-Csq_DR2Y.js"
|
||||
"houseplan-assets/houseplan-card-Dzad_CGf.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/zigbee-topology-runtime-DUxfg4Z9.js",
|
||||
"sha256": "8197d48ba2f6eb615024f0cabca6ff12c10a3442fa19ebcd536bd5d3d5586c34",
|
||||
"path": "houseplan-assets/zigbee-topology-runtime-fETRrPi1.js",
|
||||
"sha256": "1c93cc0b92ad7a44c9cbd6c9bab9fded6f21fbb4d6e194befe260eed3fb4c466",
|
||||
"rawBytes": 3941,
|
||||
"gzipBytes": 1764,
|
||||
"gzipBytes": 1761,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-Csq_DR2Y.js",
|
||||
"houseplan-assets/zigbee-topology-D9L1ESh4.js"
|
||||
"houseplan-assets/houseplan-card-Dzad_CGf.js",
|
||||
"houseplan-assets/zigbee-topology-c40qIaLR.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-card.js",
|
||||
"sha256": "dbba45693954cf08e2165d88bdcb9e5c295d3782fe5fae9943e079e22135e22c",
|
||||
"sha256": "26075a61cfd33425279f0906c3e9d2d4a6ca5992ebb58da65f7a83aa79ac79b1",
|
||||
"rawBytes": 1183,
|
||||
"gzipBytes": 797,
|
||||
"gzipBytes": 793,
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-Csq_DR2Y.js"
|
||||
"houseplan-assets/houseplan-card-Dzad_CGf.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
}
|
||||
|
||||
Vendored
+7
-7
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,4 +1,4 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="71049c6ab3188a66c7112a997ed0f56cdd5e60d90668049e62f53c7c7e022ae7";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-Csq_DR2Y.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__="e7c2adf422d4fedfe2d4b29c74727ae74dd46823436e7da9250a4777b1ba7418";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-Dzad_CGf.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}
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+56
-56
File diff suppressed because one or more lines are too long
+3
-3
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,4 +1,4 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="71049c6ab3188a66c7112a997ed0f56cdd5e60d90668049e62f53c7c7e022ae7";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 d,cp as _,cq as u,cr as g,dj as m,aX as b,aZ as $,dk as v}from"./houseplan-card-Csq_DR2Y.js";import{i as f,c as y,e as w,r as D,a as k,b as S,d as C,t as M}from"./backdrop-pick-CEZBr4qx.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="71049c6ab3188a66c7112a997ed0f56cdd5e60d90668049e62f53c7c7e022ae7";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__="e7c2adf422d4fedfe2d4b29c74727ae74dd46823436e7da9250a4777b1ba7418";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 d,cp as _,cq as u,cr as g,dj as m,aX as b,aZ as $,dk as v}from"./houseplan-card-Dzad_CGf.js";import{i as f,c as y,e as w,r as D,a as k,b as S,d as C,t as M}from"./backdrop-pick-DMkLFHkR.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="e7c2adf422d4fedfe2d4b29c74727ae74dd46823436e7da9250a4777b1ba7418";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:_,tempMax:d,showLqi:this.host._config?.show_signal??!0,cardFontScale:1,labelTemp:!1,labelHum:!1,labelLqi:!1,labelLight:!1,cellCm:e,cellCmInput:c(e,this.host._imperial),cellCmTouched:!1,busy:!1}}async _pickPlanFile(t){const s=t.target,e=s.files?.[0];if(!e||!this.host._spaceDialog)return;s.value="";const 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
@@ -1,4 +1,4 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="71049c6ab3188a66c7112a997ed0f56cdd5e60d90668049e62f53c7c7e022ae7";import{v as e,A as t,dx as i,w as s,c as o,l as r,u as n}from"./houseplan-card-Csq_DR2Y.js";import{a,r as h,t as d}from"./zigbee-topology-D9L1ESh4.js";import{zigbeeTopologyRuntimeSnapshot as p,subscribeZigbeeTopology as c}from"./zigbee-topology-runtime-DUxfg4Z9.js";const l={revision:0,topologies:[],states:{}};class v extends e{constructor(){super(...arguments),this.devices=[],this.currentSpace="",this._runtime=l,this._hovered="",this._pointerOver=e=>{if(!this._mouseAllowed(e))return void this._clear();const t=this._deviceFromEvent(e),i=t?.dataset.id||"";i&&i!==this._hovered&&(this._hovered=i,this.requestUpdate())},this._pointerOut=e=>{const t=this._deviceFromEvent(e);if(!t||t.dataset.id!==this._hovered)return;const i=e.relatedTarget instanceof Element?e.relatedTarget.closest('[data-hp="device"]'):null;i?.dataset.id!==this._hovered&&this._clear()},this._pointerDown=e=>{"mouse"!==e.pointerType&&this._clear()}}connectedCallback(){super.connectedCallback();const e=this.getRootNode();e.host&&"undefined"!=typeof MutationObserver&&(this._hoverGateObserver=new MutationObserver(()=>{e.host.hasAttribute("data-pointer-hover")||this._clear()}),this._hoverGateObserver.observe(e.host,{attributes:!0,attributeFilter:["data-pointer-hover"]})),queueMicrotask(()=>this._connectParent())}disconnectedCallback(){this._release?.(),this._release=void 0,this._disconnectParent(),this._hoverGateObserver?.disconnect(),this._hoverGateObserver=void 0,this._hovered="",super.disconnectedCallback()}updated(e){e.has("hass")&&(this._release?.(),this._runtime=p(this.hass),this._mappedMemo=void 0,this._release=c(this.hass,()=>{this._runtime=p(this.hass),this._mappedMemo=void 0,this.requestUpdate()})),(e.has("currentSpace")||e.has("devices")||e.has("registry"))&&(this._mappedMemo=void 0,this.devices.some(e=>e.id===this._hovered&&e.space===this.currentSpace)||(this._hovered=""))}_connectParent(){const e=this.parentElement;e&&e!==this._parent&&(this._disconnectParent(),this._parent=e,e.addEventListener("pointerover",this._pointerOver),e.addEventListener("pointerout",this._pointerOut),e.addEventListener("pointerdown",this._pointerDown,!0))}_disconnectParent(){this._parent?.removeEventListener("pointerover",this._pointerOver),this._parent?.removeEventListener("pointerout",this._pointerOut),this._parent?.removeEventListener("pointerdown",this._pointerDown,!0),this._parent=void 0}_deviceFromEvent(e){for(const t of e.composedPath())if(t instanceof HTMLElement&&"device"===t.dataset.hp)return t;return null}_mouseAllowed(e){const t=this.getRootNode();return"mouse"===e.pointerType&&t.host?.hasAttribute?.("data-pointer-hover")}_clear(){this._hovered&&(this._hovered="",this.requestUpdate())}_position(e){const t=[...this._parent?.querySelectorAll(".dev[data-id]")||[]].find(t=>t.dataset.id===e);if(!t)return null;const i=Number.parseFloat(t.style.left),s=Number.parseFloat(t.style.top),o=t.getBoundingClientRect();return Number.isFinite(i)&&Number.isFinite(s)?{x:i,y:s,width:o.width,height:o.height}:null}render(){if(!this._hovered||!this.registry||!this._runtime.topologies.length)return t;const e=this._mappedMemo,n=e&&e.runtime===this._runtime&&e.devices===this.devices&&e.registry===this.registry?e.mapped:a(this._runtime.topologies,this.devices,this.registry);e&&n===e.mapped||(this._mappedMemo={runtime:this._runtime,devices:this.devices,registry:this.registry,mapped:n});const p=h(n,this.currentSpace,this._hovered),c=this._position(this._hovered);if(!c)return t;const l=p.lines.map(e=>({...e,point:this._position(e.neighborMarkerId)})).filter(e=>!!e.point);return o`
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="e7c2adf422d4fedfe2d4b29c74727ae74dd46823436e7da9250a4777b1ba7418";import{v as e,A as t,dx as i,w as s,c as o,l as r,u as n}from"./houseplan-card-Dzad_CGf.js";import{a,r as h,t as d}from"./zigbee-topology-c40qIaLR.js";import{zigbeeTopologyRuntimeSnapshot as p,subscribeZigbeeTopology as c}from"./zigbee-topology-runtime-fETRrPi1.js";const l={revision:0,topologies:[],states:{}};class v extends e{constructor(){super(...arguments),this.devices=[],this.currentSpace="",this._runtime=l,this._hovered="",this._pointerOver=e=>{if(!this._mouseAllowed(e))return void this._clear();const t=this._deviceFromEvent(e),i=t?.dataset.id||"";i&&i!==this._hovered&&(this._hovered=i,this.requestUpdate())},this._pointerOut=e=>{const t=this._deviceFromEvent(e);if(!t||t.dataset.id!==this._hovered)return;const i=e.relatedTarget instanceof Element?e.relatedTarget.closest('[data-hp="device"]'):null;i?.dataset.id!==this._hovered&&this._clear()},this._pointerDown=e=>{"mouse"!==e.pointerType&&this._clear()}}connectedCallback(){super.connectedCallback();const e=this.getRootNode();e.host&&"undefined"!=typeof MutationObserver&&(this._hoverGateObserver=new MutationObserver(()=>{e.host.hasAttribute("data-pointer-hover")||this._clear()}),this._hoverGateObserver.observe(e.host,{attributes:!0,attributeFilter:["data-pointer-hover"]})),queueMicrotask(()=>this._connectParent())}disconnectedCallback(){this._release?.(),this._release=void 0,this._disconnectParent(),this._hoverGateObserver?.disconnect(),this._hoverGateObserver=void 0,this._hovered="",super.disconnectedCallback()}updated(e){e.has("hass")&&(this._release?.(),this._runtime=p(this.hass),this._mappedMemo=void 0,this._release=c(this.hass,()=>{this._runtime=p(this.hass),this._mappedMemo=void 0,this.requestUpdate()})),(e.has("currentSpace")||e.has("devices")||e.has("registry"))&&(this._mappedMemo=void 0,this.devices.some(e=>e.id===this._hovered&&e.space===this.currentSpace)||(this._hovered=""))}_connectParent(){const e=this.parentElement;e&&e!==this._parent&&(this._disconnectParent(),this._parent=e,e.addEventListener("pointerover",this._pointerOver),e.addEventListener("pointerout",this._pointerOut),e.addEventListener("pointerdown",this._pointerDown,!0))}_disconnectParent(){this._parent?.removeEventListener("pointerover",this._pointerOver),this._parent?.removeEventListener("pointerout",this._pointerOut),this._parent?.removeEventListener("pointerdown",this._pointerDown,!0),this._parent=void 0}_deviceFromEvent(e){for(const t of e.composedPath())if(t instanceof HTMLElement&&"device"===t.dataset.hp)return t;return null}_mouseAllowed(e){const t=this.getRootNode();return"mouse"===e.pointerType&&t.host?.hasAttribute?.("data-pointer-hover")}_clear(){this._hovered&&(this._hovered="",this.requestUpdate())}_position(e){const t=[...this._parent?.querySelectorAll(".dev[data-id]")||[]].find(t=>t.dataset.id===e);if(!t)return null;const i=Number.parseFloat(t.style.left),s=Number.parseFloat(t.style.top),o=t.getBoundingClientRect();return Number.isFinite(i)&&Number.isFinite(s)?{x:i,y:s,width:o.width,height:o.height}:null}render(){if(!this._hovered||!this.registry||!this._runtime.topologies.length)return t;const e=this._mappedMemo,n=e&&e.runtime===this._runtime&&e.devices===this.devices&&e.registry===this.registry?e.mapped:a(this._runtime.topologies,this.devices,this.registry);e&&n===e.mapped||(this._mappedMemo={runtime:this._runtime,devices:this.devices,registry:this.registry,mapped:n});const p=h(n,this.currentSpace,this._hovered),c=this._position(this._hovered);if(!c)return t;const l=p.lines.map(e=>({...e,point:this._position(e.neighborMarkerId)})).filter(e=>!!e.point);return o`
|
||||
${l.length?s`<svg viewBox="0 0 100 100" preserveAspectRatio="none"
|
||||
aria-hidden="true" data-hp="zigbee-topology-lines">
|
||||
${l.map(e=>s`<line x1=${c.x} y1=${c.y}
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="71049c6ab3188a66c7112a997ed0f56cdd5e60d90668049e62f53c7c7e022ae7";import{n as t,b as n}from"./zigbee-topology-D9L1ESh4.js";import{I as e}from"./houseplan-card-Csq_DR2Y.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__="e7c2adf422d4fedfe2d4b29c74727ae74dd46823436e7da9250a4777b1ba7418";import{n as t,b as n}from"./zigbee-topology-c40qIaLR.js";import{I as e}from"./houseplan-card-Dzad_CGf.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};
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="71049c6ab3188a66c7112a997ed0f56cdd5e60d90668049e62f53c7c7e022ae7";try{await import("./houseplan-assets/houseplan-card-Csq_DR2Y.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__="e7c2adf422d4fedfe2d4b29c74727ae74dd46823436e7da9250a4777b1ba7418";try{await import("./houseplan-assets/houseplan-card-Dzad_CGf.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,6 +2,8 @@
|
||||
|
||||
## Unreleased
|
||||
|
||||
## v1.72.0-beta.3 — 2026-09-05
|
||||
|
||||
- Large plans now keep their heavy room, wall, lighting, decor and device scene
|
||||
stable during hover, pan, pinch and editor drags, and unrelated Home Assistant
|
||||
state updates no longer rebuild the full card; interactions remain visually
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
|
||||
## Не выпущено
|
||||
|
||||
## v1.72.0-beta.3 — 2026-09-05
|
||||
|
||||
- На больших планах тяжёлая сцена комнат, стен, света, подложки и устройств
|
||||
теперь остаётся неизменной во время hover, pan, pinch и перетаскиваний в
|
||||
редакторах, а посторонние обновления Home Assistant больше не перестраивают
|
||||
|
||||
+13
-15
@@ -1,24 +1,22 @@
|
||||
<!-- release: v1.72.0-beta.2 -->
|
||||
<!-- release: v1.72.0-beta.3 -->
|
||||
|
||||
## Основное
|
||||
|
||||
- Двойной клик или двойной тап по свободному фону плана в Просмотре и киоске
|
||||
теперь выполняет действие «Вписать всё»
|
||||
([#449](https://github.com/Matysh/houseplan-card/issues/449)).
|
||||
- Обновление топологии Zigbee2MQTT теперь принимает реальные camelCase-поля
|
||||
raw-карты сети и корректно показывает устройства и связи
|
||||
([#450](https://github.com/Matysh/houseplan-card/issues/450)).
|
||||
- На больших планах тяжёлая сцена больше не перестраивается при каждом hover,
|
||||
pan, pinch и перетаскивании в редакторах, а нерелевантные обновления Home
|
||||
Assistant не вызывают полный render; внешний вид и поведение сохраняются,
|
||||
отклик становится заметно плавнее
|
||||
([#451](https://github.com/Matysh/houseplan-card/issues/451)).
|
||||
- Мелкие исправления и улучшения.
|
||||
|
||||
## Highlights
|
||||
|
||||
- Double-clicking or double-tapping free plan background in View or kiosk now
|
||||
performs the Fit all action
|
||||
([#449](https://github.com/Matysh/houseplan-card/issues/449)).
|
||||
- Zigbee2MQTT topology refresh now accepts the real camelCase raw network-map
|
||||
fields and correctly displays devices and links
|
||||
([#450](https://github.com/Matysh/houseplan-card/issues/450)).
|
||||
- Large plans no longer rebuild the heavy scene on every hover, pan, pinch or
|
||||
editor drag, while unrelated Home Assistant updates no longer trigger a full
|
||||
render; visuals and interaction semantics stay unchanged while response is
|
||||
noticeably smoother
|
||||
([#451](https://github.com/Matysh/houseplan-card/issues/451)).
|
||||
- Small fixes and improvements.
|
||||
|
||||
[Полный список изменений на русском](https://github.com/Matysh/houseplan-card/blob/v1.72.0-beta.2/docs/CHANGELOG.ru.md)
|
||||
· [Full changelog in English](https://github.com/Matysh/houseplan-card/blob/v1.72.0-beta.2/docs/CHANGELOG.md)
|
||||
[Полный список изменений на русском](https://github.com/Matysh/houseplan-card/blob/v1.72.0-beta.3/docs/CHANGELOG.ru.md)
|
||||
· [Full changelog in English](https://github.com/Matysh/houseplan-card/blob/v1.72.0-beta.3/docs/CHANGELOG.md)
|
||||
|
||||
+2
-2
@@ -21,8 +21,8 @@ metadata). Only an explicit owner-approved emergency hotfix may skip this gate.
|
||||
|
||||
| Item | State |
|
||||
|---|---|
|
||||
| Version | **v1.72.0-beta.2** everywhere (manifest, const.py, package.json, CARD_VERSION) |
|
||||
| Current local cycle | v1.72.0-beta.2 adds double-click/double-tap Fit all on free plan background (#449), accepts real Zigbee2MQTT camelCase raw network maps (#450), corrects the Russian Fit all guide label (#452), and hardens review-round accounting (#454). Publish from `dev` only after exact-SHA Validate is green; `main` remains at v1.71.0. |
|
||||
| Version | **v1.72.0-beta.3** everywhere (manifest, const.py, package.json, CARD_VERSION) |
|
||||
| Current local cycle | v1.72.0-beta.3 keeps the heavy scene stable during hover, pan, pinch and editor drags, filters unrelated Home Assistant updates, and preserves exact live resize validation on large plans (#451). Publish from `dev` only after exact-SHA Validate is green; `main` remains at v1.71.0. |
|
||||
| Hidden Labs Stage | #89 Stage 1 ships in v1.63.0-beta.1. #122 Stage 2 ships in v1.64.0 and evolves the same hidden, expiring `iso` experiment with matte walls, a low exterior floor edge, restrained shared shadows and live vertical door/window/gate panels. Flat remains default; editors and `houseplan-space-card` remain flat; live floor effects and HA actions remain unchanged. Public activation remains a separate task. |
|
||||
| Workflow | Superseded 2026-08-12: the pre-1.62 rule of "local edits without tests or commits" is **dead** — since release 1.62 every product change follows `PROCESS.md` (issue in `S5-ready`+, branch `issue/<NN>-slug`, trailers on every commit, review pipeline; `AGENTS.md` is the summary). Release mechanics below remain current. A requested pre-release gets a production build plus the smallest targeted unit/smoke set covering the changed surfaces, one tested `dev` commit/tag and a GitHub Release with `prerelease=true`; `main` stays untouched. The complete local frontend/backend/smoke gate runs only before a stable release, after which `main` is fast-forwarded to the exact tested `dev` SHA and the GitHub Release uses `prerelease=false`. Release bodies are short and bilingual (Russian first); every bullet links its GitHub issue (#NN) so the #328 rules stay machine-checkable. A STABLE body aggregates the changelog since the PREVIOUS STABLE release (never since the last beta): features/fixes described across the line's beta changelogs must appear, while bugs that were introduced and fixed strictly inside the beta line (never shipped in any stable) are excluded — draft with `npm run release:notes -- <tag>`, curate by hand, then `npm run release:notes -- <tag> --verify` must pass. `Мелкие исправления и улучшения` / `Small fixes and improvements` is allowed only when the range really contains user-visible work not itemised in the body; a single-issue hotfix ships without it (the verifier enforces this). Every body ends with separate links to the Russian and English changelogs. Open or partially delivered issues are never presented as shipped. Telegram announcements are sent only for stable releases; beta and RC publication is silent. `docs/RELEASE-NOTES.md` is the current canonical body instance; `npm run release:prerelease -- <tag> --issues=… --yes` is the primary local publication path and the manual `Publish prerelease` workflow is its GitHub-only equivalent once present on `main`. Nothing is copied to the home instance by hand |
|
||||
| GitHub | https://github.com/Matysh/houseplan-card — [Issues](https://github.com/Matysh/houseplan-card/issues) are the canonical task records; their labels carry priority and workflow status (`PROCESS.md` §9). GitHub Projects is no longer used. `main` carries stable releases; pre-release tags may point directly at `dev`. Work lands on `dev` and is merged into `main` for a stable release, so `dev` is normally equal to or ahead of `main`, never behind. Push via SSH key `ha_jb` (remote git@github.com:…); API releases via the fine-grained PAT in `~/.git-credentials` (Contents R/W, issued 2026-07-23) |
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "houseplan-card",
|
||||
"version": "1.72.0-beta.2",
|
||||
"version": "1.72.0-beta.3",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "houseplan-card",
|
||||
"version": "1.72.0-beta.2",
|
||||
"version": "1.72.0-beta.3",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"lit": "^3.1.3",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "houseplan-card",
|
||||
"version": "1.72.0-beta.2",
|
||||
"version": "1.72.0-beta.3",
|
||||
"description": "Interactive house plan Lovelace card for Home Assistant",
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
|
||||
@@ -398,7 +398,7 @@ import {
|
||||
} from './space-order';
|
||||
import { applyOpeningMoves, mergeCollinearPartitions, spaceMergeGeometry } from './wall-merge';
|
||||
|
||||
const CARD_VERSION = '1.72.0-beta.2';
|
||||
const CARD_VERSION = '1.72.0-beta.3';
|
||||
const ENTRY_BUILD_FINGERPRINT = '__HOUSEPLAN_SOURCE_FINGERPRINT__';
|
||||
const EDITOR_RETRY_ASSET = '__HOUSEPLAN_EDITOR_RETRY_ASSET__';
|
||||
|
||||
|
||||
@@ -373,7 +373,7 @@ import {
|
||||
} from './space-order';
|
||||
import { applyOpeningMoves, mergeCollinearPartitions, spaceMergeGeometry } from './wall-merge';
|
||||
|
||||
const CARD_VERSION = '1.72.0-beta.2';
|
||||
const CARD_VERSION = '1.72.0-beta.3';
|
||||
|
||||
type ResizeLiveLabel = {
|
||||
kind: 'length';
|
||||
|
||||
Reference in New Issue
Block a user