iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
2 lines • 1.83 kB
JavaScript
export const __webpack_ids__=["24145"];export const __webpack_modules__={27665:function(e,t,a){a.r(t),a.d(t,{HuiPlantStatusCardEditor:()=>h});var i=a(44249),n=a(57243),o=a(15093),l=a(62900),s=a(36522),c=(a(29073),a(18200));const d=(0,l.f0)(c.I,(0,l.Ry)({entity:(0,l.jt)((0,l.Z_)()),name:(0,l.jt)((0,l.Z_)()),theme:(0,l.jt)((0,l.Z_)())})),r=[{name:"entity",required:!0,selector:{entity:{domain:"plant"}}},{name:"name",selector:{text:{}}},{name:"theme",selector:{theme:{}}}];let h=(0,i.Z)([(0,o.Mo)("hui-plant-status-card-editor")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,o.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,o.SB)()],key:"_config",value:void 0},{kind:"method",key:"setConfig",value:function(e){(0,l.hu)(e,d),this._config=e}},{kind:"method",key:"render",value:function(){return this.hass&&this._config?n.dy` <ha-form .hass="${this.hass}" .data="${this._config}" .schema="${r}" .computeLabel="${this._computeLabelCallback}" @value-changed="${this._valueChanged}"></ha-form> `:n.Ld}},{kind:"method",key:"_valueChanged",value:function(e){(0,s.B)(this,"config-changed",{config:e.detail.value})}},{kind:"field",key:"_computeLabelCallback",value(){return e=>"entity"===e.name?this.hass.localize("ui.panel.lovelace.editor.card.generic.entity"):"theme"===e.name?`${this.hass.localize("ui.panel.lovelace.editor.card.generic.theme")} (${this.hass.localize("ui.panel.lovelace.editor.card.config.optional")})`:this.hass.localize(`ui.panel.lovelace.editor.card.generic.${e.name}`)}}]}}),n.oi)},18200:function(e,t,a){a.d(t,{I:()=>n});var i=a(62900);const n=(0,i.Ry)({type:(0,i.Z_)(),view_layout:(0,i.Yj)(),layout_options:(0,i.Yj)(),grid_options:(0,i.Yj)(),visibility:(0,i.Yj)()})}};
//# sourceMappingURL=24145.cedf5b5f6a9b263c.js.map