UNPKG

iobroker.lovelace

Version:

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

1 lines 1.23 kB
export const __rspack_esm_id=34667;export const __rspack_esm_ids=[34667];export const __webpack_modules__={39046(e,a,t){t.a(e,async function(e,s){try{t.r(a),t.d(a,{HuiBarGaugeCardFeatureEditor:()=>d});var o=t(62826),r=t(5124),i=t(22441),c=t(22786),n=t(1087),h=t(52763),u=e([h]);h=(u.then?(await u)():u)[0];class d extends r.WF{setConfig(e){this._config=e}render(){if(!this.hass||!this._config)return r.s6;const e=this._schema();return r.qy` <ha-form .hass="${this.hass}" .data="${this._config}" .schema="${e}" .computeLabel="${this._computeLabelCallback}" @value-changed="${this._valueChanged}"></ha-form> `}_valueChanged(e){(0,n.r)(this,"config-changed",{config:e.detail.value})}constructor(...e){super(...e),this._schema=(0,c.A)(()=>[{name:"min",default:0,selector:{number:{mode:"box"}}},{name:"max",default:100,selector:{number:{mode:"box"}}}]),this._computeLabelCallback=e=>this.hass.localize(`ui.panel.lovelace.editor.features.types.bar-gauge.${e.name}`)}}(0,o.Cg)([(0,i.MZ)({attribute:!1})],d.prototype,"hass",void 0),(0,o.Cg)([(0,i.MZ)({attribute:!1})],d.prototype,"context",void 0),(0,o.Cg)([(0,i.wk)()],d.prototype,"_config",void 0),d=(0,o.Cg)([(0,i.EM)("hui-bar-gauge-card-feature-editor")],d),s()}catch(e){s(e)}})}};