mirror of
https://github.com/Matysh/houseplan-card
synced 2026-09-30 11:49:16 +00:00
User-Visible: no Issue: #42
This commit is contained in:
@@ -1,125 +1,125 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"fingerprint": "0e8d30adade283ab7261c15ec572b05a573651ed4a54f16fb281bfe0f3b1b5a1",
|
||||
"fingerprint": "00b256c13474be2ef769918ca1fe2f839c75e281e0017d9518b9c18bfa21b949",
|
||||
"entry": "houseplan-card.js",
|
||||
"initialViewFiles": [
|
||||
"houseplan-assets/houseplan-card-D6oRBCJr.js",
|
||||
"houseplan-assets/houseplan-card-CyGYTKu4.js",
|
||||
"houseplan-card.js"
|
||||
],
|
||||
"initialViewGzipBytes": 284032,
|
||||
"initialViewGzipBytes": 284047,
|
||||
"lazyFiles": [
|
||||
"houseplan-assets/backdrop-pick-C6t5Muol.js",
|
||||
"houseplan-assets/de-D1qmwFdr.js",
|
||||
"houseplan-assets/editor-Smidzxh-.js",
|
||||
"houseplan-assets/fr-BpPEm3l_.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-Cm9Tdisx.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-CJRAg8Ds.js"
|
||||
"houseplan-assets/backdrop-pick-kTELevqr.js",
|
||||
"houseplan-assets/de-AHNLzL6a.js",
|
||||
"houseplan-assets/editor-SRL8gQMd.js",
|
||||
"houseplan-assets/fr-CjT4vH5l.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-CA83upmb.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-fXC2PU8z.js"
|
||||
],
|
||||
"lazyGzipBytes": 198400,
|
||||
"lazyGzipBytes": 198433,
|
||||
"lazyEditorFiles": [
|
||||
"houseplan-assets/backdrop-pick-C6t5Muol.js",
|
||||
"houseplan-assets/editor-Smidzxh-.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-Cm9Tdisx.js"
|
||||
"houseplan-assets/backdrop-pick-kTELevqr.js",
|
||||
"houseplan-assets/editor-SRL8gQMd.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-CA83upmb.js"
|
||||
],
|
||||
"lazyEditorGzipBytes": 143890,
|
||||
"lazyEditorGzipBytes": 143900,
|
||||
"lazyOnboardingFiles": [
|
||||
"houseplan-assets/backdrop-pick-C6t5Muol.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-CJRAg8Ds.js"
|
||||
"houseplan-assets/backdrop-pick-kTELevqr.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-fXC2PU8z.js"
|
||||
],
|
||||
"lazyOnboardingGzipBytes": 13784,
|
||||
"lazyOnboardingGzipBytes": 13792,
|
||||
"lazyLocaleFiles": [
|
||||
"houseplan-assets/de-D1qmwFdr.js",
|
||||
"houseplan-assets/fr-BpPEm3l_.js"
|
||||
"houseplan-assets/de-AHNLzL6a.js",
|
||||
"houseplan-assets/fr-CjT4vH5l.js"
|
||||
],
|
||||
"lazyLocaleGzipBytes": 47795,
|
||||
"lazyLocaleGzipBytes": 47813,
|
||||
"files": [
|
||||
{
|
||||
"path": "houseplan-assets/backdrop-pick-C6t5Muol.js",
|
||||
"sha256": "bf8bb4c4b64419d4e10223d0f921c22cb4cf3caffa2e70e80a84b9663d9d1900",
|
||||
"path": "houseplan-assets/backdrop-pick-kTELevqr.js",
|
||||
"sha256": "c68ace1e4636fc5a0c5949ffb040712947456c5cc4b2804057bc279d5b67e8c0",
|
||||
"rawBytes": 20636,
|
||||
"gzipBytes": 7069,
|
||||
"gzipBytes": 7072,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-D6oRBCJr.js"
|
||||
"houseplan-assets/houseplan-card-CyGYTKu4.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/de-D1qmwFdr.js",
|
||||
"sha256": "c87851d76b96f22388f79343c352f06c5f9e32484f78e68447523472f1f0a4d2",
|
||||
"path": "houseplan-assets/de-AHNLzL6a.js",
|
||||
"sha256": "b6af461fd729c86fd5dbfa051388255f624be7446893c29dda574e54514fc851",
|
||||
"rawBytes": 80033,
|
||||
"gzipBytes": 24133,
|
||||
"gzipBytes": 24143,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/editor-Smidzxh-.js",
|
||||
"sha256": "39d5cb1112e4e23407c76d8572e63c55f0486125ff9710a680433228169d79e9",
|
||||
"path": "houseplan-assets/editor-SRL8gQMd.js",
|
||||
"sha256": "351dd97bba249920ac1a9ab6b0c10530ab00b69a26623e97d77c242fdf5c1753",
|
||||
"rawBytes": 3826,
|
||||
"gzipBytes": 1579,
|
||||
"gzipBytes": 1583,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-D6oRBCJr.js"
|
||||
"houseplan-assets/houseplan-card-CyGYTKu4.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/fr-BpPEm3l_.js",
|
||||
"sha256": "c991e5ba63141543fdcf1e4b93fe49f8e06a5fb6c2679a08fd2dcca27c0feefd",
|
||||
"path": "houseplan-assets/fr-CjT4vH5l.js",
|
||||
"sha256": "3b5ffef8bb16ee16ccc358fe78731c50bc2ff781bec03a61077c7ff89fc04c06",
|
||||
"rawBytes": 82227,
|
||||
"gzipBytes": 23662,
|
||||
"gzipBytes": 23670,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-card-D6oRBCJr.js",
|
||||
"sha256": "e0a7770eef3772e3a55d54fae794e145819102b83a78bdc82edf99f0a6960956",
|
||||
"path": "houseplan-assets/houseplan-card-CyGYTKu4.js",
|
||||
"sha256": "461b3482f3a3f718eaa4015b580aa073fe3685d57160400772660aaae30032f6",
|
||||
"rawBytes": 1005647,
|
||||
"gzipBytes": 283238,
|
||||
"gzipBytes": 283250,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": [
|
||||
"houseplan-assets/de-D1qmwFdr.js",
|
||||
"houseplan-assets/editor-Smidzxh-.js",
|
||||
"houseplan-assets/fr-BpPEm3l_.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-Cm9Tdisx.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-CJRAg8Ds.js"
|
||||
"houseplan-assets/de-AHNLzL6a.js",
|
||||
"houseplan-assets/editor-SRL8gQMd.js",
|
||||
"houseplan-assets/fr-CjT4vH5l.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-CA83upmb.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-fXC2PU8z.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-editor-runtime-Cm9Tdisx.js",
|
||||
"sha256": "4d4c1f1b8f57d2b6c444b485b0f381f448465b4fd71f96473e3453338dfb18ef",
|
||||
"path": "houseplan-assets/houseplan-editor-runtime-CA83upmb.js",
|
||||
"sha256": "de02cee4c5965e0738332a7b8c5b2f619c986811d943afd0c3e5ec714b20ed58",
|
||||
"rawBytes": 524015,
|
||||
"gzipBytes": 135242,
|
||||
"gzipBytes": 135245,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/backdrop-pick-C6t5Muol.js",
|
||||
"houseplan-assets/houseplan-card-D6oRBCJr.js"
|
||||
"houseplan-assets/backdrop-pick-kTELevqr.js",
|
||||
"houseplan-assets/houseplan-card-CyGYTKu4.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-onboarding-runtime-CJRAg8Ds.js",
|
||||
"sha256": "2c12c885413481d006f4832dfcf3f2b73328cf3b19e6e5ecedf551f03bf431dd",
|
||||
"path": "houseplan-assets/houseplan-onboarding-runtime-fXC2PU8z.js",
|
||||
"sha256": "72a981a70f19ee5b62f1698bdb39ab7959a74545f5f414c632a2b6b421b9f17b",
|
||||
"rawBytes": 27120,
|
||||
"gzipBytes": 6715,
|
||||
"gzipBytes": 6720,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/backdrop-pick-C6t5Muol.js",
|
||||
"houseplan-assets/houseplan-card-D6oRBCJr.js"
|
||||
"houseplan-assets/backdrop-pick-kTELevqr.js",
|
||||
"houseplan-assets/houseplan-card-CyGYTKu4.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-card.js",
|
||||
"sha256": "fd3f33f369a3baaee73388bf6a365fa0257aa1041e601ba24ebac4cbb7a6defe",
|
||||
"sha256": "922d47cfd910b3b020a8895d81f27b0f5b85e92e2c2fe070e6d9decca671f9d9",
|
||||
"rawBytes": 1183,
|
||||
"gzipBytes": 794,
|
||||
"gzipBytes": 797,
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-D6oRBCJr.js"
|
||||
"houseplan-assets/houseplan-card-CyGYTKu4.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__="0e8d30adade283ab7261c15ec572b05a573651ed4a54f16fb281bfe0f3b1b5a1";import{b as e,l as o,t,d7 as s,A as a,d8 as i,d9 as l,da as n,E as r,c}from"./houseplan-card-D6oRBCJr.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__="00b256c13474be2ef769918ca1fe2f839c75e281e0017d9518b9c18bfa21b949";import{b as e,l as o,t,d7 as s,A as a,d8 as i,d9 as l,da as n,E as r,c}from"./houseplan-card-CyGYTKu4.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
+3
-3
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__="0e8d30adade283ab7261c15ec572b05a573651ed4a54f16fb281bfe0f3b1b5a1";import{l as t,ar as s,A as e,t as o,c as a,bV as l,bW as i,bX as h,bY as c,ao as n,bZ as p,c2 as r,b_ as _,b$ as d,c0 as u,c1 as g,cX as m,an as b,ap as $,cY as v}from"./houseplan-card-D6oRBCJr.js";import{i as f,c as y,e as w,r as D,a as S,b as k,s as C,t as M}from"./backdrop-pick-C6t5Muol.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="0e8d30adade283ab7261c15ec572b05a573651ed4a54f16fb281bfe0f3b1b5a1";class I{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__="00b256c13474be2ef769918ca1fe2f839c75e281e0017d9518b9c18bfa21b949";import{l as t,ar as s,A as e,t as o,c as a,bV as l,bW as i,bX as h,bY as c,ao as n,bZ as p,c2 as r,b_ as _,b$ as d,c0 as u,c1 as g,cX as m,an as b,ap as $,cY as v}from"./houseplan-card-CyGYTKu4.js";import{i as f,c as y,e as w,r as D,a as S,b as k,s as C,t as M}from"./backdrop-pick-kTELevqr.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="00b256c13474be2ef769918ca1fe2f839c75e281e0017d9518b9c18bfa21b949";class I{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,r="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:p(e),displayTouched:!0,hideDecor:o.hideDecor,hideOpenings:o.hideOpenings,roomColor:o.color,roomOpacity:o.opacity,fillMode:"none"===o.fill?"custom":o.fill,customFill:r,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=r(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){if(confirm(this.host._t("confirm.delete_plan",{name:t})))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__="0e8d30adade283ab7261c15ec572b05a573651ed4a54f16fb281bfe0f3b1b5a1";try{await import("./houseplan-assets/houseplan-card-D6oRBCJr.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__="00b256c13474be2ef769918ca1fe2f839c75e281e0017d9518b9c18bfa21b949";try{await import("./houseplan-assets/houseplan-card-CyGYTKu4.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)}
|
||||
|
||||
Vendored
+55
-55
@@ -1,125 +1,125 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"fingerprint": "0e8d30adade283ab7261c15ec572b05a573651ed4a54f16fb281bfe0f3b1b5a1",
|
||||
"fingerprint": "00b256c13474be2ef769918ca1fe2f839c75e281e0017d9518b9c18bfa21b949",
|
||||
"entry": "houseplan-card.js",
|
||||
"initialViewFiles": [
|
||||
"houseplan-assets/houseplan-card-D6oRBCJr.js",
|
||||
"houseplan-assets/houseplan-card-CyGYTKu4.js",
|
||||
"houseplan-card.js"
|
||||
],
|
||||
"initialViewGzipBytes": 284032,
|
||||
"initialViewGzipBytes": 284047,
|
||||
"lazyFiles": [
|
||||
"houseplan-assets/backdrop-pick-C6t5Muol.js",
|
||||
"houseplan-assets/de-D1qmwFdr.js",
|
||||
"houseplan-assets/editor-Smidzxh-.js",
|
||||
"houseplan-assets/fr-BpPEm3l_.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-Cm9Tdisx.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-CJRAg8Ds.js"
|
||||
"houseplan-assets/backdrop-pick-kTELevqr.js",
|
||||
"houseplan-assets/de-AHNLzL6a.js",
|
||||
"houseplan-assets/editor-SRL8gQMd.js",
|
||||
"houseplan-assets/fr-CjT4vH5l.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-CA83upmb.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-fXC2PU8z.js"
|
||||
],
|
||||
"lazyGzipBytes": 198400,
|
||||
"lazyGzipBytes": 198433,
|
||||
"lazyEditorFiles": [
|
||||
"houseplan-assets/backdrop-pick-C6t5Muol.js",
|
||||
"houseplan-assets/editor-Smidzxh-.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-Cm9Tdisx.js"
|
||||
"houseplan-assets/backdrop-pick-kTELevqr.js",
|
||||
"houseplan-assets/editor-SRL8gQMd.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-CA83upmb.js"
|
||||
],
|
||||
"lazyEditorGzipBytes": 143890,
|
||||
"lazyEditorGzipBytes": 143900,
|
||||
"lazyOnboardingFiles": [
|
||||
"houseplan-assets/backdrop-pick-C6t5Muol.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-CJRAg8Ds.js"
|
||||
"houseplan-assets/backdrop-pick-kTELevqr.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-fXC2PU8z.js"
|
||||
],
|
||||
"lazyOnboardingGzipBytes": 13784,
|
||||
"lazyOnboardingGzipBytes": 13792,
|
||||
"lazyLocaleFiles": [
|
||||
"houseplan-assets/de-D1qmwFdr.js",
|
||||
"houseplan-assets/fr-BpPEm3l_.js"
|
||||
"houseplan-assets/de-AHNLzL6a.js",
|
||||
"houseplan-assets/fr-CjT4vH5l.js"
|
||||
],
|
||||
"lazyLocaleGzipBytes": 47795,
|
||||
"lazyLocaleGzipBytes": 47813,
|
||||
"files": [
|
||||
{
|
||||
"path": "houseplan-assets/backdrop-pick-C6t5Muol.js",
|
||||
"sha256": "bf8bb4c4b64419d4e10223d0f921c22cb4cf3caffa2e70e80a84b9663d9d1900",
|
||||
"path": "houseplan-assets/backdrop-pick-kTELevqr.js",
|
||||
"sha256": "c68ace1e4636fc5a0c5949ffb040712947456c5cc4b2804057bc279d5b67e8c0",
|
||||
"rawBytes": 20636,
|
||||
"gzipBytes": 7069,
|
||||
"gzipBytes": 7072,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-D6oRBCJr.js"
|
||||
"houseplan-assets/houseplan-card-CyGYTKu4.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/de-D1qmwFdr.js",
|
||||
"sha256": "c87851d76b96f22388f79343c352f06c5f9e32484f78e68447523472f1f0a4d2",
|
||||
"path": "houseplan-assets/de-AHNLzL6a.js",
|
||||
"sha256": "b6af461fd729c86fd5dbfa051388255f624be7446893c29dda574e54514fc851",
|
||||
"rawBytes": 80033,
|
||||
"gzipBytes": 24133,
|
||||
"gzipBytes": 24143,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/editor-Smidzxh-.js",
|
||||
"sha256": "39d5cb1112e4e23407c76d8572e63c55f0486125ff9710a680433228169d79e9",
|
||||
"path": "houseplan-assets/editor-SRL8gQMd.js",
|
||||
"sha256": "351dd97bba249920ac1a9ab6b0c10530ab00b69a26623e97d77c242fdf5c1753",
|
||||
"rawBytes": 3826,
|
||||
"gzipBytes": 1579,
|
||||
"gzipBytes": 1583,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-D6oRBCJr.js"
|
||||
"houseplan-assets/houseplan-card-CyGYTKu4.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/fr-BpPEm3l_.js",
|
||||
"sha256": "c991e5ba63141543fdcf1e4b93fe49f8e06a5fb6c2679a08fd2dcca27c0feefd",
|
||||
"path": "houseplan-assets/fr-CjT4vH5l.js",
|
||||
"sha256": "3b5ffef8bb16ee16ccc358fe78731c50bc2ff781bec03a61077c7ff89fc04c06",
|
||||
"rawBytes": 82227,
|
||||
"gzipBytes": 23662,
|
||||
"gzipBytes": 23670,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-card-D6oRBCJr.js",
|
||||
"sha256": "e0a7770eef3772e3a55d54fae794e145819102b83a78bdc82edf99f0a6960956",
|
||||
"path": "houseplan-assets/houseplan-card-CyGYTKu4.js",
|
||||
"sha256": "461b3482f3a3f718eaa4015b580aa073fe3685d57160400772660aaae30032f6",
|
||||
"rawBytes": 1005647,
|
||||
"gzipBytes": 283238,
|
||||
"gzipBytes": 283250,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": [
|
||||
"houseplan-assets/de-D1qmwFdr.js",
|
||||
"houseplan-assets/editor-Smidzxh-.js",
|
||||
"houseplan-assets/fr-BpPEm3l_.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-Cm9Tdisx.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-CJRAg8Ds.js"
|
||||
"houseplan-assets/de-AHNLzL6a.js",
|
||||
"houseplan-assets/editor-SRL8gQMd.js",
|
||||
"houseplan-assets/fr-CjT4vH5l.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-CA83upmb.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-fXC2PU8z.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-editor-runtime-Cm9Tdisx.js",
|
||||
"sha256": "4d4c1f1b8f57d2b6c444b485b0f381f448465b4fd71f96473e3453338dfb18ef",
|
||||
"path": "houseplan-assets/houseplan-editor-runtime-CA83upmb.js",
|
||||
"sha256": "de02cee4c5965e0738332a7b8c5b2f619c986811d943afd0c3e5ec714b20ed58",
|
||||
"rawBytes": 524015,
|
||||
"gzipBytes": 135242,
|
||||
"gzipBytes": 135245,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/backdrop-pick-C6t5Muol.js",
|
||||
"houseplan-assets/houseplan-card-D6oRBCJr.js"
|
||||
"houseplan-assets/backdrop-pick-kTELevqr.js",
|
||||
"houseplan-assets/houseplan-card-CyGYTKu4.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-onboarding-runtime-CJRAg8Ds.js",
|
||||
"sha256": "2c12c885413481d006f4832dfcf3f2b73328cf3b19e6e5ecedf551f03bf431dd",
|
||||
"path": "houseplan-assets/houseplan-onboarding-runtime-fXC2PU8z.js",
|
||||
"sha256": "72a981a70f19ee5b62f1698bdb39ab7959a74545f5f414c632a2b6b421b9f17b",
|
||||
"rawBytes": 27120,
|
||||
"gzipBytes": 6715,
|
||||
"gzipBytes": 6720,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/backdrop-pick-C6t5Muol.js",
|
||||
"houseplan-assets/houseplan-card-D6oRBCJr.js"
|
||||
"houseplan-assets/backdrop-pick-kTELevqr.js",
|
||||
"houseplan-assets/houseplan-card-CyGYTKu4.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-card.js",
|
||||
"sha256": "fd3f33f369a3baaee73388bf6a365fa0257aa1041e601ba24ebac4cbb7a6defe",
|
||||
"sha256": "922d47cfd910b3b020a8895d81f27b0f5b85e92e2c2fe070e6d9decca671f9d9",
|
||||
"rawBytes": 1183,
|
||||
"gzipBytes": 794,
|
||||
"gzipBytes": 797,
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-D6oRBCJr.js"
|
||||
"houseplan-assets/houseplan-card-CyGYTKu4.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
}
|
||||
|
||||
Vendored
+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__="0e8d30adade283ab7261c15ec572b05a573651ed4a54f16fb281bfe0f3b1b5a1";import{b as e,l as o,t,d7 as s,A as a,d8 as i,d9 as l,da as n,E as r,c}from"./houseplan-card-D6oRBCJr.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__="00b256c13474be2ef769918ca1fe2f839c75e281e0017d9518b9c18bfa21b949";import{b as e,l as o,t,d7 as s,A as a,d8 as i,d9 as l,da as n,E as r,c}from"./houseplan-card-CyGYTKu4.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
+3
-3
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__="0e8d30adade283ab7261c15ec572b05a573651ed4a54f16fb281bfe0f3b1b5a1";import{l as t,ar as s,A as e,t as o,c as a,bV as l,bW as i,bX as h,bY as c,ao as n,bZ as p,c2 as r,b_ as _,b$ as d,c0 as u,c1 as g,cX as m,an as b,ap as $,cY as v}from"./houseplan-card-D6oRBCJr.js";import{i as f,c as y,e as w,r as D,a as S,b as k,s as C,t as M}from"./backdrop-pick-C6t5Muol.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="0e8d30adade283ab7261c15ec572b05a573651ed4a54f16fb281bfe0f3b1b5a1";class I{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__="00b256c13474be2ef769918ca1fe2f839c75e281e0017d9518b9c18bfa21b949";import{l as t,ar as s,A as e,t as o,c as a,bV as l,bW as i,bX as h,bY as c,ao as n,bZ as p,c2 as r,b_ as _,b$ as d,c0 as u,c1 as g,cX as m,an as b,ap as $,cY as v}from"./houseplan-card-CyGYTKu4.js";import{i as f,c as y,e as w,r as D,a as S,b as k,s as C,t as M}from"./backdrop-pick-kTELevqr.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="00b256c13474be2ef769918ca1fe2f839c75e281e0017d9518b9c18bfa21b949";class I{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,r="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:p(e),displayTouched:!0,hideDecor:o.hideDecor,hideOpenings:o.hideOpenings,roomColor:o.color,roomOpacity:o.opacity,fillMode:"none"===o.fill?"custom":o.fill,customFill:r,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=r(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){if(confirm(this.host._t("confirm.delete_plan",{name:t})))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":""}">
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="0e8d30adade283ab7261c15ec572b05a573651ed4a54f16fb281bfe0f3b1b5a1";try{await import("./houseplan-assets/houseplan-card-D6oRBCJr.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__="00b256c13474be2ef769918ca1fe2f839c75e281e0017d9518b9c18bfa21b949";try{await import("./houseplan-assets/houseplan-card-CyGYTKu4.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)}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 141 KiB After Width: | Height: | Size: 141 KiB |
@@ -3,7 +3,7 @@
|
||||
"fixture": "synthetic-only",
|
||||
"chromium": "151.0.7922.34",
|
||||
"oxipng": null,
|
||||
"sourceFingerprint": "26e486f1478823120151a6a5e99c8f0707577175ebe40e5bac8ec7bc46f9b73f",
|
||||
"sourceFingerprint": "1e771efeeaab6305a5897692f623937a5756b3e5af7c2cae31ab6fdaa7132093",
|
||||
"captureScriptSha256": "9229c467130e1f3d3abd042e2dcabaca9d4d5a918d0d77eadc814848df597ba6",
|
||||
"command": "npm run build && node demo/docs/capture.mjs",
|
||||
"scenarios": {
|
||||
@@ -15,7 +15,7 @@
|
||||
},
|
||||
"theme": "dark",
|
||||
"language": "en",
|
||||
"sourceSha256": "26e486f1478823120151a6a5e99c8f0707577175ebe40e5bac8ec7bc46f9b73f",
|
||||
"sourceSha256": "1e771efeeaab6305a5897692f623937a5756b3e5af7c2cae31ab6fdaa7132093",
|
||||
"imageSha256": "78d328498bd17a9ee1ec44b389d244b61fca9ac52c9aad6631aa85c53233fec0"
|
||||
},
|
||||
"view-touch": {
|
||||
@@ -26,7 +26,7 @@
|
||||
},
|
||||
"theme": "dark",
|
||||
"language": "en",
|
||||
"sourceSha256": "26e486f1478823120151a6a5e99c8f0707577175ebe40e5bac8ec7bc46f9b73f",
|
||||
"sourceSha256": "1e771efeeaab6305a5897692f623937a5756b3e5af7c2cae31ab6fdaa7132093",
|
||||
"imageSha256": "3be239a5a494f6776540a9c0049694ee6f9d2ba927c8bcb4b26ee5a69a228a7d"
|
||||
},
|
||||
"space-create": {
|
||||
@@ -37,7 +37,7 @@
|
||||
},
|
||||
"theme": "dark",
|
||||
"language": "en",
|
||||
"sourceSha256": "26e486f1478823120151a6a5e99c8f0707577175ebe40e5bac8ec7bc46f9b73f",
|
||||
"sourceSha256": "1e771efeeaab6305a5897692f623937a5756b3e5af7c2cae31ab6fdaa7132093",
|
||||
"imageSha256": "4e1d23a307d4ebddb93c52144c64b219889463583462a8e20808e850290dc867"
|
||||
},
|
||||
"room-contour-close": {
|
||||
@@ -48,7 +48,7 @@
|
||||
},
|
||||
"theme": "dark",
|
||||
"language": "en",
|
||||
"sourceSha256": "26e486f1478823120151a6a5e99c8f0707577175ebe40e5bac8ec7bc46f9b73f",
|
||||
"sourceSha256": "1e771efeeaab6305a5897692f623937a5756b3e5af7c2cae31ab6fdaa7132093",
|
||||
"imageSha256": "d7b3d90a2d01ce4575dc2192792bbdd89a5785e39fb1085f200854fe40c131e6"
|
||||
},
|
||||
"plan-context-tray": {
|
||||
@@ -59,7 +59,7 @@
|
||||
},
|
||||
"theme": "dark",
|
||||
"language": "en",
|
||||
"sourceSha256": "26e486f1478823120151a6a5e99c8f0707577175ebe40e5bac8ec7bc46f9b73f",
|
||||
"sourceSha256": "1e771efeeaab6305a5897692f623937a5756b3e5af7c2cae31ab6fdaa7132093",
|
||||
"imageSha256": "e5a7517de84c9301cc344d676bf05b46894d712f8008d2407f9690c9ce89d22d"
|
||||
},
|
||||
"device-editor": {
|
||||
@@ -70,7 +70,7 @@
|
||||
},
|
||||
"theme": "dark",
|
||||
"language": "en",
|
||||
"sourceSha256": "26e486f1478823120151a6a5e99c8f0707577175ebe40e5bac8ec7bc46f9b73f",
|
||||
"sourceSha256": "1e771efeeaab6305a5897692f623937a5756b3e5af7c2cae31ab6fdaa7132093",
|
||||
"imageSha256": "ab651351d6d56b84ddc823684c5ad5b77c34f23eea8b1e3ff627f2f3c3abfc8c"
|
||||
},
|
||||
"device-display-preview": {
|
||||
@@ -81,7 +81,7 @@
|
||||
},
|
||||
"theme": "dark",
|
||||
"language": "en",
|
||||
"sourceSha256": "26e486f1478823120151a6a5e99c8f0707577175ebe40e5bac8ec7bc46f9b73f",
|
||||
"sourceSha256": "1e771efeeaab6305a5897692f623937a5756b3e5af7c2cae31ab6fdaa7132093",
|
||||
"imageSha256": "bac3570787e879bab946b8e6de3dffcdef2ce122280f0d899aee042f237664c6"
|
||||
},
|
||||
"background-editor": {
|
||||
@@ -92,7 +92,7 @@
|
||||
},
|
||||
"theme": "dark",
|
||||
"language": "en",
|
||||
"sourceSha256": "26e486f1478823120151a6a5e99c8f0707577175ebe40e5bac8ec7bc46f9b73f",
|
||||
"sourceSha256": "1e771efeeaab6305a5897692f623937a5756b3e5af7c2cae31ab6fdaa7132093",
|
||||
"imageSha256": "fb1c2bcb8bf253275e2fd3316328fb86cee97a6834d59d122ce56de85834b4e4"
|
||||
},
|
||||
"room-card": {
|
||||
@@ -103,7 +103,7 @@
|
||||
},
|
||||
"theme": "dark",
|
||||
"language": "en",
|
||||
"sourceSha256": "26e486f1478823120151a6a5e99c8f0707577175ebe40e5bac8ec7bc46f9b73f",
|
||||
"sourceSha256": "1e771efeeaab6305a5897692f623937a5756b3e5af7c2cae31ab6fdaa7132093",
|
||||
"imageSha256": "504600892f95a6da086836b909dd2d16583967f85ac48b7318d3f04b3e8cfc58"
|
||||
},
|
||||
"device-info": {
|
||||
@@ -114,8 +114,8 @@
|
||||
},
|
||||
"theme": "dark",
|
||||
"language": "en",
|
||||
"sourceSha256": "26e486f1478823120151a6a5e99c8f0707577175ebe40e5bac8ec7bc46f9b73f",
|
||||
"imageSha256": "9c246e637f4e4a0bde66c9bdbd755589a227795ba24fc2ab2a01f82804e65df6"
|
||||
"sourceSha256": "1e771efeeaab6305a5897692f623937a5756b3e5af7c2cae31ab6fdaa7132093",
|
||||
"imageSha256": "f94424127921a96b71d7b6babd7840f6dcfcb7b6fea8a7a4d42e06f2b1777aca"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user