UNPKG

iobroker.lovelace

Version:

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

1 lines 1.54 kB
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[14328],{38539:function(e,t,a){a.a(e,async function(e,s){try{a.r(t),a.d(t,{HuiTrendGraphCardFeatureEditor:function(){return _}});a(62953);var o=a(40445),r=a(5124),i=a(67576),n=a(1087),h=a(52763),c=a(45429),u=e([h,c]);[h,c]=u.then?(await u)():u;let l,d=e=>e;const f=[{name:"hours_to_show",default:24,selector:{number:{min:1,mode:"box"}}},{name:"detail",selector:{boolean:{}}}];class _ extends r.WF{setConfig(e){this._config=e}render(){if(!this.hass||!this._config)return r.s6;const e=Object.assign({},this._config);return this._config.hours_to_show||(e.hours_to_show=24),void 0===this._config.detail&&(e.detail=!0),(0,r.qy)(l||(l=d` <ha-form .hass="${0}" .data="${0}" .schema="${0}" .computeLabel="${0}" @value-changed="${0}"></ha-form> `),this.hass,e,f,this._computeLabelCallback,this._valueChanged)}_valueChanged(e){(0,n.r)(this,"config-changed",{config:e.detail.value})}constructor(...e){super(...e),this._computeLabelCallback=e=>{switch(e.name){case"hours_to_show":return this.hass.localize(`ui.panel.lovelace.editor.card.generic.${e.name}`);case"detail":return this.hass.localize("ui.panel.lovelace.editor.features.types.trend-graph.detail");default:return""}}}}(0,o.Cg)([(0,i.MZ)({attribute:!1})],_.prototype,"hass",void 0),(0,o.Cg)([(0,i.MZ)({attribute:!1})],_.prototype,"context",void 0),(0,o.Cg)([(0,i.wk)()],_.prototype,"_config",void 0),_=(0,o.Cg)([(0,i.EM)("hui-trend-graph-card-feature-editor")],_),s()}catch(l){s(l)}})}}]);