UNPKG

iobroker.lovelace

Version:

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

1 lines 1.98 kB
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[13816],{25494:function(t,e,s){s.d(e,{B4:function(){return n},KF:function(){return a},fi:function(){return c}});var o=s(86518);s(62953);const i=["customize"],a=({field:t,customize:e,options:s})=>[{name:"customize",selector:{boolean:{}}},...e?[{name:t,selector:{select:{mode:"list",reorder:!0,multiple:!0,options:s}}}]:[]],n=(t,e)=>Object.assign(Object.assign({},t),{},{customize:void 0!==t[e]}),c=(t,e,s)=>{const{customize:a}=t,n=(0,o.A)(t,i);return a&&!n[e]?n[e]=[...s]:a||delete n[e],n}},42699:function(t,e,s){s.a(t,async function(t,o){try{s.r(e),s.d(e,{HuiCounterActionsCardFeatureEditor:function(){return p}});s(18111),s(61701),s(62953);var i=s(40445),a=s(5124),n=s(67576),c=s(22786),r=s(1087),u=s(52763),l=s(37531),h=s(25494),f=t([u]);u=(f.then?(await f)():f)[0];let d,m=t=>t;class p extends a.WF{setConfig(t){this._config=t}render(){if(!this.hass||!this._config)return a.s6;const t=(0,h.B4)(this._config,"actions"),e=this._schema(t.customize);return(0,a.qy)(d||(d=m` <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){const e=(0,h.fi)(t.detail.value,"actions",l.HA);(0,r.r)(this,"config-changed",{config:e})}constructor(...t){super(...t),this._schema=(0,c.A)(t=>(0,h.KF)({field:"actions",customize:t,options:l.HA.map(t=>({value:t,label:this.hass.localize(`ui.panel.lovelace.editor.features.types.counter-actions.actions_list.${t}`)}))})),this._computeLabelCallback=t=>this.hass.localize(`ui.panel.lovelace.editor.features.types.counter-actions.${t.name}`)}}(0,i.Cg)([(0,n.MZ)({attribute:!1})],p.prototype,"hass",void 0),(0,i.Cg)([(0,n.MZ)({attribute:!1})],p.prototype,"context",void 0),(0,i.Cg)([(0,n.wk)()],p.prototype,"_config",void 0),p=(0,i.Cg)([(0,n.EM)("hui-counter-actions-card-feature-editor")],p),o()}catch(d){o(d)}})}}]);