iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
1 lines • 1.45 kB
JavaScript
;(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[67816],{28955:function(t,e,s){s.a(t,async function(t,a){try{s.r(e),s.d(e,{HuiNumericInputCardFeatureEditor:function(){return d}});s(62953);var i=s(40445),n=s(5124),o=s(67576),r=s(22786),c=s(1087),u=s(52763),l=t([u]);u=(l.then?(await l)():l)[0];let h,p=t=>t;class d extends n.WF{setConfig(t){this._config=t}render(){if(!this.hass||!this._config)return n.s6;const t=Object.assign({style:"buttons"},this._config),e=this._schema(this.hass.localize);return(0,n.qy)(h||(h=p` <ha-form .hass="${0}" .data="${0}" .schema="${0}" .computeLabel="${0}" @value-changed="${0}"></ha-form> `),this.hass,t,e,this._computeLabelCallback,this._valueChanged)}_valueChanged(t){(0,c.r)(this,"config-changed",{config:t.detail.value})}constructor(...t){super(...t),this._schema=(0,r.A)(t=>[{name:"style",selector:{select:{multiple:!1,mode:"list",options:["slider","buttons"].map(e=>({value:e,label:t(`ui.panel.lovelace.editor.features.types.numeric-input.style_list.${e}`)}))}}}]),this._computeLabelCallback=t=>this.hass.localize(`ui.panel.lovelace.editor.features.types.numeric-input.${t.name}`)}}(0,i.Cg)([(0,o.MZ)({attribute:!1})],d.prototype,"hass",void 0),(0,i.Cg)([(0,o.MZ)({attribute:!1})],d.prototype,"context",void 0),(0,i.Cg)([(0,o.wk)()],d.prototype,"_config",void 0),d=(0,i.Cg)([(0,o.EM)("hui-numeric-input-card-feature-editor")],d),a()}catch(h){a(h)}})}}]);