iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
2 lines • 1.95 kB
JavaScript
webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["81108"],{74460:function(e,a,t){t.r(a),t.d(a,{HuiVacuumCommandsCardFeatureEditor:()=>h});var i=t(61701),s=(t(71695),t(9359),t(56475),t(70104),t(47021),t(57243)),n=t(50778),o=t(27486),d=t(36522),l=(t(29073),t(12139)),c=t(36581);let u,r=e=>e,h=(0,i.Z)([(0,n.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,n.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,n.Cb)({attribute:!1})],key:"context",value:void 0},{kind:"field",decorators:[(0,n.SB)()],key:"_config",value:void 0},{kind:"method",key:"setConfig",value:function(e){this._config=e}},{kind:"field",key:"_schema",value(){return(0,o.Z)(((e,a)=>[{name:"commands",selector:{select:{multiple:!0,mode:"list",options:c.Ig.filter((e=>a&&(0,l.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(){var e,a;if(!this.hass||!this._config)return s.Ld;const t=null!==(e=this.context)&&void 0!==e&&e.entity_id?this.hass.states[null===(a=this.context)||void 0===a?void 0:a.entity_id]:void 0,i=this._schema(this.hass.localize,t);return(0,s.dy)(u||(u=r` <ha-form .hass="${0}" .data="${0}" .schema="${0}" .computeLabel="${0}" @value-changed="${0}"></ha-form> `),this.hass,this._config,i,this._computeLabelCallback,this._valueChanged)}},{kind:"method",key:"_valueChanged",value:function(e){(0,d.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.4b529d8dc3bcd3a3.js.map
;(self.