UNPKG

iobroker.lovelace

Version:

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

1 lines 1.67 kB
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[38260],{50655:function(r,e,t){t.a(r,async function(r,o){try{t.r(e),t.d(e,{HuiErrorBadge:function(){return _},createErrorBadgeConfig:function(){return v},createErrorBadgeElement:function(){return p}});var i=t(40445),n=t(53289),a=t(5124),s=t(67576),c=(t(24671),t(67094),t(33963)),g=r([c]);c=(g.then?(await g)():g)[0];let h,l,f,d=r=>r;const u="M13,13H11V7H13M13,17H11V15H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z",p=r=>{const e=document.createElement("hui-error-badge");return e.setConfig(r),e},v=r=>({type:"error",error:r});class _ extends a.WF{setConfig(r){this._config=r}_viewDetail(){var r;let e;if(this._config.origConfig)try{e=(0,n.dump)(this._config.origConfig)}catch(t){e=`[Error dumping ${this._config.origConfig}]`}(0,c.showAlertDialog)(this,{title:null===(r=this._config)||void 0===r?void 0:r.error,warning:!0,text:e?(0,a.qy)(h||(h=d`<pre>${0}</pre>`),e):""})}render(){return this._config?(0,a.qy)(l||(l=d` <ha-badge class="error" @click="${0}" type="button" label="Error"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> <div class="content">${0}</div> </ha-badge> `),this._viewDetail,u,this._config.error):a.s6}}_.styles=(0,a.AH)(f||(f=d`ha-badge{--badge-color:var(--error-color);--ha-card-border-color:var(--error-color)}.content{max-width:100px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}pre{font-family:var(--ha-font-family-code);white-space:break-spaces;user-select:text}`)),(0,i.Cg)([(0,s.wk)()],_.prototype,"_config",void 0),_=(0,i.Cg)([(0,s.EM)("hui-error-badge")],_),o()}catch(h){o(h)}})}}]);