UNPKG

iobroker.lovelace

Version:

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

1 lines 2.72 kB
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[42577],{92840:function(e,t,i){i.a(e,async function(e,a){try{i.r(t),i.d(t,{HuiEnergyDateSelectionCardEditor:function(){return v}});i(62953);var n=i(40445),o=i(5124),c=i(67576),r=i(22786),l=i(63533),s=i(1087),u=i(52763),d=i(84698),h=e([u]);u=(h.then?(await h)():h)[0];let p,_=e=>e;const g=(0,l.kp)(d.H,(0,l.Ik)({disable_compare:(0,l.lq)((0,l.zM)()),collection_key:(0,l.lq)((0,l.Yj)()),vertical_opening_direction:(0,l.lq)((0,l.KC)([(0,l.eu)("auto"),(0,l.eu)("up"),(0,l.eu)("down")])),opening_direction:(0,l.lq)((0,l.KC)([(0,l.eu)("auto"),(0,l.eu)("right"),(0,l.eu)("left"),(0,l.eu)("center")]))})),m=["auto","up","down"],f=["auto","right","left","center"];class v extends o.WF{setConfig(e){(0,l.vA)(e,g),this._config=e}render(){if(!this.hass||!this._config)return o.s6;const e=Object.assign({},this._config),t=this._schema(this.hass.localize);return(0,o.qy)(p||(p=_` <ha-form .hass="${0}" .data="${0}" .schema="${0}" .computeLabel="${0}" .computeHelper="${0}" @value-changed="${0}"></ha-form>`),this.hass,e,t,this._computeLabelCallback,this._computeHelperCallback,this._valueChanged)}_valueChanged(e){(0,s.r)(this,"config-changed",{config:e.detail.value})}constructor(...e){super(...e),this._schema=(0,r.A)(e=>[{name:"",type:"grid",schema:[{name:"vertical_opening_direction",required:!1,selector:{select:{options:m.map(t=>({value:t,label:e(`ui.panel.lovelace.editor.card.energy-date-selection.vertical_opening_directions.${t}`)}))}}},{name:"opening_direction",required:!1,selector:{select:{options:f.map(t=>({value:t,label:e(`ui.panel.lovelace.editor.card.energy-date-selection.opening_directions.${t}`)}))}}},{name:"disable_compare",required:!1,selector:{boolean:{}}},{type:"string",name:"collection_key",required:!1}]}]),this._computeHelperCallback=e=>{if("collection_key"===e.name)return this.hass.localize("ui.panel.lovelace.editor.card.generic.collection_key_description")},this._computeLabelCallback=e=>{switch(e.name){case"vertical_opening_direction":case"opening_direction":case"disable_compare":return this.hass.localize(`ui.panel.lovelace.editor.card.energy-date-selection.${e.name}`);default:return this.hass.localize(`ui.panel.lovelace.editor.card.generic.${e.name}`)}}}}(0,n.Cg)([(0,c.MZ)({attribute:!1})],v.prototype,"hass",void 0),(0,n.Cg)([(0,c.wk)()],v.prototype,"_config",void 0),v=(0,n.Cg)([(0,c.EM)("hui-energy-date-selection-card-editor")],v),a()}catch(p){a(p)}})},84698:function(e,t,i){i.d(t,{H:function(){return n}});var a=i(63533);const n=(0,a.Ik)({type:(0,a.Yj)(),view_layout:(0,a.bz)(),layout_options:(0,a.bz)(),grid_options:(0,a.bz)(),visibility:(0,a.bz)(),disabled:(0,a.lq)((0,a.zM)())})}}]);