fix: drop the unreachable virtual-radio guard, keep honest evidence (#385 r2-M1)

An already-checked radio input fires no change event, so the same-binding
guard on the virtual branch was dead code and its smoke assert vacuous.
Removed both; a comment documents why the reset there is always
legitimate. The candidate-list guard (the reachable path) stays tested.

User-Visible: no
Issue: #385
This commit is contained in:
Codex
2026-08-30 11:44:57 +03:00
parent c872c93516
commit e561e5fc5d
21 changed files with 160 additions and 167 deletions
@@ -1,125 +1,125 @@
{
"schema": 1,
"fingerprint": "b874f9b281d491372eda5a03e1fc682113653e6f511bc5a8e308166c788f39a7",
"fingerprint": "7d9dd4574e49f91701004b99bff143525cff2f5b0a41568acab1e979cf27c06d",
"entry": "houseplan-card.js",
"initialViewFiles": [
"houseplan-assets/houseplan-card-Cl1URig5.js",
"houseplan-assets/houseplan-card-DtBnECuO.js",
"houseplan-card.js"
],
"initialViewGzipBytes": 277995,
"initialViewGzipBytes": 277994,
"lazyFiles": [
"houseplan-assets/backdrop-pick-BgaBwbW9.js",
"houseplan-assets/de-CrsiyCkG.js",
"houseplan-assets/editor-ro-Yeu-g.js",
"houseplan-assets/fr-CYaYPUbR.js",
"houseplan-assets/houseplan-editor-runtime-CwU02k6_.js",
"houseplan-assets/houseplan-onboarding-runtime-DIa5rWbW.js"
"houseplan-assets/backdrop-pick-aV3NiaC9.js",
"houseplan-assets/de-fvCwSozd.js",
"houseplan-assets/editor-Cg0xzOaz.js",
"houseplan-assets/fr-lrcBAJ0g.js",
"houseplan-assets/houseplan-editor-runtime-DBo3J7HA.js",
"houseplan-assets/houseplan-onboarding-runtime-9MJDx5Yx.js"
],
"lazyGzipBytes": 192322,
"lazyGzipBytes": 192313,
"lazyEditorFiles": [
"houseplan-assets/backdrop-pick-BgaBwbW9.js",
"houseplan-assets/editor-ro-Yeu-g.js",
"houseplan-assets/houseplan-editor-runtime-CwU02k6_.js"
"houseplan-assets/backdrop-pick-aV3NiaC9.js",
"houseplan-assets/editor-Cg0xzOaz.js",
"houseplan-assets/houseplan-editor-runtime-DBo3J7HA.js"
],
"lazyEditorGzipBytes": 140239,
"lazyEditorGzipBytes": 140237,
"lazyOnboardingFiles": [
"houseplan-assets/backdrop-pick-BgaBwbW9.js",
"houseplan-assets/houseplan-onboarding-runtime-DIa5rWbW.js"
"houseplan-assets/backdrop-pick-aV3NiaC9.js",
"houseplan-assets/houseplan-onboarding-runtime-9MJDx5Yx.js"
],
"lazyOnboardingGzipBytes": 9449,
"lazyOnboardingGzipBytes": 9450,
"lazyLocaleFiles": [
"houseplan-assets/de-CrsiyCkG.js",
"houseplan-assets/fr-CYaYPUbR.js"
"houseplan-assets/de-fvCwSozd.js",
"houseplan-assets/fr-lrcBAJ0g.js"
],
"lazyLocaleGzipBytes": 45587,
"lazyLocaleGzipBytes": 45581,
"files": [
{
"path": "houseplan-assets/backdrop-pick-BgaBwbW9.js",
"sha256": "f194edb90e1350b06f00a1651d2650562e92abf4a388cbeb7aab36106045c93c",
"path": "houseplan-assets/backdrop-pick-aV3NiaC9.js",
"sha256": "d69bf449fbfbf78d5ecb20946dd08960412cdb7d87a8acb896b0f7db15bed072",
"rawBytes": 6967,
"gzipBytes": 2953,
"gzipBytes": 2955,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-Cl1URig5.js"
"houseplan-assets/houseplan-card-DtBnECuO.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/de-CrsiyCkG.js",
"sha256": "13a49233cab47865fb5bc094464fec897cdf816f198e07d745a0cb1afb6745aa",
"path": "houseplan-assets/de-fvCwSozd.js",
"sha256": "8ee8a41141e01712bd9441c2074909bd966bcc3351565aecc7d79f3646779e0a",
"rawBytes": 75596,
"gzipBytes": 23012,
"gzipBytes": 23009,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/editor-ro-Yeu-g.js",
"sha256": "fa89bc7df9eea568c7fef429a9fca8a7c32fb5990f738b5a4dea6e01659d7283",
"path": "houseplan-assets/editor-Cg0xzOaz.js",
"sha256": "41786591029748d0f10d5e3dfddeba9d819a6c46d8e1e363098295fdc38a8411",
"rawBytes": 3831,
"gzipBytes": 1583,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-Cl1URig5.js"
"houseplan-assets/houseplan-card-DtBnECuO.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/fr-CYaYPUbR.js",
"sha256": "1c6c58a7d49ebd6d8d6f4654bc67407cd5462a5f5fbf596369abe007001f8ed5",
"path": "houseplan-assets/fr-lrcBAJ0g.js",
"sha256": "80bae04891526c11b3b7dc17b0ac97958e66b77fe8efea2bdacad059fe5128c3",
"rawBytes": 77737,
"gzipBytes": 22575,
"gzipBytes": 22572,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/houseplan-card-Cl1URig5.js",
"sha256": "fef8c1f58883793cad01282882e5e7381278d08ed2a328dcd47a5b3912838aa1",
"path": "houseplan-assets/houseplan-card-DtBnECuO.js",
"sha256": "e045e2ed3f28ec80afdecb90b818f57599775756f34b74dddb0a7da297872c42",
"rawBytes": 979611,
"gzipBytes": 277199,
"gzipBytes": 277198,
"isEntry": false,
"imports": [],
"dynamicImports": [
"houseplan-assets/de-CrsiyCkG.js",
"houseplan-assets/editor-ro-Yeu-g.js",
"houseplan-assets/fr-CYaYPUbR.js",
"houseplan-assets/houseplan-editor-runtime-CwU02k6_.js",
"houseplan-assets/houseplan-onboarding-runtime-DIa5rWbW.js"
"houseplan-assets/de-fvCwSozd.js",
"houseplan-assets/editor-Cg0xzOaz.js",
"houseplan-assets/fr-lrcBAJ0g.js",
"houseplan-assets/houseplan-editor-runtime-DBo3J7HA.js",
"houseplan-assets/houseplan-onboarding-runtime-9MJDx5Yx.js"
]
},
{
"path": "houseplan-assets/houseplan-editor-runtime-CwU02k6_.js",
"sha256": "498d04660688f18784e62a27d26e8248b46476607a35cd5f1fc4f206ff708a56",
"rawBytes": 526667,
"gzipBytes": 135703,
"path": "houseplan-assets/houseplan-editor-runtime-DBo3J7HA.js",
"sha256": "702ceb450bc56585f87ebaff2888fa584a87a8b953ba3e439fe1e01eb52adafd",
"rawBytes": 526561,
"gzipBytes": 135699,
"isEntry": false,
"imports": [
"houseplan-assets/backdrop-pick-BgaBwbW9.js",
"houseplan-assets/houseplan-card-Cl1URig5.js"
"houseplan-assets/backdrop-pick-aV3NiaC9.js",
"houseplan-assets/houseplan-card-DtBnECuO.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/houseplan-onboarding-runtime-DIa5rWbW.js",
"sha256": "74524c338b723bf9d894028beffe9555e7aab0d1fcd514572f138e37d55897c3",
"path": "houseplan-assets/houseplan-onboarding-runtime-9MJDx5Yx.js",
"sha256": "4debe25fee56b279d2656af252520d6e0c9267dbc0cd5daca9ac9f904b72795c",
"rawBytes": 26195,
"gzipBytes": 6496,
"gzipBytes": 6495,
"isEntry": false,
"imports": [
"houseplan-assets/backdrop-pick-BgaBwbW9.js",
"houseplan-assets/houseplan-card-Cl1URig5.js"
"houseplan-assets/backdrop-pick-aV3NiaC9.js",
"houseplan-assets/houseplan-card-DtBnECuO.js"
],
"dynamicImports": []
},
{
"path": "houseplan-card.js",
"sha256": "84cd06cc4517f59c3c83504aeae9ef0c424258ebf1baeb66f75c9c0c280eb9c8",
"sha256": "ea9294f40721467c6a61941e796290ca519fef0c9f2d27f93bedc8210a531f7c",
"rawBytes": 1183,
"gzipBytes": 796,
"isEntry": true,
"imports": [
"houseplan-assets/houseplan-card-Cl1URig5.js"
"houseplan-assets/houseplan-card-DtBnECuO.js"
],
"dynamicImports": []
}
File diff suppressed because one or more lines are too long
@@ -1,14 +1,14 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="b874f9b281d491372eda5a03e1fc682113653e6f511bc5a8e308166c788f39a7";import{c as e,l as o,t,c$ as s,A as a,d0 as i,d1 as l,d2 as n,E as r,b as c}from"./houseplan-card-Cl1URig5.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__="7d9dd4574e49f91701004b99bff143525cff2f5b0a41568acab1e979cf27c06d";import{c as e,l as o,t,c$ as s,A as a,d0 as i,d1 as l,d2 as n,E as r,b as c}from"./houseplan-card-DtBnECuO.js";class f 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,f={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")},h=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}
.computeLabel=${e=>f[e.name]||e.name}
@value-changed=${this._valueChanged}
></ha-form>`;return c`
${d(f.slice(0,3))}
${d(h.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:_})}
</div>`:a}
${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);
${d(h.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)}}f.properties={hass:{attribute:!1},_config:{state:!0},_spaces:{state:!0}},customElements.get("houseplan-card-editor")||customElements.define("houseplan-card-editor",f);
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="b874f9b281d491372eda5a03e1fc682113653e6f511bc5a8e308166c788f39a7";import{bT as t,bU as s,bV as e,bW as o,aq as a,bX as l,c0 as i,bY as h,bZ as c,b_ as n,b$ as r,A as p,b as _,cT as d,ap as u,ar as g,cU as m}from"./houseplan-card-Cl1URig5.js";import{i as b,c as $,e as v,r as f,a as y,b as w,s as D,t as S}from"./backdrop-pick-BgaBwbW9.js";const k=1e3,C=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},M="b874f9b281d491372eda5a03e1fc682113653e6f511bc5a8e308166c788f39a7";class F{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)}))}}}}_openSpaceDialog(p,_){if(!this.host._serverStorage||!this.host._serverCfg)return void this.host._showToast(this.host._t("toast.integration_missing"));if("edit"===p){const i=this.host._serverCfg.spaces.find(t=>t.id===_);if(!i)return;const h=t(i),c=i.settings?.custom_fill&&"object"==typeof i.settings.custom_fill?s(i.settings.custom_fill):null,n="none"===h.fill?{...c||e,a:0}:c;return void(this.host._spaceDialog={mode:p,spaceId:_,title:i.title,planUrl:i.plan_url||null,planFile:null,source:i.plan_url?"file":"draw",showBorders:h.showBorders,showNames:h.showNames,zeroWallStyle:l(i),displayTouched:!0,hideDecor:h.hideDecor,hideOpenings:h.hideOpenings,roomColor:h.color,roomOpacity:h.opacity,fillMode:"none"===h.fill?"custom":h.fill,customFill:n,glowEnabled:h.glow,bgColor:h.bgColor,bgMode:"static"===i.settings?.bg_mode||"daynight"===i.settings?.bg_mode?i.settings.bg_mode:null,northDeg:a({},i.settings),sunRays:"boolean"==typeof i.settings?.sun_rays?i.settings.sun_rays:null,tempMin:h.tempMin,tempMax:h.tempMax,showLqi:h.showLqi??this.host._config?.show_signal??!0,cardFontScale:h.cardFontScale,labelTemp:h.labelTemp,labelHum:h.labelHum,labelLqi:h.labelLqi,labelLight:h.labelLight,cellCm:Number(i.cell_cm)>0?Number(i.cell_cm):5,cellCmInput:o(Number(i.cell_cm)>0?Number(i.cell_cm):5,this.host._imperial),cellCmTouched:!1,busy:!1})}const d=i(this.host._imperial);this.host._spaceDialog={mode:p,title:"",planUrl:null,planFile:null,...b(),hideDecor:!1,hideOpenings:!1,zeroWallStyle:"dashed",roomColor:r,roomOpacity:n,fillMode:"custom",customFill:{...e,a:0},glowEnabled:!0,bgColor:null,bgMode:"daynight",northDeg:null,sunRays:null,tempMin:c,tempMax:h,showLqi:this.host._config?.show_signal??!0,cardFontScale:1,labelTemp:!1,labelHum:!1,labelLqi:!1,labelLight:!1,cellCm:d,cellCmInput:o(d,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 $(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 v(e,o.ext,e.name);this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:a})}_renderBackdropGuard(){return f(this.host,t=>{this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:t})},()=>{this.host._backdropGuard=null},this.host.hass)??p}_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 _`<div class="savedplans muted">${this.host._t("space.loading")}</div>`;const s=t.saved||[];if(!s.length)return _`<div class="savedplans muted">${this.host._t("space.no_saved")}</div>`;return _`<div class="savedplans">
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="7d9dd4574e49f91701004b99bff143525cff2f5b0a41568acab1e979cf27c06d";import{bT as t,bU as s,bV as e,bW as o,aq as a,bX as l,c0 as i,bY as h,bZ as c,b_ as n,b$ as r,A as p,b as _,cT as d,ap as u,ar as g,cU as m}from"./houseplan-card-DtBnECuO.js";import{i as b,c as $,e as v,r as f,a as y,b as w,s as D,t as S}from"./backdrop-pick-aV3NiaC9.js";const k=1e3,C=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},M="7d9dd4574e49f91701004b99bff143525cff2f5b0a41568acab1e979cf27c06d";class F{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)}))}}}}_openSpaceDialog(p,_){if(!this.host._serverStorage||!this.host._serverCfg)return void this.host._showToast(this.host._t("toast.integration_missing"));if("edit"===p){const i=this.host._serverCfg.spaces.find(t=>t.id===_);if(!i)return;const h=t(i),c=i.settings?.custom_fill&&"object"==typeof i.settings.custom_fill?s(i.settings.custom_fill):null,n="none"===h.fill?{...c||e,a:0}:c;return void(this.host._spaceDialog={mode:p,spaceId:_,title:i.title,planUrl:i.plan_url||null,planFile:null,source:i.plan_url?"file":"draw",showBorders:h.showBorders,showNames:h.showNames,zeroWallStyle:l(i),displayTouched:!0,hideDecor:h.hideDecor,hideOpenings:h.hideOpenings,roomColor:h.color,roomOpacity:h.opacity,fillMode:"none"===h.fill?"custom":h.fill,customFill:n,glowEnabled:h.glow,bgColor:h.bgColor,bgMode:"static"===i.settings?.bg_mode||"daynight"===i.settings?.bg_mode?i.settings.bg_mode:null,northDeg:a({},i.settings),sunRays:"boolean"==typeof i.settings?.sun_rays?i.settings.sun_rays:null,tempMin:h.tempMin,tempMax:h.tempMax,showLqi:h.showLqi??this.host._config?.show_signal??!0,cardFontScale:h.cardFontScale,labelTemp:h.labelTemp,labelHum:h.labelHum,labelLqi:h.labelLqi,labelLight:h.labelLight,cellCm:Number(i.cell_cm)>0?Number(i.cell_cm):5,cellCmInput:o(Number(i.cell_cm)>0?Number(i.cell_cm):5,this.host._imperial),cellCmTouched:!1,busy:!1})}const d=i(this.host._imperial);this.host._spaceDialog={mode:p,title:"",planUrl:null,planFile:null,...b(),hideDecor:!1,hideOpenings:!1,zeroWallStyle:"dashed",roomColor:r,roomOpacity:n,fillMode:"custom",customFill:{...e,a:0},glowEnabled:!0,bgColor:null,bgMode:"daynight",northDeg:null,sunRays:null,tempMin:c,tempMax:h,showLqi:this.host._config?.show_signal??!0,cardFontScale:1,labelTemp:!1,labelHum:!1,labelLqi:!1,labelLight:!1,cellCm:d,cellCmInput:o(d,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 $(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 v(e,o.ext,e.name);this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:a})}_renderBackdropGuard(){return f(this.host,t=>{this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:t})},()=>{this.host._backdropGuard=null},this.host.hass)??p}_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 _`<div class="savedplans muted">${this.host._t("space.loading")}</div>`;const s=t.saved||[];if(!s.length)return _`<div class="savedplans muted">${this.host._t("space.no_saved")}</div>`;return _`<div class="savedplans">
${s.map(s=>{return _`
<div class="savedplan ${s.url===t.planUrl?"cur":""}">
<img src=${this.host._display(s.url)} alt="" loading="lazy" decoding="async" />
@@ -1 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="b874f9b281d491372eda5a03e1fc682113653e6f511bc5a8e308166c788f39a7";try{await import("./houseplan-assets/houseplan-card-Cl1URig5.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__="7d9dd4574e49f91701004b99bff143525cff2f5b0a41568acab1e979cf27c06d";try{await import("./houseplan-assets/houseplan-card-DtBnECuO.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)}
+5 -9
View File
@@ -173,14 +173,10 @@ const res = await page.evaluate(async () => {
const bindingResetToAuto = !!virtualBinding && c._markerDialog?.binding === 'virtual'
&& c._markerDialog?.valueSource === null
&& c._markerDialog?.valueSourceTouched === true;
// #385(а) AC2: re-clicking the ALREADY active virtual binding is a no-op too
c._markerDialog = { ...c._markerDialog, valueSource: { kind: 'sentinel-385' } };
await c.updateComplete;
virtualBinding?.click();
await c.updateComplete;
const sameVirtualKeepsSource =
c._markerDialog?.valueSource?.kind === 'sentinel-385'
&& c._markerDialog?.binding === 'virtual';
// #385(а) r2-M1: no AC for the virtual radio — an already-checked radio
// input fires no change event, so the reset branch is unreachable by a
// real click (verified by review r2); the guard and its vacuous assert
// were removed rather than kept as false evidence.
c._closeMarkerDialog();
return {
@@ -188,7 +184,7 @@ const res = await page.evaluate(async () => {
preview42, draftSourceExact, savedExact, actionSaved, reopenedExact,
cancelKeptSource, plan42, static42, actionUnchanged,
unavailableDash, unavailableStillValue, recovered55, bindingResetToAuto,
sameBindingKeepsSource, sameVirtualKeepsSource,
sameBindingKeepsSource,
};
});
+54 -54
View File
@@ -1,125 +1,125 @@
{
"schema": 1,
"fingerprint": "b874f9b281d491372eda5a03e1fc682113653e6f511bc5a8e308166c788f39a7",
"fingerprint": "7d9dd4574e49f91701004b99bff143525cff2f5b0a41568acab1e979cf27c06d",
"entry": "houseplan-card.js",
"initialViewFiles": [
"houseplan-assets/houseplan-card-Cl1URig5.js",
"houseplan-assets/houseplan-card-DtBnECuO.js",
"houseplan-card.js"
],
"initialViewGzipBytes": 277995,
"initialViewGzipBytes": 277994,
"lazyFiles": [
"houseplan-assets/backdrop-pick-BgaBwbW9.js",
"houseplan-assets/de-CrsiyCkG.js",
"houseplan-assets/editor-ro-Yeu-g.js",
"houseplan-assets/fr-CYaYPUbR.js",
"houseplan-assets/houseplan-editor-runtime-CwU02k6_.js",
"houseplan-assets/houseplan-onboarding-runtime-DIa5rWbW.js"
"houseplan-assets/backdrop-pick-aV3NiaC9.js",
"houseplan-assets/de-fvCwSozd.js",
"houseplan-assets/editor-Cg0xzOaz.js",
"houseplan-assets/fr-lrcBAJ0g.js",
"houseplan-assets/houseplan-editor-runtime-DBo3J7HA.js",
"houseplan-assets/houseplan-onboarding-runtime-9MJDx5Yx.js"
],
"lazyGzipBytes": 192322,
"lazyGzipBytes": 192313,
"lazyEditorFiles": [
"houseplan-assets/backdrop-pick-BgaBwbW9.js",
"houseplan-assets/editor-ro-Yeu-g.js",
"houseplan-assets/houseplan-editor-runtime-CwU02k6_.js"
"houseplan-assets/backdrop-pick-aV3NiaC9.js",
"houseplan-assets/editor-Cg0xzOaz.js",
"houseplan-assets/houseplan-editor-runtime-DBo3J7HA.js"
],
"lazyEditorGzipBytes": 140239,
"lazyEditorGzipBytes": 140237,
"lazyOnboardingFiles": [
"houseplan-assets/backdrop-pick-BgaBwbW9.js",
"houseplan-assets/houseplan-onboarding-runtime-DIa5rWbW.js"
"houseplan-assets/backdrop-pick-aV3NiaC9.js",
"houseplan-assets/houseplan-onboarding-runtime-9MJDx5Yx.js"
],
"lazyOnboardingGzipBytes": 9449,
"lazyOnboardingGzipBytes": 9450,
"lazyLocaleFiles": [
"houseplan-assets/de-CrsiyCkG.js",
"houseplan-assets/fr-CYaYPUbR.js"
"houseplan-assets/de-fvCwSozd.js",
"houseplan-assets/fr-lrcBAJ0g.js"
],
"lazyLocaleGzipBytes": 45587,
"lazyLocaleGzipBytes": 45581,
"files": [
{
"path": "houseplan-assets/backdrop-pick-BgaBwbW9.js",
"sha256": "f194edb90e1350b06f00a1651d2650562e92abf4a388cbeb7aab36106045c93c",
"path": "houseplan-assets/backdrop-pick-aV3NiaC9.js",
"sha256": "d69bf449fbfbf78d5ecb20946dd08960412cdb7d87a8acb896b0f7db15bed072",
"rawBytes": 6967,
"gzipBytes": 2953,
"gzipBytes": 2955,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-Cl1URig5.js"
"houseplan-assets/houseplan-card-DtBnECuO.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/de-CrsiyCkG.js",
"sha256": "13a49233cab47865fb5bc094464fec897cdf816f198e07d745a0cb1afb6745aa",
"path": "houseplan-assets/de-fvCwSozd.js",
"sha256": "8ee8a41141e01712bd9441c2074909bd966bcc3351565aecc7d79f3646779e0a",
"rawBytes": 75596,
"gzipBytes": 23012,
"gzipBytes": 23009,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/editor-ro-Yeu-g.js",
"sha256": "fa89bc7df9eea568c7fef429a9fca8a7c32fb5990f738b5a4dea6e01659d7283",
"path": "houseplan-assets/editor-Cg0xzOaz.js",
"sha256": "41786591029748d0f10d5e3dfddeba9d819a6c46d8e1e363098295fdc38a8411",
"rawBytes": 3831,
"gzipBytes": 1583,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-Cl1URig5.js"
"houseplan-assets/houseplan-card-DtBnECuO.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/fr-CYaYPUbR.js",
"sha256": "1c6c58a7d49ebd6d8d6f4654bc67407cd5462a5f5fbf596369abe007001f8ed5",
"path": "houseplan-assets/fr-lrcBAJ0g.js",
"sha256": "80bae04891526c11b3b7dc17b0ac97958e66b77fe8efea2bdacad059fe5128c3",
"rawBytes": 77737,
"gzipBytes": 22575,
"gzipBytes": 22572,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/houseplan-card-Cl1URig5.js",
"sha256": "fef8c1f58883793cad01282882e5e7381278d08ed2a328dcd47a5b3912838aa1",
"path": "houseplan-assets/houseplan-card-DtBnECuO.js",
"sha256": "e045e2ed3f28ec80afdecb90b818f57599775756f34b74dddb0a7da297872c42",
"rawBytes": 979611,
"gzipBytes": 277199,
"gzipBytes": 277198,
"isEntry": false,
"imports": [],
"dynamicImports": [
"houseplan-assets/de-CrsiyCkG.js",
"houseplan-assets/editor-ro-Yeu-g.js",
"houseplan-assets/fr-CYaYPUbR.js",
"houseplan-assets/houseplan-editor-runtime-CwU02k6_.js",
"houseplan-assets/houseplan-onboarding-runtime-DIa5rWbW.js"
"houseplan-assets/de-fvCwSozd.js",
"houseplan-assets/editor-Cg0xzOaz.js",
"houseplan-assets/fr-lrcBAJ0g.js",
"houseplan-assets/houseplan-editor-runtime-DBo3J7HA.js",
"houseplan-assets/houseplan-onboarding-runtime-9MJDx5Yx.js"
]
},
{
"path": "houseplan-assets/houseplan-editor-runtime-CwU02k6_.js",
"sha256": "498d04660688f18784e62a27d26e8248b46476607a35cd5f1fc4f206ff708a56",
"rawBytes": 526667,
"gzipBytes": 135703,
"path": "houseplan-assets/houseplan-editor-runtime-DBo3J7HA.js",
"sha256": "702ceb450bc56585f87ebaff2888fa584a87a8b953ba3e439fe1e01eb52adafd",
"rawBytes": 526561,
"gzipBytes": 135699,
"isEntry": false,
"imports": [
"houseplan-assets/backdrop-pick-BgaBwbW9.js",
"houseplan-assets/houseplan-card-Cl1URig5.js"
"houseplan-assets/backdrop-pick-aV3NiaC9.js",
"houseplan-assets/houseplan-card-DtBnECuO.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/houseplan-onboarding-runtime-DIa5rWbW.js",
"sha256": "74524c338b723bf9d894028beffe9555e7aab0d1fcd514572f138e37d55897c3",
"path": "houseplan-assets/houseplan-onboarding-runtime-9MJDx5Yx.js",
"sha256": "4debe25fee56b279d2656af252520d6e0c9267dbc0cd5daca9ac9f904b72795c",
"rawBytes": 26195,
"gzipBytes": 6496,
"gzipBytes": 6495,
"isEntry": false,
"imports": [
"houseplan-assets/backdrop-pick-BgaBwbW9.js",
"houseplan-assets/houseplan-card-Cl1URig5.js"
"houseplan-assets/backdrop-pick-aV3NiaC9.js",
"houseplan-assets/houseplan-card-DtBnECuO.js"
],
"dynamicImports": []
},
{
"path": "houseplan-card.js",
"sha256": "84cd06cc4517f59c3c83504aeae9ef0c424258ebf1baeb66f75c9c0c280eb9c8",
"sha256": "ea9294f40721467c6a61941e796290ca519fef0c9f2d27f93bedc8210a531f7c",
"rawBytes": 1183,
"gzipBytes": 796,
"isEntry": true,
"imports": [
"houseplan-assets/houseplan-card-Cl1URig5.js"
"houseplan-assets/houseplan-card-DtBnECuO.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,14 +1,14 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="b874f9b281d491372eda5a03e1fc682113653e6f511bc5a8e308166c788f39a7";import{c as e,l as o,t,c$ as s,A as a,d0 as i,d1 as l,d2 as n,E as r,b as c}from"./houseplan-card-Cl1URig5.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__="7d9dd4574e49f91701004b99bff143525cff2f5b0a41568acab1e979cf27c06d";import{c as e,l as o,t,c$ as s,A as a,d0 as i,d1 as l,d2 as n,E as r,b as c}from"./houseplan-card-DtBnECuO.js";class f 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,f={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")},h=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}
.computeLabel=${e=>f[e.name]||e.name}
@value-changed=${this._valueChanged}
></ha-form>`;return c`
${d(f.slice(0,3))}
${d(h.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:_})}
</div>`:a}
${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);
${d(h.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)}}f.properties={hass:{attribute:!1},_config:{state:!0},_spaces:{state:!0}},customElements.get("houseplan-card-editor")||customElements.define("houseplan-card-editor",f);
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__="b874f9b281d491372eda5a03e1fc682113653e6f511bc5a8e308166c788f39a7";import{bT as t,bU as s,bV as e,bW as o,aq as a,bX as l,c0 as i,bY as h,bZ as c,b_ as n,b$ as r,A as p,b as _,cT as d,ap as u,ar as g,cU as m}from"./houseplan-card-Cl1URig5.js";import{i as b,c as $,e as v,r as f,a as y,b as w,s as D,t as S}from"./backdrop-pick-BgaBwbW9.js";const k=1e3,C=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},M="b874f9b281d491372eda5a03e1fc682113653e6f511bc5a8e308166c788f39a7";class F{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)}))}}}}_openSpaceDialog(p,_){if(!this.host._serverStorage||!this.host._serverCfg)return void this.host._showToast(this.host._t("toast.integration_missing"));if("edit"===p){const i=this.host._serverCfg.spaces.find(t=>t.id===_);if(!i)return;const h=t(i),c=i.settings?.custom_fill&&"object"==typeof i.settings.custom_fill?s(i.settings.custom_fill):null,n="none"===h.fill?{...c||e,a:0}:c;return void(this.host._spaceDialog={mode:p,spaceId:_,title:i.title,planUrl:i.plan_url||null,planFile:null,source:i.plan_url?"file":"draw",showBorders:h.showBorders,showNames:h.showNames,zeroWallStyle:l(i),displayTouched:!0,hideDecor:h.hideDecor,hideOpenings:h.hideOpenings,roomColor:h.color,roomOpacity:h.opacity,fillMode:"none"===h.fill?"custom":h.fill,customFill:n,glowEnabled:h.glow,bgColor:h.bgColor,bgMode:"static"===i.settings?.bg_mode||"daynight"===i.settings?.bg_mode?i.settings.bg_mode:null,northDeg:a({},i.settings),sunRays:"boolean"==typeof i.settings?.sun_rays?i.settings.sun_rays:null,tempMin:h.tempMin,tempMax:h.tempMax,showLqi:h.showLqi??this.host._config?.show_signal??!0,cardFontScale:h.cardFontScale,labelTemp:h.labelTemp,labelHum:h.labelHum,labelLqi:h.labelLqi,labelLight:h.labelLight,cellCm:Number(i.cell_cm)>0?Number(i.cell_cm):5,cellCmInput:o(Number(i.cell_cm)>0?Number(i.cell_cm):5,this.host._imperial),cellCmTouched:!1,busy:!1})}const d=i(this.host._imperial);this.host._spaceDialog={mode:p,title:"",planUrl:null,planFile:null,...b(),hideDecor:!1,hideOpenings:!1,zeroWallStyle:"dashed",roomColor:r,roomOpacity:n,fillMode:"custom",customFill:{...e,a:0},glowEnabled:!0,bgColor:null,bgMode:"daynight",northDeg:null,sunRays:null,tempMin:c,tempMax:h,showLqi:this.host._config?.show_signal??!0,cardFontScale:1,labelTemp:!1,labelHum:!1,labelLqi:!1,labelLight:!1,cellCm:d,cellCmInput:o(d,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 $(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 v(e,o.ext,e.name);this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:a})}_renderBackdropGuard(){return f(this.host,t=>{this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:t})},()=>{this.host._backdropGuard=null},this.host.hass)??p}_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 _`<div class="savedplans muted">${this.host._t("space.loading")}</div>`;const s=t.saved||[];if(!s.length)return _`<div class="savedplans muted">${this.host._t("space.no_saved")}</div>`;return _`<div class="savedplans">
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="7d9dd4574e49f91701004b99bff143525cff2f5b0a41568acab1e979cf27c06d";import{bT as t,bU as s,bV as e,bW as o,aq as a,bX as l,c0 as i,bY as h,bZ as c,b_ as n,b$ as r,A as p,b as _,cT as d,ap as u,ar as g,cU as m}from"./houseplan-card-DtBnECuO.js";import{i as b,c as $,e as v,r as f,a as y,b as w,s as D,t as S}from"./backdrop-pick-aV3NiaC9.js";const k=1e3,C=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},M="7d9dd4574e49f91701004b99bff143525cff2f5b0a41568acab1e979cf27c06d";class F{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)}))}}}}_openSpaceDialog(p,_){if(!this.host._serverStorage||!this.host._serverCfg)return void this.host._showToast(this.host._t("toast.integration_missing"));if("edit"===p){const i=this.host._serverCfg.spaces.find(t=>t.id===_);if(!i)return;const h=t(i),c=i.settings?.custom_fill&&"object"==typeof i.settings.custom_fill?s(i.settings.custom_fill):null,n="none"===h.fill?{...c||e,a:0}:c;return void(this.host._spaceDialog={mode:p,spaceId:_,title:i.title,planUrl:i.plan_url||null,planFile:null,source:i.plan_url?"file":"draw",showBorders:h.showBorders,showNames:h.showNames,zeroWallStyle:l(i),displayTouched:!0,hideDecor:h.hideDecor,hideOpenings:h.hideOpenings,roomColor:h.color,roomOpacity:h.opacity,fillMode:"none"===h.fill?"custom":h.fill,customFill:n,glowEnabled:h.glow,bgColor:h.bgColor,bgMode:"static"===i.settings?.bg_mode||"daynight"===i.settings?.bg_mode?i.settings.bg_mode:null,northDeg:a({},i.settings),sunRays:"boolean"==typeof i.settings?.sun_rays?i.settings.sun_rays:null,tempMin:h.tempMin,tempMax:h.tempMax,showLqi:h.showLqi??this.host._config?.show_signal??!0,cardFontScale:h.cardFontScale,labelTemp:h.labelTemp,labelHum:h.labelHum,labelLqi:h.labelLqi,labelLight:h.labelLight,cellCm:Number(i.cell_cm)>0?Number(i.cell_cm):5,cellCmInput:o(Number(i.cell_cm)>0?Number(i.cell_cm):5,this.host._imperial),cellCmTouched:!1,busy:!1})}const d=i(this.host._imperial);this.host._spaceDialog={mode:p,title:"",planUrl:null,planFile:null,...b(),hideDecor:!1,hideOpenings:!1,zeroWallStyle:"dashed",roomColor:r,roomOpacity:n,fillMode:"custom",customFill:{...e,a:0},glowEnabled:!0,bgColor:null,bgMode:"daynight",northDeg:null,sunRays:null,tempMin:c,tempMax:h,showLqi:this.host._config?.show_signal??!0,cardFontScale:1,labelTemp:!1,labelHum:!1,labelLqi:!1,labelLight:!1,cellCm:d,cellCmInput:o(d,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 $(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 v(e,o.ext,e.name);this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:a})}_renderBackdropGuard(){return f(this.host,t=>{this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:t})},()=>{this.host._backdropGuard=null},this.host.hass)??p}_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 _`<div class="savedplans muted">${this.host._t("space.loading")}</div>`;const s=t.saved||[];if(!s.length)return _`<div class="savedplans muted">${this.host._t("space.no_saved")}</div>`;return _`<div class="savedplans">
${s.map(s=>{return _`
<div class="savedplan ${s.url===t.planUrl?"cur":""}">
<img src=${this.host._display(s.url)} alt="" loading="lazy" decoding="async" />
+1 -1
View File
@@ -1 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="b874f9b281d491372eda5a03e1fc682113653e6f511bc5a8e308166c788f39a7";try{await import("./houseplan-assets/houseplan-card-Cl1URig5.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__="7d9dd4574e49f91701004b99bff143525cff2f5b0a41568acab1e979cf27c06d";try{await import("./houseplan-assets/houseplan-card-DtBnECuO.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)}
+11 -11
View File
@@ -3,7 +3,7 @@
"fixture": "synthetic-only",
"chromium": "151.0.7922.34",
"oxipng": null,
"sourceFingerprint": "63518dbdc9f88e6021a8383d444d5e59e12b94b4461de435a22675a4d89071f4",
"sourceFingerprint": "106a35b661946a310c1635610617eaf47f0da2c34901e241132f0ff2b8ab1554",
"captureScriptSha256": "fe76c8e2e27501e9a377d7aa15dd6cba6a018d55c07deb602dbee097f0a0a5ba",
"command": "npm run build && node demo/docs/capture.mjs",
"scenarios": {
@@ -15,7 +15,7 @@
},
"theme": "dark",
"language": "en",
"sourceSha256": "63518dbdc9f88e6021a8383d444d5e59e12b94b4461de435a22675a4d89071f4",
"sourceSha256": "106a35b661946a310c1635610617eaf47f0da2c34901e241132f0ff2b8ab1554",
"imageSha256": "0ca982495a7749907c48ebbddfd089c54385a4347f79f64e94af2c5a8d5c03eb"
},
"view-touch": {
@@ -26,7 +26,7 @@
},
"theme": "dark",
"language": "en",
"sourceSha256": "63518dbdc9f88e6021a8383d444d5e59e12b94b4461de435a22675a4d89071f4",
"sourceSha256": "106a35b661946a310c1635610617eaf47f0da2c34901e241132f0ff2b8ab1554",
"imageSha256": "3be239a5a494f6776540a9c0049694ee6f9d2ba927c8bcb4b26ee5a69a228a7d"
},
"space-create": {
@@ -37,7 +37,7 @@
},
"theme": "dark",
"language": "en",
"sourceSha256": "63518dbdc9f88e6021a8383d444d5e59e12b94b4461de435a22675a4d89071f4",
"sourceSha256": "106a35b661946a310c1635610617eaf47f0da2c34901e241132f0ff2b8ab1554",
"imageSha256": "a55b463055a565892ca139014e314a8f63fb5301c87fff2e48d7e69210fe9b6c"
},
"room-contour-close": {
@@ -48,7 +48,7 @@
},
"theme": "dark",
"language": "en",
"sourceSha256": "63518dbdc9f88e6021a8383d444d5e59e12b94b4461de435a22675a4d89071f4",
"sourceSha256": "106a35b661946a310c1635610617eaf47f0da2c34901e241132f0ff2b8ab1554",
"imageSha256": "dfad9a27371cfa397a3fd8dce7005f42d24649743f5322105ee894067d3a9f16"
},
"plan-context-tray": {
@@ -59,7 +59,7 @@
},
"theme": "dark",
"language": "en",
"sourceSha256": "63518dbdc9f88e6021a8383d444d5e59e12b94b4461de435a22675a4d89071f4",
"sourceSha256": "106a35b661946a310c1635610617eaf47f0da2c34901e241132f0ff2b8ab1554",
"imageSha256": "b75f348c632296da5c2fc142d53df613f757e1516acac315be50f5b4557729cc"
},
"device-editor": {
@@ -70,7 +70,7 @@
},
"theme": "dark",
"language": "en",
"sourceSha256": "63518dbdc9f88e6021a8383d444d5e59e12b94b4461de435a22675a4d89071f4",
"sourceSha256": "106a35b661946a310c1635610617eaf47f0da2c34901e241132f0ff2b8ab1554",
"imageSha256": "8affadfce926fe2f6cf344c33f611c44fcbc79c1969f69c3a6935ff2e99c36c3"
},
"device-display-preview": {
@@ -81,7 +81,7 @@
},
"theme": "dark",
"language": "en",
"sourceSha256": "63518dbdc9f88e6021a8383d444d5e59e12b94b4461de435a22675a4d89071f4",
"sourceSha256": "106a35b661946a310c1635610617eaf47f0da2c34901e241132f0ff2b8ab1554",
"imageSha256": "6f628abe6b89d7c4b352e6d73ac0b126526f6fdba5927bb774c5b884e484ca19"
},
"background-editor": {
@@ -92,7 +92,7 @@
},
"theme": "dark",
"language": "en",
"sourceSha256": "63518dbdc9f88e6021a8383d444d5e59e12b94b4461de435a22675a4d89071f4",
"sourceSha256": "106a35b661946a310c1635610617eaf47f0da2c34901e241132f0ff2b8ab1554",
"imageSha256": "ed041f571b0c34f1e06b13419ea08d90ebb7c26950f631d46f6cebb9a29f5c20"
},
"room-card": {
@@ -103,7 +103,7 @@
},
"theme": "dark",
"language": "en",
"sourceSha256": "63518dbdc9f88e6021a8383d444d5e59e12b94b4461de435a22675a4d89071f4",
"sourceSha256": "106a35b661946a310c1635610617eaf47f0da2c34901e241132f0ff2b8ab1554",
"imageSha256": "48a5685039a5e0de2a28190d857b193c86e2e63606e3c7a8c40fc9d2b190da4e"
},
"device-info": {
@@ -114,7 +114,7 @@
},
"theme": "dark",
"language": "en",
"sourceSha256": "63518dbdc9f88e6021a8383d444d5e59e12b94b4461de435a22675a4d89071f4",
"sourceSha256": "106a35b661946a310c1635610617eaf47f0da2c34901e241132f0ff2b8ab1554",
"imageSha256": "29a342811aaedaebc54ba337792d60cb454a7cf4c3063b210f6c4bafe0a4d87b"
}
}
+4 -7
View File
@@ -12251,13 +12251,10 @@ public _renderMarkerDialog(): TemplateResult {
<label class="srcrow">
<input type="radio" name="bmode" .checked=${d.bindingMode === 'virtual'}
@change=${() => {
// #385(а): re-selecting the current binding must not reset
// the configured value source or badge — spec #378 §1.6
// demands the reset only on an actual CHANGE of binding.
if (d.binding === 'virtual') {
this.host._markerDialog = { ...d, bindingMode: 'virtual', bindingOpen: false };
return;
}
// #385(а) r2-M1: no same-binding guard here on purpose — a
// radio input fires no change event when it is already
// checked, so this branch runs only on an actual switch to
// virtual; the reset below is therefore always legitimate.
const next = {
...d, bindingMode: 'virtual' as const, binding: 'virtual', bindingOpen: false,
controls: persistedExternalControls('virtual', d.controls),