iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
1 lines • 1.36 kB
JavaScript
export const __rspack_esm_id=67816;export const __rspack_esm_ids=[67816];export const __webpack_modules__={28955(e,t,s){s.a(e,async function(e,a){try{s.r(t),s.d(t,{HuiNumericInputCardFeatureEditor:()=>h});var i=s(62826),o=s(5124),c=s(22441),r=s(22786),n=s(1087),l=s(52763),u=e([l]);l=(u.then?(await u)():u)[0];class h extends o.WF{setConfig(e){this._config=e}render(){if(!this.hass||!this._config)return o.s6;const e={style:"buttons",...this._config},t=this._schema(this.hass.localize);return o.qy` <ha-form .hass="${this.hass}" .data="${e}" .schema="${t}" .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,r.A)(e=>[{name:"style",selector:{select:{multiple:!1,mode:"list",options:["slider","buttons"].map(t=>({value:t,label:e(`ui.panel.lovelace.editor.features.types.numeric-input.style_list.${t}`)}))}}}]),this._computeLabelCallback=e=>this.hass.localize(`ui.panel.lovelace.editor.features.types.numeric-input.${e.name}`)}}(0,i.Cg)([(0,c.MZ)({attribute:!1})],h.prototype,"hass",void 0),(0,i.Cg)([(0,c.MZ)({attribute:!1})],h.prototype,"context",void 0),(0,i.Cg)([(0,c.wk)()],h.prototype,"_config",void 0),h=(0,i.Cg)([(0,c.EM)("hui-numeric-input-card-feature-editor")],h),a()}catch(e){a(e)}})}};