iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
2 lines • 1.79 kB
JavaScript
export const __webpack_ids__=["81108"];export const __webpack_modules__={74460:function(e,a,t){t.r(a),t.d(a,{HuiVacuumCommandsCardFeatureEditor:()=>u});var i=t(44249),s=(t(9359),t(56475),t(70104),t(57243)),o=t(15093),n=t(27486),c=t(36522),d=(t(29073),t(12139)),l=t(36581);let u=(0,i.Z)([(0,o.Mo)("hui-vacuum-commands-card-feature-editor")],(function(e,a){return{F:class extends a{constructor(...a){super(...a),e(this)}},d:[{kind:"field",decorators:[(0,o.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,o.Cb)({attribute:!1})],key:"context",value:void 0},{kind:"field",decorators:[(0,o.SB)()],key:"_config",value:void 0},{kind:"method",key:"setConfig",value:function(e){this._config=e}},{kind:"field",key:"_schema",value:()=>(0,n.Z)(((e,a)=>[{name:"commands",selector:{select:{multiple:!0,mode:"list",options:l.Ig.filter((e=>a&&(0,d.kF)(a,e))).map((a=>({value:a,label:`${e(`ui.panel.lovelace.editor.features.types.vacuum-commands.commands_list.${a}`)}`})))}}}]))},{kind:"method",key:"render",value:function(){if(!this.hass||!this._config)return s.Ld;const e=this.context?.entity_id?this.hass.states[this.context?.entity_id]:void 0,a=this._schema(this.hass.localize,e);return s.dy` <ha-form .hass="${this.hass}" .data="${this._config}" .schema="${a}" .computeLabel="${this._computeLabelCallback}" @value-changed="${this._valueChanged}"></ha-form> `}},{kind:"method",key:"_valueChanged",value:function(e){(0,c.B)(this,"config-changed",{config:e.detail.value})}},{kind:"field",key:"_computeLabelCallback",value(){return e=>"commands"===e.name?this.hass.localize(`ui.panel.lovelace.editor.features.types.vacuum-commands.${e.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${e.name}`)}}]}}),s.oi)}};
//# sourceMappingURL=81108.96ec0b6ad65b0a1f.js.map