mirror of
https://github.com/Matysh/houseplan-card
synced 2026-10-06 14:39:22 +00:00
@@ -1,125 +1,125 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"fingerprint": "060ec710f4ade532364b8887066629a45636ac2a8e16af549ec8f323c449b8a9",
|
||||
"fingerprint": "0aa082f67d7e4e87ee87e11227a79f9f754d47a470f79cea2084b6001cf18246",
|
||||
"entry": "houseplan-card.js",
|
||||
"initialViewFiles": [
|
||||
"houseplan-assets/houseplan-card-Cq0kQMae.js",
|
||||
"houseplan-assets/houseplan-card-CRBn43Vb.js",
|
||||
"houseplan-card.js"
|
||||
],
|
||||
"initialViewGzipBytes": 291190,
|
||||
"initialViewGzipBytes": 291203,
|
||||
"lazyFiles": [
|
||||
"houseplan-assets/backdrop-pick--dMAHFcA.js",
|
||||
"houseplan-assets/de-1N1nfNI0.js",
|
||||
"houseplan-assets/editor-yDIoOZQr.js",
|
||||
"houseplan-assets/fr-CY0KFbzM.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-Dv0DngiN.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-goBKaVug.js"
|
||||
"houseplan-assets/backdrop-pick-D3Vafz-C.js",
|
||||
"houseplan-assets/de-BkROu8Tw.js",
|
||||
"houseplan-assets/editor-GNX-fEXr.js",
|
||||
"houseplan-assets/fr-C03DhXy5.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-CvmR2VuV.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-BVA5mIBD.js"
|
||||
],
|
||||
"lazyGzipBytes": 215576,
|
||||
"lazyGzipBytes": 215550,
|
||||
"lazyEditorFiles": [
|
||||
"houseplan-assets/backdrop-pick--dMAHFcA.js",
|
||||
"houseplan-assets/editor-yDIoOZQr.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-Dv0DngiN.js"
|
||||
"houseplan-assets/backdrop-pick-D3Vafz-C.js",
|
||||
"houseplan-assets/editor-GNX-fEXr.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-CvmR2VuV.js"
|
||||
],
|
||||
"lazyEditorGzipBytes": 159881,
|
||||
"lazyEditorGzipBytes": 159870,
|
||||
"lazyOnboardingFiles": [
|
||||
"houseplan-assets/backdrop-pick--dMAHFcA.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-goBKaVug.js"
|
||||
"houseplan-assets/backdrop-pick-D3Vafz-C.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-BVA5mIBD.js"
|
||||
],
|
||||
"lazyOnboardingGzipBytes": 14134,
|
||||
"lazyOnboardingGzipBytes": 14127,
|
||||
"lazyLocaleFiles": [
|
||||
"houseplan-assets/de-1N1nfNI0.js",
|
||||
"houseplan-assets/fr-CY0KFbzM.js"
|
||||
"houseplan-assets/de-BkROu8Tw.js",
|
||||
"houseplan-assets/fr-C03DhXy5.js"
|
||||
],
|
||||
"lazyLocaleGzipBytes": 48739,
|
||||
"lazyLocaleGzipBytes": 48727,
|
||||
"files": [
|
||||
{
|
||||
"path": "houseplan-assets/backdrop-pick--dMAHFcA.js",
|
||||
"sha256": "982ddc9c1b3ecbfb0dfb63703a0bf35f4a1c294b4cb612e1734f848e328db03d",
|
||||
"path": "houseplan-assets/backdrop-pick-D3Vafz-C.js",
|
||||
"sha256": "01ab21891c6d5f844630b8bebe539f50b3f8d25725baa32017b2638d1341f92f",
|
||||
"rawBytes": 20996,
|
||||
"gzipBytes": 7178,
|
||||
"gzipBytes": 7174,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-Cq0kQMae.js"
|
||||
"houseplan-assets/houseplan-card-CRBn43Vb.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/de-1N1nfNI0.js",
|
||||
"sha256": "5ebb658cfb7e05c3f1e074127e8fbead0580121b3f6dc8c390075ef5550f85c4",
|
||||
"path": "houseplan-assets/de-BkROu8Tw.js",
|
||||
"sha256": "c48c3b1e09eae9066e9feac83e80109e089474c344415f27e87b0b737ef93fc3",
|
||||
"rawBytes": 81632,
|
||||
"gzipBytes": 24641,
|
||||
"gzipBytes": 24635,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/editor-yDIoOZQr.js",
|
||||
"sha256": "f70e69874730180ecdf67a7ee9003f5c3564432e2c370d235025bcda17696054",
|
||||
"path": "houseplan-assets/editor-GNX-fEXr.js",
|
||||
"sha256": "05c249b5b3ead0987635b53de549ec1af7339eb863abf70bcc45d51dd3f2521b",
|
||||
"rawBytes": 3826,
|
||||
"gzipBytes": 1582,
|
||||
"gzipBytes": 1580,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-Cq0kQMae.js"
|
||||
"houseplan-assets/houseplan-card-CRBn43Vb.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/fr-CY0KFbzM.js",
|
||||
"sha256": "f356e5b756d5d1746567c1e687c709799af7f842d7de8107d5efdb9107716321",
|
||||
"path": "houseplan-assets/fr-C03DhXy5.js",
|
||||
"sha256": "0843d25037a8ab2277a96738ca3d6e97be303b52dbffa1dc6161c4576a9c1edb",
|
||||
"rawBytes": 83754,
|
||||
"gzipBytes": 24098,
|
||||
"gzipBytes": 24092,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-card-Cq0kQMae.js",
|
||||
"sha256": "d3064f61d80066e24759cac73e23afc0f4c624d813b29c0f9ff30d12d7fea4a4",
|
||||
"rawBytes": 1033685,
|
||||
"gzipBytes": 290393,
|
||||
"path": "houseplan-assets/houseplan-card-CRBn43Vb.js",
|
||||
"sha256": "9914dd884036dd91d1c2cc663e34bad77cfad3d2a3db34f84baf2e007b1b73a1",
|
||||
"rawBytes": 1033763,
|
||||
"gzipBytes": 290407,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": [
|
||||
"houseplan-assets/de-1N1nfNI0.js",
|
||||
"houseplan-assets/editor-yDIoOZQr.js",
|
||||
"houseplan-assets/fr-CY0KFbzM.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-Dv0DngiN.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-goBKaVug.js"
|
||||
"houseplan-assets/de-BkROu8Tw.js",
|
||||
"houseplan-assets/editor-GNX-fEXr.js",
|
||||
"houseplan-assets/fr-C03DhXy5.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-CvmR2VuV.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-BVA5mIBD.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-editor-runtime-Dv0DngiN.js",
|
||||
"sha256": "098fd4c1331b45578ac8d07a0eb351b1202a5cc3d16cefba88ed17c5e1bb6a4c",
|
||||
"path": "houseplan-assets/houseplan-editor-runtime-CvmR2VuV.js",
|
||||
"sha256": "4ab71bdc852a95fb7488cbedcc24f69c0203a6aac39f961f3a752561f352e452",
|
||||
"rawBytes": 576162,
|
||||
"gzipBytes": 151121,
|
||||
"gzipBytes": 151116,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/backdrop-pick--dMAHFcA.js",
|
||||
"houseplan-assets/houseplan-card-Cq0kQMae.js"
|
||||
"houseplan-assets/backdrop-pick-D3Vafz-C.js",
|
||||
"houseplan-assets/houseplan-card-CRBn43Vb.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-onboarding-runtime-goBKaVug.js",
|
||||
"sha256": "1b3cbd71e89904dc93378c95df0e0bc230787f9a4d1b2bfbd5d09874f93fce8b",
|
||||
"path": "houseplan-assets/houseplan-onboarding-runtime-BVA5mIBD.js",
|
||||
"sha256": "36ebdfc8bb84657533fba40b9e6df64828d069a0f7be45755c6e859f0c714736",
|
||||
"rawBytes": 28088,
|
||||
"gzipBytes": 6956,
|
||||
"gzipBytes": 6953,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/backdrop-pick--dMAHFcA.js",
|
||||
"houseplan-assets/houseplan-card-Cq0kQMae.js"
|
||||
"houseplan-assets/backdrop-pick-D3Vafz-C.js",
|
||||
"houseplan-assets/houseplan-card-CRBn43Vb.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-card.js",
|
||||
"sha256": "2d498cb03fe036c36702907335bcf53ee43ba2e58a5e445ee7de73b745365757",
|
||||
"sha256": "dcebb936b7f104ef69cc667539a7a6c5120c55ef01fd17821aac04b2fa9987a8",
|
||||
"rawBytes": 1183,
|
||||
"gzipBytes": 797,
|
||||
"gzipBytes": 796,
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-Cq0kQMae.js"
|
||||
"houseplan-assets/houseplan-card-CRBn43Vb.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
}
|
||||
|
||||
+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,4 +1,4 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="060ec710f4ade532364b8887066629a45636ac2a8e16af549ec8f323c449b8a9";import{b as e,l as o,t,di as s,A as a,dj as i,dk as l,dl as n,E as r,c}from"./houseplan-card-Cq0kQMae.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__="0aa082f67d7e4e87ee87e11227a79f9f754d47a470f79cea2084b6001cf18246";import{b as e,l as o,t,di as s,A as a,dj as i,dk as l,dl as n,E as r,c}from"./houseplan-card-CRBn43Vb.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
+48
-48
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,4 +1,4 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="060ec710f4ade532364b8887066629a45636ac2a8e16af549ec8f323c449b8a9";import{l as t,aE as s,A as e,t as o,c as a,c4 as l,c5 as i,c6 as h,c7 as c,aB as n,c8 as r,cd as p,c9 as _,ca as d,cb as u,cc as g,d7 as m,aA as b,aC as $,d8 as v}from"./houseplan-card-Cq0kQMae.js";import{i as f,c as y,e as w,r as D,a as k,b as S,s as C,t as M}from"./backdrop-pick--dMAHFcA.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="060ec710f4ade532364b8887066629a45636ac2a8e16af549ec8f323c449b8a9";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__="0aa082f67d7e4e87ee87e11227a79f9f754d47a470f79cea2084b6001cf18246";import{l as t,aE as s,A as e,t as o,c as a,c4 as l,c5 as i,c6 as h,c7 as c,aB as n,c8 as r,cd as p,c9 as _,ca as d,cb as u,cc as g,d7 as m,aA as b,aC as $,d8 as v}from"./houseplan-card-CRBn43Vb.js";import{i as f,c as y,e as w,r as D,a as k,b as S,s as C,t as M}from"./backdrop-pick-D3Vafz-C.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="0aa082f67d7e4e87ee87e11227a79f9f754d47a470f79cea2084b6001cf18246";class L{constructor(t){this.host=t,this._toggleServerPlans=async()=>{const t=this.host._spaceDialog;if(t)if(t.pickSaved)this.host._spaceDialog={...t,pickSaved:!1};else{this.host._spaceDialog={...t,pickSaved:!0,savedBusy:!0};try{const t=await this.host.hass.callWS({type:"houseplan/plans/list"}),s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:t?.plans||[],savedBusy:!1})}catch(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:[],savedBusy:!1}),this.host._showToast(this.host._t("toast.plans_list_failed",{err:this.host._errText(t)}))}}}}_help(l){const i=`${l}.aria`,h=t(this.host.hass,this.host._config?.language);return s(h,l)&&s(h,i)?a`<hp-help data-help-key=${l}
|
||||
.text=${o(h,l)} .ariaLabel=${o(h,i)}></hp-help>`:e}_openSpaceDialog(t,s){if(!this.host._serverStorage||!this.host._serverCfg)return void this.host._showToast(this.host._t("toast.integration_missing"));if("edit"===t){const e=this.host._serverCfg.spaces.find(t=>t.id===s);if(!e)return;const o=l(e),a=e.settings?.custom_fill&&"object"==typeof e.settings.custom_fill?i(e.settings.custom_fill):null,p="none"===o.fill?{...a||h,a:0}:a;return void(this.host._spaceDialog={mode:t,spaceId:s,title:e.title,planUrl:e.plan_url||null,planFile:null,source:e.plan_url?"file":"draw",showBorders:o.showBorders,showNames:o.showNames,zeroWallStyle:r(e),displayTouched:!0,hideDecor:o.hideDecor,hideOpenings:o.hideOpenings,roomColor:o.color,roomOpacity:o.opacity,fillMode:"none"===o.fill?"custom":o.fill,customFill:p,glowEnabled:o.glow,bgColor:o.bgColor,bgMode:"static"===e.settings?.bg_mode||"daynight"===e.settings?.bg_mode?e.settings.bg_mode:null,northDeg:n({},e.settings),sunRays:"boolean"==typeof e.settings?.sun_rays?e.settings.sun_rays:null,tempMin:o.tempMin,tempMax:o.tempMax,showLqi:o.showLqi??this.host._config?.show_signal??!0,cardFontScale:o.cardFontScale,labelTemp:o.labelTemp,labelHum:o.labelHum,labelLqi:o.labelLqi,labelLight:o.labelLight,cellCm:Number(e.cell_cm)>0?Number(e.cell_cm):5,cellCmInput:c(Number(e.cell_cm)>0?Number(e.cell_cm):5,this.host._imperial),cellCmTouched:!1,busy:!1})}const e=p(this.host._imperial);this.host._spaceDialog={mode:t,title:"",planUrl:null,planFile:null,...f(),hideDecor:!1,hideOpenings:!1,zeroWallStyle:"dashed",roomColor:g,roomOpacity:u,fillMode:"custom",customFill:{...h,a:0},glowEnabled:!0,bgColor:null,bgMode:"daynight",northDeg:null,sunRays:null,tempMin:d,tempMax:_,showLqi:this.host._config?.show_signal??!0,cardFontScale:1,labelTemp:!1,labelHum:!1,labelLqi:!1,labelLight:!1,cellCm:e,cellCmInput:c(e,this.host._imperial),cellCmTouched:!1,busy:!1}}async _pickPlanFile(t){const s=t.target,e=s.files?.[0];if(!e||!this.host._spaceDialog)return;s.value="";const o=await y(e);if("reject"===o.kind)return void this.host._showToast(this.host._t("toast.plan_formats"));if("guard"===o.kind)return void(this.host._backdropGuard=o.state);const a=await w(e,o.ext,e.name);this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:a})}_renderBackdropGuard(){return D(this.host,t=>{this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:t})},()=>{this.host._backdropGuard=null},this.host.hass)??e}_useServerPlan(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,planUrl:t,planFile:null,pickSaved:!1,savedAspect:void 0},this.host._aspectJob=this._readPlanAspect(t))}async _readPlanAspect(t){for(let s=0;s<40;s++){const s=this.host._display(t);if(s){const e=await new Promise(t=>{const e=new Image;e.onload=()=>t(e.naturalWidth&&e.naturalHeight?e.naturalWidth/e.naturalHeight:0),e.onerror=()=>t(0),e.src=s}),o=this.host._spaceDialog;return o&&o.planUrl===t&&Number.isFinite(e)&&e>0?(this.host._spaceDialog={...o,savedAspect:e},e):0}if(await new Promise(t=>setTimeout(t,150)),this.host._spaceDialog?.planUrl!==t)return 0}return 0}async _deleteServerPlan(t){const s=this.host._spaceDialog,e=s?.saved?.find(s=>s.name===t);if(!s||!e||e.used_by.length||e.url===s.planUrl)return;const o=await this.host._confirmDanger({key:"delete-plan",kind:"destructive",title:this.host._t("confirm.delete_plan_title"),message:this.host._t("confirm.delete_plan_body"),objectName:t,confirmLabel:this.host._t("btn.delete"),cancelLabel:this.host._t("btn.cancel")}),a=this.host._spaceDialog,l=a?.saved?.find(s=>s.name===t);if(o&&a&&l&&l.url===e.url&&l.modified===e.modified&&!l.used_by.length&&l.url!==a.planUrl)try{await this.host.hass.callWS({type:"houseplan/plans/delete",name:t});const s=this.host._spaceDialog;s?.saved&&(this.host._spaceDialog={...s,saved:s.saved.filter(s=>s.name!==t)})}catch(t){this.host._showToast(this.host._t("toast.plan_delete_failed",{err:this.host._errText(t)}))}}_renderServerPlans(t){if(t.savedBusy)return a`<div class="savedplans muted">${this.host._t("space.loading")}</div>`;const s=t.saved||[];if(!s.length)return a`<div class="savedplans muted">${this.host._t("space.no_saved")}</div>`;return a`<div class="savedplans">
|
||||
${s.map(s=>{return a`
|
||||
<div class="savedplan ${s.url===t.planUrl?"cur":""}">
|
||||
@@ -1 +1 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="060ec710f4ade532364b8887066629a45636ac2a8e16af549ec8f323c449b8a9";try{await import("./houseplan-assets/houseplan-card-Cq0kQMae.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__="0aa082f67d7e4e87ee87e11227a79f9f754d47a470f79cea2084b6001cf18246";try{await import("./houseplan-assets/houseplan-card-CRBn43Vb.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)}
|
||||
|
||||
Reference in New Issue
Block a user