refactor: type editor i18n keys (#391)

Remove legacy any casts from device inbox, marker, and geometry preflight translation calls. Refresh the moved preflight mutation anchor.

Issue: #391
User-Visible: no
This commit is contained in:
Matysh
2026-08-30 17:13:01 +00:00
committed by claude[bot]
parent 8dfb0a9e36
commit a577fde799
20 changed files with 162 additions and 162 deletions
@@ -1,72 +1,72 @@
{
"schema": 1,
"fingerprint": "099688ecae2a6f015325a6ffa40c7112bd2726309f7760aec7d6b2534ad2f347",
"fingerprint": "cd530b1a2b7fea73c9b39236f868bd23d8f35d404eec4c128453f2140d9288fb",
"entry": "houseplan-card.js",
"initialViewFiles": [
"houseplan-assets/houseplan-card-DzlQl4_k.js",
"houseplan-assets/houseplan-card-B3HePKmB.js",
"houseplan-card.js"
],
"initialViewGzipBytes": 283094,
"initialViewGzipBytes": 283100,
"lazyFiles": [
"houseplan-assets/backdrop-pick-CJ3kZCi2.js",
"houseplan-assets/de-Dq2fGpol.js",
"houseplan-assets/editor-DrQ9S89m.js",
"houseplan-assets/fr-Bq4OMxB4.js",
"houseplan-assets/houseplan-editor-runtime-C6fRvS15.js",
"houseplan-assets/houseplan-onboarding-runtime-HmSdEh0z.js"
"houseplan-assets/backdrop-pick-DLodXdwD.js",
"houseplan-assets/de-BmzESOTw.js",
"houseplan-assets/editor-DQVhIDEt.js",
"houseplan-assets/fr-Oc3CqcjD.js",
"houseplan-assets/houseplan-editor-runtime-BwnLX8MM.js",
"houseplan-assets/houseplan-onboarding-runtime-DG2Ws9vn.js"
],
"lazyGzipBytes": 197612,
"lazyGzipBytes": 197619,
"lazyEditorFiles": [
"houseplan-assets/backdrop-pick-CJ3kZCi2.js",
"houseplan-assets/editor-DrQ9S89m.js",
"houseplan-assets/houseplan-editor-runtime-C6fRvS15.js"
"houseplan-assets/backdrop-pick-DLodXdwD.js",
"houseplan-assets/editor-DQVhIDEt.js",
"houseplan-assets/houseplan-editor-runtime-BwnLX8MM.js"
],
"lazyEditorGzipBytes": 143897,
"lazyEditorGzipBytes": 143903,
"lazyOnboardingFiles": [
"houseplan-assets/backdrop-pick-CJ3kZCi2.js",
"houseplan-assets/houseplan-onboarding-runtime-HmSdEh0z.js"
"houseplan-assets/backdrop-pick-DLodXdwD.js",
"houseplan-assets/houseplan-onboarding-runtime-DG2Ws9vn.js"
],
"lazyOnboardingGzipBytes": 13789,
"lazyOnboardingGzipBytes": 13791,
"lazyLocaleFiles": [
"houseplan-assets/de-Dq2fGpol.js",
"houseplan-assets/fr-Bq4OMxB4.js"
"houseplan-assets/de-BmzESOTw.js",
"houseplan-assets/fr-Oc3CqcjD.js"
],
"lazyLocaleGzipBytes": 46997,
"lazyLocaleGzipBytes": 46996,
"files": [
{
"path": "houseplan-assets/backdrop-pick-CJ3kZCi2.js",
"sha256": "383eea583e6ee787be10c7766420bbff1738f466827bcada4dbb2fbf1de24505",
"path": "houseplan-assets/backdrop-pick-DLodXdwD.js",
"sha256": "e2f816068519a0b6b7f03538230fd5ccd878e982ce4478f493743ac33a79131a",
"rawBytes": 20636,
"gzipBytes": 7071,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-DzlQl4_k.js"
"houseplan-assets/houseplan-card-B3HePKmB.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/de-Dq2fGpol.js",
"sha256": "17cca86ed13e257b06567609834707e975e9dacb38e495208a5bceedf4e7da8f",
"path": "houseplan-assets/de-BmzESOTw.js",
"sha256": "0ec4ce92fe2c75cc6821200b501b6222908a3e4928682a35f92f6b1ba7774611",
"rawBytes": 78310,
"gzipBytes": 23721,
"gzipBytes": 23720,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/editor-DrQ9S89m.js",
"sha256": "0b137accab6d6ed51f44aed3d4d2b1ff444b5307ac9c11ff0cb9535cfd25bb2c",
"path": "houseplan-assets/editor-DQVhIDEt.js",
"sha256": "0a424827d20ac6dd1c9a82dca914a3d3eb4c0dca0ec3b047876fc799ec0e64a3",
"rawBytes": 3826,
"gzipBytes": 1582,
"gzipBytes": 1583,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-DzlQl4_k.js"
"houseplan-assets/houseplan-card-B3HePKmB.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/fr-Bq4OMxB4.js",
"sha256": "da0d137d42243e36315ed6ad73197210ea12cf672cf14eb7cb6320594c9aec56",
"path": "houseplan-assets/fr-Oc3CqcjD.js",
"sha256": "04f590260b469a5dcfdb16862d30488f00ad88e4061fee133c0aabd493eca7ee",
"rawBytes": 80482,
"gzipBytes": 23276,
"isEntry": false,
@@ -74,52 +74,52 @@
"dynamicImports": []
},
{
"path": "houseplan-assets/houseplan-card-DzlQl4_k.js",
"sha256": "ac14483abe54719e12506df7eef1f26f4fd570c92600ea781159e445249ecca9",
"path": "houseplan-assets/houseplan-card-B3HePKmB.js",
"sha256": "8915715da95372e342f48a6643e0bc91acd0fa176cc35df444f0ae804ee79c91",
"rawBytes": 1001346,
"gzipBytes": 282298,
"gzipBytes": 282303,
"isEntry": false,
"imports": [],
"dynamicImports": [
"houseplan-assets/de-Dq2fGpol.js",
"houseplan-assets/editor-DrQ9S89m.js",
"houseplan-assets/fr-Bq4OMxB4.js",
"houseplan-assets/houseplan-editor-runtime-C6fRvS15.js",
"houseplan-assets/houseplan-onboarding-runtime-HmSdEh0z.js"
"houseplan-assets/de-BmzESOTw.js",
"houseplan-assets/editor-DQVhIDEt.js",
"houseplan-assets/fr-Oc3CqcjD.js",
"houseplan-assets/houseplan-editor-runtime-BwnLX8MM.js",
"houseplan-assets/houseplan-onboarding-runtime-DG2Ws9vn.js"
]
},
{
"path": "houseplan-assets/houseplan-editor-runtime-C6fRvS15.js",
"sha256": "aeef2fb0c3cec33286d9aee59488c69713483da5e93d5a47b28b67e5637354e6",
"path": "houseplan-assets/houseplan-editor-runtime-BwnLX8MM.js",
"sha256": "6676cdf3a5b2d1e95e8e08d8534a3a1c1d2898959fbc45311b56f907aeaf8283",
"rawBytes": 524015,
"gzipBytes": 135244,
"gzipBytes": 135249,
"isEntry": false,
"imports": [
"houseplan-assets/backdrop-pick-CJ3kZCi2.js",
"houseplan-assets/houseplan-card-DzlQl4_k.js"
"houseplan-assets/backdrop-pick-DLodXdwD.js",
"houseplan-assets/houseplan-card-B3HePKmB.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/houseplan-onboarding-runtime-HmSdEh0z.js",
"sha256": "d7aba6728494fdc25e17a614eba3e91bb8132ee8248d8970fe6030565ec8c36b",
"path": "houseplan-assets/houseplan-onboarding-runtime-DG2Ws9vn.js",
"sha256": "c99d452141ba30ce46fba8f7a10bb1a26ecd4a5c953c3fcb27d0a486d2f67cb2",
"rawBytes": 27120,
"gzipBytes": 6718,
"gzipBytes": 6720,
"isEntry": false,
"imports": [
"houseplan-assets/backdrop-pick-CJ3kZCi2.js",
"houseplan-assets/houseplan-card-DzlQl4_k.js"
"houseplan-assets/backdrop-pick-DLodXdwD.js",
"houseplan-assets/houseplan-card-B3HePKmB.js"
],
"dynamicImports": []
},
{
"path": "houseplan-card.js",
"sha256": "2bdf546fd8a2b8fe97577f166d3dd1720dc7777201accb899856e1ea3e96c14d",
"sha256": "03f0c7029b85a070d1f123fe401566d3b529f886d195ca9beaf3a17177811446",
"rawBytes": 1183,
"gzipBytes": 796,
"gzipBytes": 797,
"isEntry": true,
"imports": [
"houseplan-assets/houseplan-card-DzlQl4_k.js"
"houseplan-assets/houseplan-card-B3HePKmB.js"
],
"dynamicImports": []
}
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="099688ecae2a6f015325a6ffa40c7112bd2726309f7760aec7d6b2534ad2f347";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-DzlQl4_k.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__="cd530b1a2b7fea73c9b39236f868bd23d8f35d404eec4c128453f2140d9288fb";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-B3HePKmB.js";class h extends e{constructor(){super(...arguments),this._spaces=null,this._spacesLoading=!1,this._spacesAuthoritative=!1}setConfig(e){this._config=e}async _loadSpaces(){if(!this._spaces&&!this._spacesLoading&&this.hass){this._spacesLoading=!0;try{const e=await this.hass.callWS({type:"houseplan/config/get"});this._spaces=(e?.config?.spaces||[]).map(e=>({value:e.id,label:e.title||e.id})),this._spacesAuthoritative=!0}catch{this._spaces=[],this._spacesAuthoritative=!1}finally{this._spacesLoading=!1}}}get _lang(){return o(this.hass,this._config?.language)}get _floorToken(){const e=this._config?.floor;return"number"==typeof e?`__houseplan_yaml_floor_index__:${String(e)}`:null}get _formData(){const e={...this._config},o=this._floorToken;return o?e.floor=o:Object.prototype.hasOwnProperty.call(e,"floor")||(e.floor=""),e}get _schema(){const e=this._spaces||[],o=this._lang,a=[{value:"",label:t(o,"editor.floor_none")}],i=this._floorToken;i&&a.push({value:i,label:t(o,"editor.floor_index",{index:String(this._config?.floor)})});const l="string"==typeof this._config?.floor?this._config.floor:"";l&&!e.some(e=>e.value===l)&&a.push({value:l,label:l}),a.push(...e);const n="string"==typeof this._config?.default_floor?this._config.default_floor:"",r=[...e];return n&&!e.some(e=>e.value===n)&&r.unshift({value:n,label:n}),[{name:"title",selector:{text:{}}},{name:"floor",selector:{select:{mode:"dropdown",options:a}}},e.length?{name:"default_floor",selector:{select:{mode:"dropdown",options:r}}}:{name:"default_floor",selector:{text:{}}},{name:"language",selector:{select:{mode:"dropdown",options:s(t(o,"editor.lang_auto"),this._config?.language)}}},{name:"icon_size",selector:{number:{min:1,max:6,step:.1,mode:"box"}}},{name:"show_temperature",selector:{boolean:{}}},{name:"live_states",selector:{boolean:{}}},{name:"show_signal",selector:{boolean:{}}},{name:"kiosk",selector:{boolean:{}}},{name:"cycle",selector:{number:{min:0,max:3600,step:5,mode:"box"}}}]}render(){if(!this.hass||!this._config)return a;const e=i(this,l,o(this.hass,this._config.language));if("cold"===e)return n();if("warm"===e)return r;this._loadSpaces();const s=this._lang,h={title:t(s,"editor.title"),floor:t(s,"editor.floor"),default_floor:t(s,"editor.default_floor"),language:t(s,"editor.language"),icon_size:t(s,"editor.icon_size"),show_temperature:t(s,"editor.show_temperature"),live_states:t(s,"editor.live_states"),show_signal:t(s,"editor.show_signal"),kiosk:t(s,"editor.kiosk"),cycle:t(s,"editor.cycle")},f=this._schema,_=function(e,o,t){if(!t||null===o)return null;const s="string"==typeof e?.default_floor?e.default_floor:"";return!s||o.some(e=>e.value===s)?null:s}(this._config,this._spaces,this._spacesAuthoritative),d=e=>c`<ha-form
.hass=${this.hass}
.data=${this._formData}
.schema=${e}
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="099688ecae2a6f015325a6ffa40c7112bd2726309f7760aec7d6b2534ad2f347";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-DzlQl4_k.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-CJ3kZCi2.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="099688ecae2a6f015325a6ffa40c7112bd2726309f7760aec7d6b2534ad2f347";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__="cd530b1a2b7fea73c9b39236f868bd23d8f35d404eec4c128453f2140d9288fb";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-B3HePKmB.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-DLodXdwD.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="cd530b1a2b7fea73c9b39236f868bd23d8f35d404eec4c128453f2140d9288fb";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__="099688ecae2a6f015325a6ffa40c7112bd2726309f7760aec7d6b2534ad2f347";try{await import("./houseplan-assets/houseplan-card-DzlQl4_k.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__="cd530b1a2b7fea73c9b39236f868bd23d8f35d404eec4c128453f2140d9288fb";try{await import("./houseplan-assets/houseplan-card-B3HePKmB.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)}
+53 -53
View File
@@ -1,72 +1,72 @@
{
"schema": 1,
"fingerprint": "099688ecae2a6f015325a6ffa40c7112bd2726309f7760aec7d6b2534ad2f347",
"fingerprint": "cd530b1a2b7fea73c9b39236f868bd23d8f35d404eec4c128453f2140d9288fb",
"entry": "houseplan-card.js",
"initialViewFiles": [
"houseplan-assets/houseplan-card-DzlQl4_k.js",
"houseplan-assets/houseplan-card-B3HePKmB.js",
"houseplan-card.js"
],
"initialViewGzipBytes": 283094,
"initialViewGzipBytes": 283100,
"lazyFiles": [
"houseplan-assets/backdrop-pick-CJ3kZCi2.js",
"houseplan-assets/de-Dq2fGpol.js",
"houseplan-assets/editor-DrQ9S89m.js",
"houseplan-assets/fr-Bq4OMxB4.js",
"houseplan-assets/houseplan-editor-runtime-C6fRvS15.js",
"houseplan-assets/houseplan-onboarding-runtime-HmSdEh0z.js"
"houseplan-assets/backdrop-pick-DLodXdwD.js",
"houseplan-assets/de-BmzESOTw.js",
"houseplan-assets/editor-DQVhIDEt.js",
"houseplan-assets/fr-Oc3CqcjD.js",
"houseplan-assets/houseplan-editor-runtime-BwnLX8MM.js",
"houseplan-assets/houseplan-onboarding-runtime-DG2Ws9vn.js"
],
"lazyGzipBytes": 197612,
"lazyGzipBytes": 197619,
"lazyEditorFiles": [
"houseplan-assets/backdrop-pick-CJ3kZCi2.js",
"houseplan-assets/editor-DrQ9S89m.js",
"houseplan-assets/houseplan-editor-runtime-C6fRvS15.js"
"houseplan-assets/backdrop-pick-DLodXdwD.js",
"houseplan-assets/editor-DQVhIDEt.js",
"houseplan-assets/houseplan-editor-runtime-BwnLX8MM.js"
],
"lazyEditorGzipBytes": 143897,
"lazyEditorGzipBytes": 143903,
"lazyOnboardingFiles": [
"houseplan-assets/backdrop-pick-CJ3kZCi2.js",
"houseplan-assets/houseplan-onboarding-runtime-HmSdEh0z.js"
"houseplan-assets/backdrop-pick-DLodXdwD.js",
"houseplan-assets/houseplan-onboarding-runtime-DG2Ws9vn.js"
],
"lazyOnboardingGzipBytes": 13789,
"lazyOnboardingGzipBytes": 13791,
"lazyLocaleFiles": [
"houseplan-assets/de-Dq2fGpol.js",
"houseplan-assets/fr-Bq4OMxB4.js"
"houseplan-assets/de-BmzESOTw.js",
"houseplan-assets/fr-Oc3CqcjD.js"
],
"lazyLocaleGzipBytes": 46997,
"lazyLocaleGzipBytes": 46996,
"files": [
{
"path": "houseplan-assets/backdrop-pick-CJ3kZCi2.js",
"sha256": "383eea583e6ee787be10c7766420bbff1738f466827bcada4dbb2fbf1de24505",
"path": "houseplan-assets/backdrop-pick-DLodXdwD.js",
"sha256": "e2f816068519a0b6b7f03538230fd5ccd878e982ce4478f493743ac33a79131a",
"rawBytes": 20636,
"gzipBytes": 7071,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-DzlQl4_k.js"
"houseplan-assets/houseplan-card-B3HePKmB.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/de-Dq2fGpol.js",
"sha256": "17cca86ed13e257b06567609834707e975e9dacb38e495208a5bceedf4e7da8f",
"path": "houseplan-assets/de-BmzESOTw.js",
"sha256": "0ec4ce92fe2c75cc6821200b501b6222908a3e4928682a35f92f6b1ba7774611",
"rawBytes": 78310,
"gzipBytes": 23721,
"gzipBytes": 23720,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/editor-DrQ9S89m.js",
"sha256": "0b137accab6d6ed51f44aed3d4d2b1ff444b5307ac9c11ff0cb9535cfd25bb2c",
"path": "houseplan-assets/editor-DQVhIDEt.js",
"sha256": "0a424827d20ac6dd1c9a82dca914a3d3eb4c0dca0ec3b047876fc799ec0e64a3",
"rawBytes": 3826,
"gzipBytes": 1582,
"gzipBytes": 1583,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-DzlQl4_k.js"
"houseplan-assets/houseplan-card-B3HePKmB.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/fr-Bq4OMxB4.js",
"sha256": "da0d137d42243e36315ed6ad73197210ea12cf672cf14eb7cb6320594c9aec56",
"path": "houseplan-assets/fr-Oc3CqcjD.js",
"sha256": "04f590260b469a5dcfdb16862d30488f00ad88e4061fee133c0aabd493eca7ee",
"rawBytes": 80482,
"gzipBytes": 23276,
"isEntry": false,
@@ -74,52 +74,52 @@
"dynamicImports": []
},
{
"path": "houseplan-assets/houseplan-card-DzlQl4_k.js",
"sha256": "ac14483abe54719e12506df7eef1f26f4fd570c92600ea781159e445249ecca9",
"path": "houseplan-assets/houseplan-card-B3HePKmB.js",
"sha256": "8915715da95372e342f48a6643e0bc91acd0fa176cc35df444f0ae804ee79c91",
"rawBytes": 1001346,
"gzipBytes": 282298,
"gzipBytes": 282303,
"isEntry": false,
"imports": [],
"dynamicImports": [
"houseplan-assets/de-Dq2fGpol.js",
"houseplan-assets/editor-DrQ9S89m.js",
"houseplan-assets/fr-Bq4OMxB4.js",
"houseplan-assets/houseplan-editor-runtime-C6fRvS15.js",
"houseplan-assets/houseplan-onboarding-runtime-HmSdEh0z.js"
"houseplan-assets/de-BmzESOTw.js",
"houseplan-assets/editor-DQVhIDEt.js",
"houseplan-assets/fr-Oc3CqcjD.js",
"houseplan-assets/houseplan-editor-runtime-BwnLX8MM.js",
"houseplan-assets/houseplan-onboarding-runtime-DG2Ws9vn.js"
]
},
{
"path": "houseplan-assets/houseplan-editor-runtime-C6fRvS15.js",
"sha256": "aeef2fb0c3cec33286d9aee59488c69713483da5e93d5a47b28b67e5637354e6",
"path": "houseplan-assets/houseplan-editor-runtime-BwnLX8MM.js",
"sha256": "6676cdf3a5b2d1e95e8e08d8534a3a1c1d2898959fbc45311b56f907aeaf8283",
"rawBytes": 524015,
"gzipBytes": 135244,
"gzipBytes": 135249,
"isEntry": false,
"imports": [
"houseplan-assets/backdrop-pick-CJ3kZCi2.js",
"houseplan-assets/houseplan-card-DzlQl4_k.js"
"houseplan-assets/backdrop-pick-DLodXdwD.js",
"houseplan-assets/houseplan-card-B3HePKmB.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/houseplan-onboarding-runtime-HmSdEh0z.js",
"sha256": "d7aba6728494fdc25e17a614eba3e91bb8132ee8248d8970fe6030565ec8c36b",
"path": "houseplan-assets/houseplan-onboarding-runtime-DG2Ws9vn.js",
"sha256": "c99d452141ba30ce46fba8f7a10bb1a26ecd4a5c953c3fcb27d0a486d2f67cb2",
"rawBytes": 27120,
"gzipBytes": 6718,
"gzipBytes": 6720,
"isEntry": false,
"imports": [
"houseplan-assets/backdrop-pick-CJ3kZCi2.js",
"houseplan-assets/houseplan-card-DzlQl4_k.js"
"houseplan-assets/backdrop-pick-DLodXdwD.js",
"houseplan-assets/houseplan-card-B3HePKmB.js"
],
"dynamicImports": []
},
{
"path": "houseplan-card.js",
"sha256": "2bdf546fd8a2b8fe97577f166d3dd1720dc7777201accb899856e1ea3e96c14d",
"sha256": "03f0c7029b85a070d1f123fe401566d3b529f886d195ca9beaf3a17177811446",
"rawBytes": 1183,
"gzipBytes": 796,
"gzipBytes": 797,
"isEntry": true,
"imports": [
"houseplan-assets/houseplan-card-DzlQl4_k.js"
"houseplan-assets/houseplan-card-B3HePKmB.js"
],
"dynamicImports": []
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="099688ecae2a6f015325a6ffa40c7112bd2726309f7760aec7d6b2534ad2f347";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-DzlQl4_k.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__="cd530b1a2b7fea73c9b39236f868bd23d8f35d404eec4c128453f2140d9288fb";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-B3HePKmB.js";class h extends e{constructor(){super(...arguments),this._spaces=null,this._spacesLoading=!1,this._spacesAuthoritative=!1}setConfig(e){this._config=e}async _loadSpaces(){if(!this._spaces&&!this._spacesLoading&&this.hass){this._spacesLoading=!0;try{const e=await this.hass.callWS({type:"houseplan/config/get"});this._spaces=(e?.config?.spaces||[]).map(e=>({value:e.id,label:e.title||e.id})),this._spacesAuthoritative=!0}catch{this._spaces=[],this._spacesAuthoritative=!1}finally{this._spacesLoading=!1}}}get _lang(){return o(this.hass,this._config?.language)}get _floorToken(){const e=this._config?.floor;return"number"==typeof e?`__houseplan_yaml_floor_index__:${String(e)}`:null}get _formData(){const e={...this._config},o=this._floorToken;return o?e.floor=o:Object.prototype.hasOwnProperty.call(e,"floor")||(e.floor=""),e}get _schema(){const e=this._spaces||[],o=this._lang,a=[{value:"",label:t(o,"editor.floor_none")}],i=this._floorToken;i&&a.push({value:i,label:t(o,"editor.floor_index",{index:String(this._config?.floor)})});const l="string"==typeof this._config?.floor?this._config.floor:"";l&&!e.some(e=>e.value===l)&&a.push({value:l,label:l}),a.push(...e);const n="string"==typeof this._config?.default_floor?this._config.default_floor:"",r=[...e];return n&&!e.some(e=>e.value===n)&&r.unshift({value:n,label:n}),[{name:"title",selector:{text:{}}},{name:"floor",selector:{select:{mode:"dropdown",options:a}}},e.length?{name:"default_floor",selector:{select:{mode:"dropdown",options:r}}}:{name:"default_floor",selector:{text:{}}},{name:"language",selector:{select:{mode:"dropdown",options:s(t(o,"editor.lang_auto"),this._config?.language)}}},{name:"icon_size",selector:{number:{min:1,max:6,step:.1,mode:"box"}}},{name:"show_temperature",selector:{boolean:{}}},{name:"live_states",selector:{boolean:{}}},{name:"show_signal",selector:{boolean:{}}},{name:"kiosk",selector:{boolean:{}}},{name:"cycle",selector:{number:{min:0,max:3600,step:5,mode:"box"}}}]}render(){if(!this.hass||!this._config)return a;const e=i(this,l,o(this.hass,this._config.language));if("cold"===e)return n();if("warm"===e)return r;this._loadSpaces();const s=this._lang,h={title:t(s,"editor.title"),floor:t(s,"editor.floor"),default_floor:t(s,"editor.default_floor"),language:t(s,"editor.language"),icon_size:t(s,"editor.icon_size"),show_temperature:t(s,"editor.show_temperature"),live_states:t(s,"editor.live_states"),show_signal:t(s,"editor.show_signal"),kiosk:t(s,"editor.kiosk"),cycle:t(s,"editor.cycle")},f=this._schema,_=function(e,o,t){if(!t||null===o)return null;const s="string"==typeof e?.default_floor?e.default_floor:"";return!s||o.some(e=>e.value===s)?null:s}(this._config,this._spaces,this._spacesAuthoritative),d=e=>c`<ha-form
.hass=${this.hass}
.data=${this._formData}
.schema=${e}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="099688ecae2a6f015325a6ffa40c7112bd2726309f7760aec7d6b2534ad2f347";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-DzlQl4_k.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-CJ3kZCi2.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="099688ecae2a6f015325a6ffa40c7112bd2726309f7760aec7d6b2534ad2f347";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__="cd530b1a2b7fea73c9b39236f868bd23d8f35d404eec4c128453f2140d9288fb";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-B3HePKmB.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-DLodXdwD.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="cd530b1a2b7fea73c9b39236f868bd23d8f35d404eec4c128453f2140d9288fb";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
View File
@@ -1 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="099688ecae2a6f015325a6ffa40c7112bd2726309f7760aec7d6b2534ad2f347";try{await import("./houseplan-assets/houseplan-card-DzlQl4_k.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__="cd530b1a2b7fea73c9b39236f868bd23d8f35d404eec4c128453f2140d9288fb";try{await import("./houseplan-assets/houseplan-card-B3HePKmB.js")}catch(e){if(!customElements.get("houseplan-card")){const l=String(navigator.language||"en").toLowerCase();const m=l.startsWith("ru")?"House Plan обновился — перезагрузите страницу (Ctrl+F5).":l.startsWith("de")?"House Plan wurde aktualisiert — bitte laden Sie die Seite neu (Strg+F5).":l.startsWith("fr")?"House Plan a été mis à jour — veuillez recharger la page (Ctrl+F5).":"House Plan was updated — please reload the page (Ctrl+F5).";customElements.define("houseplan-card",class extends HTMLElement{setConfig(){}getCardSize(){return 1}connectedCallback(){this.style.cssText="display:block;box-sizing:border-box;padding:16px;border:1px solid var(--divider-color,#e0e0e0);border-radius:var(--ha-card-border-radius,12px);background:var(--card-background-color,#fff);color:var(--primary-text-color,#212121);font:14px/1.4 var(--paper-font-body1_-_font-family,sans-serif)";this.textContent=m}})}console.error("[houseplan] stale entry: the main chunk is unavailable",e)}
+2 -2
View File
@@ -3259,8 +3259,8 @@ const MUTANT_DEFINITIONS = [
+ '&& node demo/smoke_preflight_diagnostics.mjs',
because: 'отказ preflight без причины недиагностируем — ровно исходный дефект #295',
patches: [{
file: 'src/houseplan-card.ts',
find: " ${failure.displayName}: ${this._t(`gs.preflight_reason_${failure.reason}` as any)}",
file: 'src/houseplan-editor-runtime.ts',
find: " ${failure.displayName}: ${this.host._t(`gs.preflight_reason_${failure.reason}` as I18nKey)}",
replace: " ${failure.displayName}",
}],
},
+32 -32
View File
@@ -7746,7 +7746,7 @@ public async _setInboxHidden(row: DeviceInboxRow, hidden: boolean): Promise<void
this.host._deviceInboxMemo = null;
this.host._maybeRebuildDevices();
if (this.host._deviceInbox) this.host._deviceInbox = { ...this.host._deviceInbox, busy: undefined };
this.host._showToast(this.host._t('device_inbox.saved' as any));
this.host._showToast(this.host._t('device_inbox.saved'));
} catch (error: any) {
if (this.host._serverCfg === cfg) cfg.markers = previous;
if (this.host._deviceInbox) this.host._deviceInbox = { ...this.host._deviceInbox, busy: undefined };
@@ -9766,7 +9766,7 @@ public _renderAlignDialog(): TemplateResult {
? html`
<p class="alignmsg">${this.host._t('gs.align_preflight_failed', { spaces, more })}</p>
${failures.slice(0, 10).map((failure) => html`<p class="alignmsg">
${failure.displayName}: ${this.host._t(`gs.preflight_reason_${failure.reason}` as any)}
${failure.displayName}: ${this.host._t(`gs.preflight_reason_${failure.reason}` as I18nKey)}
</p>`)}
${failures.length > 10 ? html`<p class="alignmsg">
${this.host._t('gs.align_preflight_more', { n: String(failures.length - 10) })}
@@ -11772,8 +11772,8 @@ public _renderDevicesBar(): TemplateResult {
<ha-icon icon="mdi:plus-box-outline"></ha-icon>${this.host._t('devbar.add')}
</button>
<button class="btn ${this.host._showAll ? 'on' : ''}" @click=${() => this._openDeviceInbox()}
title=${this.host._t('device_inbox.title' as any)}>
<ha-icon icon="mdi:devices"></ha-icon>${this.host._t('device_inbox.button' as any)}
title=${this.host._t('device_inbox.title')}>
<ha-icon icon="mdi:devices"></ha-icon>${this.host._t('device_inbox.button')}
</button>
<button class="btn" @click=${() => this._openRulesDialog()} title=${this.host._t('title.icon_rules')}>
<ha-icon icon="mdi:shape-plus-outline"></ha-icon>${this.host._t('devbar.rules')}
@@ -11979,8 +11979,8 @@ public _renderDeviceInbox(): TemplateResult {
rows, dialog.tab, dialog.search, dialog.tab === 'on_plan' && dialog.onlyNew,
);
const visible = filtered.slice(0, dialog.limit);
const tabLabel = (tab: DeviceInboxCategory) => this.host._t(`device_inbox.tab_${tab}` as any);
const emptyKey = `device_inbox.empty_${dialog.tab}` as any;
const tabLabel = (tab: DeviceInboxCategory) => this.host._t(`device_inbox.tab_${tab}` as I18nKey);
const emptyKey = `device_inbox.empty_${dialog.tab}` as I18nKey;
const openVirtual = () => {
this.host._deviceInboxReturn = { ...dialog };
this.host._deviceInbox = null;
@@ -11988,18 +11988,18 @@ public _renderDeviceInbox(): TemplateResult {
if (!this.host._markerDialog) this._closeMarkerDialog();
};
return html`<hp-dialog class="device-inbox-dialog" .hass=${this.host.hass}
.title=${this.host._t('device_inbox.title' as any)} icon="mdi:devices" wide
.title=${this.host._t('device_inbox.title')} icon="mdi:devices" wide
@hp-close=${() => (this.host._deviceInbox = null)}>
<div class="device-inbox" ?inert=${!!dialog.busy}>
<div class="device-inbox-head">
<input class="device-inbox-search" type="search" autofocus
placeholder=${this.host._t('device_inbox.search' as any)} .value=${dialog.search}
placeholder=${this.host._t('device_inbox.search')} .value=${dialog.search}
@input=${(event: Event) => (this.host._deviceInbox = {
...dialog, search: (event.target as HTMLInputElement).value, limit: 100,
})} />
<button type="button" class="btn" @click=${openVirtual}>
<ha-icon icon="mdi:map-marker-plus-outline"></ha-icon>
${this.host._t('device_inbox.add_virtual' as any)}
${this.host._t('device_inbox.add_virtual')}
</button>
</div>
<div class="device-inbox-tabs" role="tablist" @keydown=${(event: KeyboardEvent) => this._deviceInboxTabKey(event)}>
@@ -12015,7 +12015,7 @@ public _renderDeviceInbox(): TemplateResult {
<input type="checkbox" .checked=${dialog.onlyNew}
@change=${(event: Event) => (this.host._deviceInbox = {
...dialog, onlyNew: (event.target as HTMLInputElement).checked, limit: 100,
})} />${this.host._t('device_inbox.only_new' as any)}
})} />${this.host._t('device_inbox.only_new')}
</label>` : nothing}
${dialog.tab === 'available' ? html`<label>
<input type="checkbox" .checked=${dialog.showEntities}
@@ -12024,7 +12024,7 @@ public _renderDeviceInbox(): TemplateResult {
this.host._deviceInbox = {
...dialog, showEntities: (event.target as HTMLInputElement).checked, limit: 100,
};
}} />${this.host._t('device_inbox.show_entities' as any)}
}} />${this.host._t('device_inbox.show_entities')}
</label>` : nothing}
<span class="device-inbox-filter-help">
<label>
@@ -12043,24 +12043,24 @@ public _renderDeviceInbox(): TemplateResult {
${visible.length ? visible.map((row) => {
const primary = row.category === 'on_plan'
? row.canFind ? html`<button type="button" class="btn" @click=${() => this._findInboxDevice(row)}>
<ha-icon icon="mdi:crosshairs-gps"></ha-icon>${this.host._t('device_inbox.find' as any)}</button>`
<ha-icon icon="mdi:crosshairs-gps"></ha-icon>${this.host._t('device_inbox.find')}</button>`
: html`<button type="button" class="btn" @click=${() => this._openInboxMarker(row)}
?disabled=${!row.canEdit}>${this.host._t('device_inbox.edit' as any)}</button>`
?disabled=${!row.canEdit}>${this.host._t('device_inbox.edit')}</button>`
: row.category === 'hidden'
? html`<button type="button" class="btn" @click=${() => this._setInboxHidden(row, false)}
title=${row.canShow ? '' : this.host._t('device_inbox.show_disabled' as any)}
?disabled=${!row.canShow}>${this.host._t('device_inbox.show' as any)}</button>`
title=${row.canShow ? '' : this.host._t('device_inbox.show_disabled')}
?disabled=${!row.canShow}>${this.host._t('device_inbox.show')}</button>`
: html`<button type="button" class="btn" @click=${() => this._openInboxMarker(row, true)}
?disabled=${!row.canAdd}>${this.host._t(row.category === 'readd'
? 'device_inbox.readd' as any : 'device_inbox.add' as any)}</button>`;
? 'device_inbox.readd' : 'device_inbox.add')}</button>`;
const status = row.status.kind === 'active' ? ''
: this.host._t(`device_inbox.status_${row.status.kind}` as any);
: this.host._t(`device_inbox.status_${row.status.kind}` as I18nKey);
return html`<article class="device-inbox-row" data-binding=${row.binding}
data-category=${row.category} data-status=${row.status.kind}>
<ha-icon class="device-inbox-icon" .icon=${row.icon}></ha-icon>
<div class="device-inbox-copy">
<div class="device-inbox-name"><b>${row.name}</b>
${row.isNew ? html`<span class="device-inbox-new">${this.host._t('device_inbox.new' as any)}</span>` : nothing}
${row.isNew ? html`<span class="device-inbox-new">${this.host._t('device_inbox.new')}</span>` : nothing}
</div>
<div class="device-inbox-meta">
${[row.model, row.integration, row.spaceName, row.areaName].filter(Boolean).join(' · ')}
@@ -12079,22 +12079,22 @@ public _renderDeviceInbox(): TemplateResult {
${row.canEdit || row.canHide || row.category === 'available'
|| row.category === 'hidden' || this.host._bindingHasHaPage(row.binding) ? html`
<details class="device-inbox-menu">
<summary class="btn ghost" aria-label=${this.host._t('device_inbox.more_actions' as any)}
title=${this.host._t('device_inbox.more_actions' as any)}>
<summary class="btn ghost" aria-label=${this.host._t('device_inbox.more_actions')}
title=${this.host._t('device_inbox.more_actions')}>
<ha-icon icon="mdi:dots-vertical"></ha-icon>
</summary>
<div class="device-inbox-menu-items">
${row.canEdit && !(row.category === 'on_plan' && !row.canFind)
? html`<button type="button" class="btn ghost" @click=${() => this._openInboxMarker(row)}>
${this.host._t('device_inbox.edit' as any)}</button>` : nothing}
${this.host._t('device_inbox.edit')}</button>` : nothing}
${row.canHide ? html`<button type="button" class="btn ghost"
@click=${() => this._setInboxHidden(row, true)}>${this.host._t('device_inbox.hide' as any)}</button>` : nothing}
@click=${() => this._setInboxHidden(row, true)}>${this.host._t('device_inbox.hide')}</button>` : nothing}
${row.category === 'available' ? html`<button type="button" class="btn ghost"
@click=${() => this._setInboxHidden(row, true)}>${this.host._t('device_inbox.hide_available' as any)}</button>` : nothing}
@click=${() => this._setInboxHidden(row, true)}>${this.host._t('device_inbox.hide_available')}</button>` : nothing}
${row.category === 'hidden' ? html`<button type="button" class="btn ghost"
title=${row.canFind ? '' : this.host._t('device_inbox.find_hidden_hint' as any)}
title=${row.canFind ? '' : this.host._t('device_inbox.find_hidden_hint')}
?disabled=${!row.canFind} @click=${() => this._findInboxDevice(row)}>
<ha-icon icon="mdi:crosshairs-gps"></ha-icon>${this.host._t('device_inbox.find' as any)}</button>` : nothing}
<ha-icon icon="mdi:crosshairs-gps"></ha-icon>${this.host._t('device_inbox.find')}</button>` : nothing}
${this.host._bindingHasHaPage(row.binding) ? html`<button type="button" class="btn ghost"
@click=${() => this.host._openBindingInHa(row.binding)}>${this.host._t('btn.open_in_ha')}</button>` : nothing}
</div>
@@ -12105,7 +12105,7 @@ public _renderDeviceInbox(): TemplateResult {
</div>
${filtered.length > visible.length ? html`<button type="button" class="btn device-inbox-more"
@click=${() => (this.host._deviceInbox = { ...dialog, limit: dialog.limit + 100 })}>
${this.host._t('device_inbox.show_more' as any)} (${filtered.length - visible.length})
${this.host._t('device_inbox.show_more')} (${filtered.length - visible.length})
</button>` : nothing}
</div>
<div slot="footer" class="row">
@@ -12252,9 +12252,9 @@ public _toggleConfirmationLines(intent: ResolvedToggleIntent): string[] {
public _toggleHintLines(intent: ResolvedToggleIntent | null): string[] {
if (!intent) return [];
const effect = (value: ToggleNextEffect): string =>
this.host._t((`marker.toggle_effect_${value.replace('-', '_')}`) as any);
this.host._t(`marker.toggle_effect_${value.replace('-', '_')}` as I18nKey);
const skipReason = (value: ToggleSkipReason): string =>
this.host._t((`marker.toggle_skip_${value.replace('-', '_')}`) as any);
this.host._t(`marker.toggle_skip_${value.replace('-', '_')}` as I18nKey);
return formatToggleIntent(intent, {
single: (target) => {
if ('via' in target && target.via === 'virtual-light') {
@@ -12291,7 +12291,7 @@ public _toggleHintLines(intent: ResolvedToggleIntent | null): string[] {
}).join(', '),
}),
none: (reason: ToggleNoneReason) =>
this.host._t((`marker.toggle_none_${reason.replaceAll('-', '_')}`) as any),
this.host._t(`marker.toggle_none_${reason.replaceAll('-', '_')}` as I18nKey),
});
}
@@ -12408,7 +12408,7 @@ public _valueBadgeCandidateLabel(candidate: ValueBadgeCandidate): string {
}
const entityName = this.host.hass.states[source.entity_id]?.attributes?.friendly_name
|| this.host._fullRegistryHass.entities[source.entity_id]?.name || source.entity_id;
return this.host._t((`marker.value_badge_attr_${source.attribute}`) as any, { name: entityName });
return this.host._t(`marker.value_badge_attr_${source.attribute}` as I18nKey, { name: entityName });
}
public _controlCandidates(d: NonNullable<HouseplanEditorHostPort['_markerDialog']>): {
@@ -12596,7 +12596,7 @@ public _renderMarkerDialog(): TemplateResult {
${bindingStatus?.kind === 'ha_disabled'
? html`<div class="habindingbanner" role="status">
<ha-icon icon="mdi:power-plug-off-outline"></ha-icon>
<span>${this.host._t((`marker.ha_disabled_${bindingStatus.reason}`) as any)}</span>
<span>${this.host._t(`marker.ha_disabled_${bindingStatus.reason}` as I18nKey)}</span>
${canOpenBindingInHa
? html`<button class="btn ghost" type="button" @click=${() => this.host._openBindingInHa(d.binding)}>
<ha-icon icon="mdi:open-in-new"></ha-icon>${this.host._t('btn.open_in_ha')}
@@ -13098,7 +13098,7 @@ public _renderMarkerDialog(): TemplateResult {
})}>
${(['right', 'bottom', 'left', 'top'] as const).map((position) => html`
<option value=${position} ?selected=${position === effectiveBadgePosition}>
${this.host._t((`marker.value_badge_${position}`) as any)}
${this.host._t(`marker.value_badge_${position}` as I18nKey)}
</option>`)}
</select>
` : nothing}