mirror of
https://github.com/Matysh/houseplan-card
synced 2026-10-02 04:38:55 +00:00
fix: preserve rollback across config canonicalization
Issue: #442 User-Visible: yes
This commit is contained in:
@@ -1,125 +1,125 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"fingerprint": "95168f1c726971da07e0db5ab14741bd71289cb3265b1c8b6adb7b35bba05803",
|
||||
"fingerprint": "9745c31cb7efba6ca6a53b0d3c4db9948844f285f4d9dbc1b4f17966979b9d15",
|
||||
"entry": "houseplan-card.js",
|
||||
"initialViewFiles": [
|
||||
"houseplan-assets/houseplan-card-BvAgJ87t.js",
|
||||
"houseplan-assets/houseplan-card-n2PxGqZY.js",
|
||||
"houseplan-card.js"
|
||||
],
|
||||
"initialViewGzipBytes": 292749,
|
||||
"initialViewGzipBytes": 292752,
|
||||
"lazyFiles": [
|
||||
"houseplan-assets/backdrop-pick-D3CDbTJH.js",
|
||||
"houseplan-assets/de-xlnnJVW-.js",
|
||||
"houseplan-assets/editor-D3IzcJm6.js",
|
||||
"houseplan-assets/fr-ChZzRRM9.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-TMHmDwn7.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-DPMSreRo.js"
|
||||
"houseplan-assets/backdrop-pick-DMGa8wc7.js",
|
||||
"houseplan-assets/de-BP_2FY3A.js",
|
||||
"houseplan-assets/editor-BoI8ovCT.js",
|
||||
"houseplan-assets/fr-DOlNp4ji.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-De35hz5H.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-dO-9we_v.js"
|
||||
],
|
||||
"lazyGzipBytes": 223387,
|
||||
"lazyGzipBytes": 223409,
|
||||
"lazyEditorFiles": [
|
||||
"houseplan-assets/backdrop-pick-D3CDbTJH.js",
|
||||
"houseplan-assets/editor-D3IzcJm6.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-TMHmDwn7.js"
|
||||
"houseplan-assets/backdrop-pick-DMGa8wc7.js",
|
||||
"houseplan-assets/editor-BoI8ovCT.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-De35hz5H.js"
|
||||
],
|
||||
"lazyEditorGzipBytes": 167346,
|
||||
"lazyEditorGzipBytes": 167369,
|
||||
"lazyOnboardingFiles": [
|
||||
"houseplan-assets/backdrop-pick-D3CDbTJH.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-DPMSreRo.js"
|
||||
"houseplan-assets/backdrop-pick-DMGa8wc7.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-dO-9we_v.js"
|
||||
],
|
||||
"lazyOnboardingGzipBytes": 14239,
|
||||
"lazyOnboardingGzipBytes": 14244,
|
||||
"lazyLocaleFiles": [
|
||||
"houseplan-assets/de-xlnnJVW-.js",
|
||||
"houseplan-assets/fr-ChZzRRM9.js"
|
||||
"houseplan-assets/de-BP_2FY3A.js",
|
||||
"houseplan-assets/fr-DOlNp4ji.js"
|
||||
],
|
||||
"lazyLocaleGzipBytes": 49084,
|
||||
"lazyLocaleGzipBytes": 49080,
|
||||
"files": [
|
||||
{
|
||||
"path": "houseplan-assets/backdrop-pick-D3CDbTJH.js",
|
||||
"sha256": "86dad7d06ad6a0a2a716a8e5c1e305544f5aa5cfee89cbc957f6150088d768c7",
|
||||
"path": "houseplan-assets/backdrop-pick-DMGa8wc7.js",
|
||||
"sha256": "6226595cb5753e94dbba8a99943f5d7133eb19cfb43d2c7af574b2cd1c995c7a",
|
||||
"rawBytes": 21418,
|
||||
"gzipBytes": 7282,
|
||||
"gzipBytes": 7284,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-BvAgJ87t.js"
|
||||
"houseplan-assets/houseplan-card-n2PxGqZY.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/de-xlnnJVW-.js",
|
||||
"sha256": "5a4f190b9d79c5776d304fecc774615338d26508737dfbac4de16de9c74bf29b",
|
||||
"path": "houseplan-assets/de-BP_2FY3A.js",
|
||||
"sha256": "0925d353b13fb9ed03f06fa910fb44f9f7460f1edf8efaf1299c91117d223697",
|
||||
"rawBytes": 82140,
|
||||
"gzipBytes": 24811,
|
||||
"gzipBytes": 24809,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/editor-D3IzcJm6.js",
|
||||
"sha256": "a7efd07a8e754879d1b823928b203f40cf26bf3c5a1eee3dad6683c9104f2263",
|
||||
"path": "houseplan-assets/editor-BoI8ovCT.js",
|
||||
"sha256": "4c882564e63a08f64b1b34ad231bd85d897e12cd2973a1ffcbcfe0d091ceff02",
|
||||
"rawBytes": 3826,
|
||||
"gzipBytes": 1582,
|
||||
"gzipBytes": 1585,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-BvAgJ87t.js"
|
||||
"houseplan-assets/houseplan-card-n2PxGqZY.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/fr-ChZzRRM9.js",
|
||||
"sha256": "35b0f8dbcd2b72874ac4859a72dd43550ce43a215c1787053dfc17cee3575a00",
|
||||
"path": "houseplan-assets/fr-DOlNp4ji.js",
|
||||
"sha256": "d54f2c24b83c924eba22439817b54d7793af00d28fd4f16e18e0cf35e8737ea3",
|
||||
"rawBytes": 84267,
|
||||
"gzipBytes": 24273,
|
||||
"gzipBytes": 24271,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-card-BvAgJ87t.js",
|
||||
"sha256": "da6dfaf903f1b78c302552be5235323beac01a0b3a0fd3ea433004d7bcb601e6",
|
||||
"path": "houseplan-assets/houseplan-card-n2PxGqZY.js",
|
||||
"sha256": "f2e5ff91866347e77fe2d924294e119651f41641356d1f761188f175500c2af1",
|
||||
"rawBytes": 1039630,
|
||||
"gzipBytes": 291952,
|
||||
"gzipBytes": 291954,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": [
|
||||
"houseplan-assets/de-xlnnJVW-.js",
|
||||
"houseplan-assets/editor-D3IzcJm6.js",
|
||||
"houseplan-assets/fr-ChZzRRM9.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-TMHmDwn7.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-DPMSreRo.js"
|
||||
"houseplan-assets/de-BP_2FY3A.js",
|
||||
"houseplan-assets/editor-BoI8ovCT.js",
|
||||
"houseplan-assets/fr-DOlNp4ji.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-De35hz5H.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-dO-9we_v.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-editor-runtime-TMHmDwn7.js",
|
||||
"sha256": "c5c266584d6df72340fc6c2ab59614d3c1130f0d32303670d3e7a44c9ee65cad",
|
||||
"rawBytes": 601452,
|
||||
"gzipBytes": 158482,
|
||||
"path": "houseplan-assets/houseplan-editor-runtime-De35hz5H.js",
|
||||
"sha256": "9f44dafa722abba6a47073110496e99d178ee661f38bed2e189280f629980f73",
|
||||
"rawBytes": 601529,
|
||||
"gzipBytes": 158500,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/backdrop-pick-D3CDbTJH.js",
|
||||
"houseplan-assets/houseplan-card-BvAgJ87t.js"
|
||||
"houseplan-assets/backdrop-pick-DMGa8wc7.js",
|
||||
"houseplan-assets/houseplan-card-n2PxGqZY.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-onboarding-runtime-DPMSreRo.js",
|
||||
"sha256": "406fdca553c0e2a9bc540f08494b5ed5d0eddad6fb8b4464f495829f15f2fe98",
|
||||
"path": "houseplan-assets/houseplan-onboarding-runtime-dO-9we_v.js",
|
||||
"sha256": "429df2912042da7959c13847d96b6a957a5e097c2899b82e82bb0f9820e86067",
|
||||
"rawBytes": 28088,
|
||||
"gzipBytes": 6957,
|
||||
"gzipBytes": 6960,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/backdrop-pick-D3CDbTJH.js",
|
||||
"houseplan-assets/houseplan-card-BvAgJ87t.js"
|
||||
"houseplan-assets/backdrop-pick-DMGa8wc7.js",
|
||||
"houseplan-assets/houseplan-card-n2PxGqZY.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-card.js",
|
||||
"sha256": "52b94e2778e06f581ac04190de391fbde7f106bd2c6659d3c19bcfff47c66451",
|
||||
"sha256": "8c663d28d60b83468ee17e7b8e6891d9579e96e1c8c89cd5ca2ecd23c89e84a3",
|
||||
"rawBytes": 1183,
|
||||
"gzipBytes": 797,
|
||||
"gzipBytes": 798,
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-BvAgJ87t.js"
|
||||
"houseplan-assets/houseplan-card-n2PxGqZY.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
+5
-5
@@ -1,14 +1,14 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="95168f1c726971da07e0db5ab14741bd71289cb3265b1c8b6adb7b35bba05803";import{k as e,l as o,t,dm as s,A as a,dn as i,dp as l,dq as n,E as r,c}from"./houseplan-card-BvAgJ87t.js";class h extends e{constructor(){super(...arguments),this._spaces=null,this._spacesLoading=!1,this._spacesAuthoritative=!1}setConfig(e){this._config=e}async _loadSpaces(){if(!this._spaces&&!this._spacesLoading&&this.hass){this._spacesLoading=!0;try{const e=await this.hass.callWS({type:"houseplan/config/get"});this._spaces=(e?.config?.spaces||[]).map(e=>({value:e.id,label:e.title||e.id})),this._spacesAuthoritative=!0}catch{this._spaces=[],this._spacesAuthoritative=!1}finally{this._spacesLoading=!1}}}get _lang(){return o(this.hass,this._config?.language)}get _floorToken(){const e=this._config?.floor;return"number"==typeof e?`__houseplan_yaml_floor_index__:${String(e)}`:null}get _formData(){const e={...this._config},o=this._floorToken;return o?e.floor=o:Object.prototype.hasOwnProperty.call(e,"floor")||(e.floor=""),e}get _schema(){const e=this._spaces||[],o=this._lang,a=[{value:"",label:t(o,"editor.floor_none")}],i=this._floorToken;i&&a.push({value:i,label:t(o,"editor.floor_index",{index:String(this._config?.floor)})});const l="string"==typeof this._config?.floor?this._config.floor:"";l&&!e.some(e=>e.value===l)&&a.push({value:l,label:l}),a.push(...e);const n="string"==typeof this._config?.default_floor?this._config.default_floor:"",r=[...e];return n&&!e.some(e=>e.value===n)&&r.unshift({value:n,label:n}),[{name:"title",selector:{text:{}}},{name:"floor",selector:{select:{mode:"dropdown",options:a}}},e.length?{name:"default_floor",selector:{select:{mode:"dropdown",options:r}}}:{name:"default_floor",selector:{text:{}}},{name:"language",selector:{select:{mode:"dropdown",options:s(t(o,"editor.lang_auto"),this._config?.language)}}},{name:"icon_size",selector:{number:{min:1,max:6,step:.1,mode:"box"}}},{name:"show_temperature",selector:{boolean:{}}},{name:"live_states",selector:{boolean:{}}},{name:"show_signal",selector:{boolean:{}}},{name:"kiosk",selector:{boolean:{}}},{name:"cycle",selector:{number:{min:0,max:3600,step:5,mode:"box"}}}]}render(){if(!this.hass||!this._config)return a;const e=i(this,l,o(this.hass,this._config.language));if("cold"===e)return n();if("warm"===e)return r;this._loadSpaces();const s=this._lang,h={title:t(s,"editor.title"),floor:t(s,"editor.floor"),default_floor:t(s,"editor.default_floor"),language:t(s,"editor.language"),icon_size:t(s,"editor.icon_size"),show_temperature:t(s,"editor.show_temperature"),live_states:t(s,"editor.live_states"),show_signal:t(s,"editor.show_signal"),kiosk:t(s,"editor.kiosk"),cycle:t(s,"editor.cycle")},_=this._schema,f=function(e,o,t){if(!t||null===o)return null;const s="string"==typeof e?.default_floor?e.default_floor:"";return!s||o.some(e=>e.value===s)?null:s}(this._config,this._spaces,this._spacesAuthoritative),d=e=>c`<ha-form
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="9745c31cb7efba6ca6a53b0d3c4db9948844f285f4d9dbc1b4f17966979b9d15";import{k as e,l as o,t,dm as s,A as a,dn as i,dp as l,dq as n,E as r,c}from"./houseplan-card-n2PxGqZY.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}
|
||||
.computeLabel=${e=>h[e.name]||e.name}
|
||||
@value-changed=${this._valueChanged}
|
||||
></ha-form>`;return c`
|
||||
${d(_.slice(0,3))}
|
||||
${f?c`<div class="default-floor-error" role="alert"
|
||||
${d(f.slice(0,3))}
|
||||
${_?c`<div class="default-floor-error" role="alert"
|
||||
style="color:var(--error-color,#db4437);margin:-4px 0 12px;overflow-wrap:anywhere">
|
||||
${t(s,"editor.default_floor_missing",{id:f})}
|
||||
${t(s,"editor.default_floor_missing",{id:_})}
|
||||
</div>`:a}
|
||||
${d(_.slice(3))}
|
||||
${d(f.slice(3))}
|
||||
`}_valueChanged(e){const o={...this._config,...e.detail.value};""===o.floor?delete o.floor:o.floor===this._floorToken&&(o.floor=this._config?.floor);const t=new Event("config-changed",{bubbles:!0,composed:!0});t.detail={config:o},this.dispatchEvent(t)}}h.properties={hass:{attribute:!1},_config:{state:!0},_spaces:{state:!0}},customElements.get("houseplan-card-editor")||customElements.define("houseplan-card-editor",h);
|
||||
+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
+4
-4
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,4 +1,4 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="95168f1c726971da07e0db5ab14741bd71289cb3265b1c8b6adb7b35bba05803";import{l as t,aQ as s,A as e,t as o,c as a,cd as l,ce as i,cf as h,cg as c,aN as n,ch as r,cm as p,ci as d,cj as _,ck as u,cl as g,dc as m,aM as b,aO as $,dd as v}from"./houseplan-card-BvAgJ87t.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-D3CDbTJH.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="95168f1c726971da07e0db5ab14741bd71289cb3265b1c8b6adb7b35bba05803";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__="9745c31cb7efba6ca6a53b0d3c4db9948844f285f4d9dbc1b4f17966979b9d15";import{l as t,aQ as s,A as e,t as o,c as a,cd as l,ce as i,cf as h,cg as c,aN as n,ch as r,cm as p,ci as d,cj as _,ck as u,cl as g,dc as m,aM as b,aO as $,dd as v}from"./houseplan-card-n2PxGqZY.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-DMGa8wc7.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="9745c31cb7efba6ca6a53b0d3c4db9948844f285f4d9dbc1b4f17966979b9d15";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 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="95168f1c726971da07e0db5ab14741bd71289cb3265b1c8b6adb7b35bba05803";try{await import("./houseplan-assets/houseplan-card-BvAgJ87t.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__="9745c31cb7efba6ca6a53b0d3c4db9948844f285f4d9dbc1b4f17966979b9d15";try{await import("./houseplan-assets/houseplan-card-n2PxGqZY.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
+56
-56
@@ -1,125 +1,125 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"fingerprint": "95168f1c726971da07e0db5ab14741bd71289cb3265b1c8b6adb7b35bba05803",
|
||||
"fingerprint": "9745c31cb7efba6ca6a53b0d3c4db9948844f285f4d9dbc1b4f17966979b9d15",
|
||||
"entry": "houseplan-card.js",
|
||||
"initialViewFiles": [
|
||||
"houseplan-assets/houseplan-card-BvAgJ87t.js",
|
||||
"houseplan-assets/houseplan-card-n2PxGqZY.js",
|
||||
"houseplan-card.js"
|
||||
],
|
||||
"initialViewGzipBytes": 292749,
|
||||
"initialViewGzipBytes": 292752,
|
||||
"lazyFiles": [
|
||||
"houseplan-assets/backdrop-pick-D3CDbTJH.js",
|
||||
"houseplan-assets/de-xlnnJVW-.js",
|
||||
"houseplan-assets/editor-D3IzcJm6.js",
|
||||
"houseplan-assets/fr-ChZzRRM9.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-TMHmDwn7.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-DPMSreRo.js"
|
||||
"houseplan-assets/backdrop-pick-DMGa8wc7.js",
|
||||
"houseplan-assets/de-BP_2FY3A.js",
|
||||
"houseplan-assets/editor-BoI8ovCT.js",
|
||||
"houseplan-assets/fr-DOlNp4ji.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-De35hz5H.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-dO-9we_v.js"
|
||||
],
|
||||
"lazyGzipBytes": 223387,
|
||||
"lazyGzipBytes": 223409,
|
||||
"lazyEditorFiles": [
|
||||
"houseplan-assets/backdrop-pick-D3CDbTJH.js",
|
||||
"houseplan-assets/editor-D3IzcJm6.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-TMHmDwn7.js"
|
||||
"houseplan-assets/backdrop-pick-DMGa8wc7.js",
|
||||
"houseplan-assets/editor-BoI8ovCT.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-De35hz5H.js"
|
||||
],
|
||||
"lazyEditorGzipBytes": 167346,
|
||||
"lazyEditorGzipBytes": 167369,
|
||||
"lazyOnboardingFiles": [
|
||||
"houseplan-assets/backdrop-pick-D3CDbTJH.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-DPMSreRo.js"
|
||||
"houseplan-assets/backdrop-pick-DMGa8wc7.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-dO-9we_v.js"
|
||||
],
|
||||
"lazyOnboardingGzipBytes": 14239,
|
||||
"lazyOnboardingGzipBytes": 14244,
|
||||
"lazyLocaleFiles": [
|
||||
"houseplan-assets/de-xlnnJVW-.js",
|
||||
"houseplan-assets/fr-ChZzRRM9.js"
|
||||
"houseplan-assets/de-BP_2FY3A.js",
|
||||
"houseplan-assets/fr-DOlNp4ji.js"
|
||||
],
|
||||
"lazyLocaleGzipBytes": 49084,
|
||||
"lazyLocaleGzipBytes": 49080,
|
||||
"files": [
|
||||
{
|
||||
"path": "houseplan-assets/backdrop-pick-D3CDbTJH.js",
|
||||
"sha256": "86dad7d06ad6a0a2a716a8e5c1e305544f5aa5cfee89cbc957f6150088d768c7",
|
||||
"path": "houseplan-assets/backdrop-pick-DMGa8wc7.js",
|
||||
"sha256": "6226595cb5753e94dbba8a99943f5d7133eb19cfb43d2c7af574b2cd1c995c7a",
|
||||
"rawBytes": 21418,
|
||||
"gzipBytes": 7282,
|
||||
"gzipBytes": 7284,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-BvAgJ87t.js"
|
||||
"houseplan-assets/houseplan-card-n2PxGqZY.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/de-xlnnJVW-.js",
|
||||
"sha256": "5a4f190b9d79c5776d304fecc774615338d26508737dfbac4de16de9c74bf29b",
|
||||
"path": "houseplan-assets/de-BP_2FY3A.js",
|
||||
"sha256": "0925d353b13fb9ed03f06fa910fb44f9f7460f1edf8efaf1299c91117d223697",
|
||||
"rawBytes": 82140,
|
||||
"gzipBytes": 24811,
|
||||
"gzipBytes": 24809,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/editor-D3IzcJm6.js",
|
||||
"sha256": "a7efd07a8e754879d1b823928b203f40cf26bf3c5a1eee3dad6683c9104f2263",
|
||||
"path": "houseplan-assets/editor-BoI8ovCT.js",
|
||||
"sha256": "4c882564e63a08f64b1b34ad231bd85d897e12cd2973a1ffcbcfe0d091ceff02",
|
||||
"rawBytes": 3826,
|
||||
"gzipBytes": 1582,
|
||||
"gzipBytes": 1585,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-BvAgJ87t.js"
|
||||
"houseplan-assets/houseplan-card-n2PxGqZY.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/fr-ChZzRRM9.js",
|
||||
"sha256": "35b0f8dbcd2b72874ac4859a72dd43550ce43a215c1787053dfc17cee3575a00",
|
||||
"path": "houseplan-assets/fr-DOlNp4ji.js",
|
||||
"sha256": "d54f2c24b83c924eba22439817b54d7793af00d28fd4f16e18e0cf35e8737ea3",
|
||||
"rawBytes": 84267,
|
||||
"gzipBytes": 24273,
|
||||
"gzipBytes": 24271,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-card-BvAgJ87t.js",
|
||||
"sha256": "da6dfaf903f1b78c302552be5235323beac01a0b3a0fd3ea433004d7bcb601e6",
|
||||
"path": "houseplan-assets/houseplan-card-n2PxGqZY.js",
|
||||
"sha256": "f2e5ff91866347e77fe2d924294e119651f41641356d1f761188f175500c2af1",
|
||||
"rawBytes": 1039630,
|
||||
"gzipBytes": 291952,
|
||||
"gzipBytes": 291954,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": [
|
||||
"houseplan-assets/de-xlnnJVW-.js",
|
||||
"houseplan-assets/editor-D3IzcJm6.js",
|
||||
"houseplan-assets/fr-ChZzRRM9.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-TMHmDwn7.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-DPMSreRo.js"
|
||||
"houseplan-assets/de-BP_2FY3A.js",
|
||||
"houseplan-assets/editor-BoI8ovCT.js",
|
||||
"houseplan-assets/fr-DOlNp4ji.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-De35hz5H.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-dO-9we_v.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-editor-runtime-TMHmDwn7.js",
|
||||
"sha256": "c5c266584d6df72340fc6c2ab59614d3c1130f0d32303670d3e7a44c9ee65cad",
|
||||
"rawBytes": 601452,
|
||||
"gzipBytes": 158482,
|
||||
"path": "houseplan-assets/houseplan-editor-runtime-De35hz5H.js",
|
||||
"sha256": "9f44dafa722abba6a47073110496e99d178ee661f38bed2e189280f629980f73",
|
||||
"rawBytes": 601529,
|
||||
"gzipBytes": 158500,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/backdrop-pick-D3CDbTJH.js",
|
||||
"houseplan-assets/houseplan-card-BvAgJ87t.js"
|
||||
"houseplan-assets/backdrop-pick-DMGa8wc7.js",
|
||||
"houseplan-assets/houseplan-card-n2PxGqZY.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-onboarding-runtime-DPMSreRo.js",
|
||||
"sha256": "406fdca553c0e2a9bc540f08494b5ed5d0eddad6fb8b4464f495829f15f2fe98",
|
||||
"path": "houseplan-assets/houseplan-onboarding-runtime-dO-9we_v.js",
|
||||
"sha256": "429df2912042da7959c13847d96b6a957a5e097c2899b82e82bb0f9820e86067",
|
||||
"rawBytes": 28088,
|
||||
"gzipBytes": 6957,
|
||||
"gzipBytes": 6960,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/backdrop-pick-D3CDbTJH.js",
|
||||
"houseplan-assets/houseplan-card-BvAgJ87t.js"
|
||||
"houseplan-assets/backdrop-pick-DMGa8wc7.js",
|
||||
"houseplan-assets/houseplan-card-n2PxGqZY.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-card.js",
|
||||
"sha256": "52b94e2778e06f581ac04190de391fbde7f106bd2c6659d3c19bcfff47c66451",
|
||||
"sha256": "8c663d28d60b83468ee17e7b8e6891d9579e96e1c8c89cd5ca2ecd23c89e84a3",
|
||||
"rawBytes": 1183,
|
||||
"gzipBytes": 797,
|
||||
"gzipBytes": 798,
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-BvAgJ87t.js"
|
||||
"houseplan-assets/houseplan-card-n2PxGqZY.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
+5
-5
@@ -1,14 +1,14 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="95168f1c726971da07e0db5ab14741bd71289cb3265b1c8b6adb7b35bba05803";import{k as e,l as o,t,dm as s,A as a,dn as i,dp as l,dq as n,E as r,c}from"./houseplan-card-BvAgJ87t.js";class h extends e{constructor(){super(...arguments),this._spaces=null,this._spacesLoading=!1,this._spacesAuthoritative=!1}setConfig(e){this._config=e}async _loadSpaces(){if(!this._spaces&&!this._spacesLoading&&this.hass){this._spacesLoading=!0;try{const e=await this.hass.callWS({type:"houseplan/config/get"});this._spaces=(e?.config?.spaces||[]).map(e=>({value:e.id,label:e.title||e.id})),this._spacesAuthoritative=!0}catch{this._spaces=[],this._spacesAuthoritative=!1}finally{this._spacesLoading=!1}}}get _lang(){return o(this.hass,this._config?.language)}get _floorToken(){const e=this._config?.floor;return"number"==typeof e?`__houseplan_yaml_floor_index__:${String(e)}`:null}get _formData(){const e={...this._config},o=this._floorToken;return o?e.floor=o:Object.prototype.hasOwnProperty.call(e,"floor")||(e.floor=""),e}get _schema(){const e=this._spaces||[],o=this._lang,a=[{value:"",label:t(o,"editor.floor_none")}],i=this._floorToken;i&&a.push({value:i,label:t(o,"editor.floor_index",{index:String(this._config?.floor)})});const l="string"==typeof this._config?.floor?this._config.floor:"";l&&!e.some(e=>e.value===l)&&a.push({value:l,label:l}),a.push(...e);const n="string"==typeof this._config?.default_floor?this._config.default_floor:"",r=[...e];return n&&!e.some(e=>e.value===n)&&r.unshift({value:n,label:n}),[{name:"title",selector:{text:{}}},{name:"floor",selector:{select:{mode:"dropdown",options:a}}},e.length?{name:"default_floor",selector:{select:{mode:"dropdown",options:r}}}:{name:"default_floor",selector:{text:{}}},{name:"language",selector:{select:{mode:"dropdown",options:s(t(o,"editor.lang_auto"),this._config?.language)}}},{name:"icon_size",selector:{number:{min:1,max:6,step:.1,mode:"box"}}},{name:"show_temperature",selector:{boolean:{}}},{name:"live_states",selector:{boolean:{}}},{name:"show_signal",selector:{boolean:{}}},{name:"kiosk",selector:{boolean:{}}},{name:"cycle",selector:{number:{min:0,max:3600,step:5,mode:"box"}}}]}render(){if(!this.hass||!this._config)return a;const e=i(this,l,o(this.hass,this._config.language));if("cold"===e)return n();if("warm"===e)return r;this._loadSpaces();const s=this._lang,h={title:t(s,"editor.title"),floor:t(s,"editor.floor"),default_floor:t(s,"editor.default_floor"),language:t(s,"editor.language"),icon_size:t(s,"editor.icon_size"),show_temperature:t(s,"editor.show_temperature"),live_states:t(s,"editor.live_states"),show_signal:t(s,"editor.show_signal"),kiosk:t(s,"editor.kiosk"),cycle:t(s,"editor.cycle")},_=this._schema,f=function(e,o,t){if(!t||null===o)return null;const s="string"==typeof e?.default_floor?e.default_floor:"";return!s||o.some(e=>e.value===s)?null:s}(this._config,this._spaces,this._spacesAuthoritative),d=e=>c`<ha-form
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="9745c31cb7efba6ca6a53b0d3c4db9948844f285f4d9dbc1b4f17966979b9d15";import{k as e,l as o,t,dm as s,A as a,dn as i,dp as l,dq as n,E as r,c}from"./houseplan-card-n2PxGqZY.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}
|
||||
.computeLabel=${e=>h[e.name]||e.name}
|
||||
@value-changed=${this._valueChanged}
|
||||
></ha-form>`;return c`
|
||||
${d(_.slice(0,3))}
|
||||
${f?c`<div class="default-floor-error" role="alert"
|
||||
${d(f.slice(0,3))}
|
||||
${_?c`<div class="default-floor-error" role="alert"
|
||||
style="color:var(--error-color,#db4437);margin:-4px 0 12px;overflow-wrap:anywhere">
|
||||
${t(s,"editor.default_floor_missing",{id:f})}
|
||||
${t(s,"editor.default_floor_missing",{id:_})}
|
||||
</div>`:a}
|
||||
${d(_.slice(3))}
|
||||
${d(f.slice(3))}
|
||||
`}_valueChanged(e){const o={...this._config,...e.detail.value};""===o.floor?delete o.floor:o.floor===this._floorToken&&(o.floor=this._config?.floor);const t=new Event("config-changed",{bubbles:!0,composed:!0});t.detail={config:o},this.dispatchEvent(t)}}h.properties={hass:{attribute:!1},_config:{state:!0},_spaces:{state:!0}},customElements.get("houseplan-card-editor")||customElements.define("houseplan-card-editor",h);
|
||||
+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
+4
-4
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,4 +1,4 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="95168f1c726971da07e0db5ab14741bd71289cb3265b1c8b6adb7b35bba05803";import{l as t,aQ as s,A as e,t as o,c as a,cd as l,ce as i,cf as h,cg as c,aN as n,ch as r,cm as p,ci as d,cj as _,ck as u,cl as g,dc as m,aM as b,aO as $,dd as v}from"./houseplan-card-BvAgJ87t.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-D3CDbTJH.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="95168f1c726971da07e0db5ab14741bd71289cb3265b1c8b6adb7b35bba05803";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__="9745c31cb7efba6ca6a53b0d3c4db9948844f285f4d9dbc1b4f17966979b9d15";import{l as t,aQ as s,A as e,t as o,c as a,cd as l,ce as i,cf as h,cg as c,aN as n,ch as r,cm as p,ci as d,cj as _,ck as u,cl as g,dc as m,aM as b,aO as $,dd as v}from"./houseplan-card-n2PxGqZY.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-DMGa8wc7.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="9745c31cb7efba6ca6a53b0d3c4db9948844f285f4d9dbc1b4f17966979b9d15";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":""}">
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="95168f1c726971da07e0db5ab14741bd71289cb3265b1c8b6adb7b35bba05803";try{await import("./houseplan-assets/houseplan-card-BvAgJ87t.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__="9745c31cb7efba6ca6a53b0d3c4db9948844f285f4d9dbc1b4f17966979b9d15";try{await import("./houseplan-assets/houseplan-card-n2PxGqZY.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)}
|
||||
|
||||
+3
-2
@@ -8,8 +8,9 @@
|
||||
than the centreline, respecting local thickness and the intended side of a
|
||||
shared wall so the object no longer ends up inside the masonry
|
||||
([#445](https://github.com/Matysh/houseplan-card/issues/445)).
|
||||
- Rejected device-marker and robot-calibration saves now restore the last
|
||||
server-confirmed plan without losing the open editor, automatic proposal or
|
||||
- Rejected General settings, device-marker and robot-calibration saves now
|
||||
restore the last server-confirmed plan even when the writer canonicalizes the
|
||||
outgoing config, without losing the open editor, automatic proposal or
|
||||
manual-fit draft; success is shown only after Home Assistant accepts the
|
||||
write, and Retry no longer requires recalibration
|
||||
([#442](https://github.com/Matysh/houseplan-card/issues/442)).
|
||||
|
||||
@@ -14,9 +14,10 @@
|
||||
стены, а не к её оси: учитываются локальная толщина и выбранная сторона общей
|
||||
стены, поэтому предмет больше не оказывается внутри кладки
|
||||
([#445](https://github.com/Matysh/houseplan-card/issues/445)).
|
||||
- Если Home Assistant отклоняет сохранение устройства или калибровки робота,
|
||||
план теперь возвращается к последнему подтверждённому состоянию, но сохраняет
|
||||
открытый редактор, автоматическое предложение или ручную подгонку для повтора;
|
||||
- Если Home Assistant отклоняет сохранение общих настроек, устройства или
|
||||
калибровки робота, план теперь возвращается к последнему подтверждённому
|
||||
состоянию даже после канонизации отправляемого конфига, но сохраняет открытый
|
||||
редактор, автоматическое предложение или ручную подгонку для повтора;
|
||||
сообщение об успехе появляется только после принятой записи
|
||||
([#442](https://github.com/Matysh/houseplan-card/issues/442)).
|
||||
- После удаления последнего маршрута карты робота список теперь остаётся явно
|
||||
|
||||
@@ -5447,7 +5447,7 @@ const MUTANT_DEFINITIONS = [
|
||||
+ 'its own request used, while still yielding to genuinely newer content (#442 AC2)',
|
||||
patches: [{
|
||||
file: 'src/houseplan-editor-runtime.ts',
|
||||
find: ' if (attempt && candidateFingerprint === attempt.attemptedFingerprint) attempt.revision = this.host._cfgRev;',
|
||||
find: ' if (attempt && liveFingerprint === attempt.attemptedFingerprint) Object.assign(attempt, { revision: this.host._cfgRev, attempted: candidate, attemptedFingerprint: candidateFingerprint });',
|
||||
replace: '',
|
||||
}],
|
||||
},
|
||||
|
||||
@@ -1838,10 +1838,10 @@ public _writeConfig(attempt: OptimisticAttempt<ServerConfig> | null = null): Pro
|
||||
this.host._writesPending++;
|
||||
this.host._writeChain = enqueueSerializedWrite(this.host._writeChain, async () => {
|
||||
if (!this.host._serverCfg) return;
|
||||
const liveFingerprint = contentFingerprint(this.host._serverCfg);
|
||||
const candidate = this._prepareConfigCandidate(this.host._serverCfg);
|
||||
const candidateFingerprint = contentFingerprint(candidate);
|
||||
// Bind a queued optimistic save to the revision its request will actually use.
|
||||
if (attempt && candidateFingerprint === attempt.attemptedFingerprint) attempt.revision = this.host._cfgRev;
|
||||
if (attempt && liveFingerprint === attempt.attemptedFingerprint) Object.assign(attempt, { revision: this.host._cfgRev, attempted: candidate, attemptedFingerprint: candidateFingerprint });
|
||||
const strictEntries = [...this.host._pendingPhysicalWrites.entries()];
|
||||
for (const [spaceId, accepted] of strictEntries) {
|
||||
const candidateSpace = candidate.spaces.find((space) => space.id === spaceId);
|
||||
@@ -10289,7 +10289,7 @@ public _updateDecorStyle(next: DecorStyle): void {
|
||||
attempt = optimisticAttempt(cfg, nextConfig, this.host._cfgContentFingerprint,
|
||||
this.host._cfgRev, contentFingerprint);
|
||||
this.host._serverCfg = nextConfig;
|
||||
await this._saveConfigNow();
|
||||
await this._saveConfigNow(attempt);
|
||||
if (!d.showRoomTooltip && this.host._tip?.room) this.host._tip = null;
|
||||
this.host._settingsDialog = null;
|
||||
this.host.requestUpdate();
|
||||
|
||||
Reference in New Issue
Block a user