UNPKG

iobroker.lovelace

Version:

With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI

2 lines 1.8 kB
export const __webpack_ids__=["70183"];export const __webpack_modules__={41496:function(e,a,t){t.r(a),t.d(a,{HuiLawnMowerCommandsCardFeatureEditor:()=>r});var i=t(44249),o=(t(9359),t(56475),t(70104),t(57243)),s=t(15093),n=t(27486),l=t(36522),d=(t(29073),t(84988)),c=t(36581);let r=(0,i.Z)([(0,s.Mo)("hui-lawn-mower-commands-card-feature-editor")],(function(e,a){return{F:class extends a{constructor(...a){super(...a),e(this)}},d:[{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"context",value:void 0},{kind:"field",decorators:[(0,s.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:c.wQ.filter((e=>a&&(0,d.B)(a,e))).map((a=>({value:a,label:`${e(`ui.panel.lovelace.editor.features.types.lawn-mower-commands.commands_list.${a}`)}`})))}}}]))},{kind:"method",key:"render",value:function(){if(!this.hass||!this._config)return o.Ld;const e=this.context?.entity_id?this.hass.states[this.context?.entity_id]:void 0,a=this._schema(this.hass.localize,e);return o.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,l.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.lawn-mower-commands.${e.name}`):this.hass.localize(`ui.panel.lovelace.editor.card.generic.${e.name}`)}}]}}),o.oi)}}; //# sourceMappingURL=70183.8835d05a486f7c66.js.map