iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
1 lines • 1.3 kB
JavaScript
;(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[34667],{39046:function(e,t,a){a.a(e,async function(e,s){try{a.r(t),a.d(t,{HuiBarGaugeCardFeatureEditor:function(){return f}});a(62953);var o=a(40445),n=a(5124),r=a(67576),i=a(22786),c=a(1087),h=a(52763),u=e([h]);h=(u.then?(await u)():u)[0];let l,d=e=>e;class f extends n.WF{setConfig(e){this._config=e}render(){if(!this.hass||!this._config)return n.s6;const e=this._schema();return(0,n.qy)(l||(l=d` <ha-form .hass="${0}" .data="${0}" .schema="${0}" .computeLabel="${0}" @value-changed="${0}"></ha-form> `),this.hass,this._config,e,this._computeLabelCallback,this._valueChanged)}_valueChanged(e){(0,c.r)(this,"config-changed",{config:e.detail.value})}constructor(...e){super(...e),this._schema=(0,i.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,r.MZ)({attribute:!1})],f.prototype,"hass",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],f.prototype,"context",void 0),(0,o.Cg)([(0,r.wk)()],f.prototype,"_config",void 0),f=(0,o.Cg)([(0,r.EM)("hui-bar-gauge-card-feature-editor")],f),s()}catch(l){s(l)}})}}]);