iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
4 lines • 3.54 kB
JavaScript
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[83450],{65829:function(e,t,s){s.a(e,async function(e,a){try{s.r(t),s.d(t,{HaSpinner:function(){return c}});var i=s(40445),o=s(55262),n=s(5124),r=s(67576),l=e([o]);o=(l.then?(await l)():l)[0];let p,h=e=>e;class c extends o.A{updated(e){if(super.updated(e),e.has("size"))switch(this.size){case"tiny":this.style.setProperty("--ha-spinner-size","16px");break;case"small":this.style.setProperty("--ha-spinner-size","28px");break;case"medium":this.style.setProperty("--ha-spinner-size","48px");break;case"large":this.style.setProperty("--ha-spinner-size","68px");break;case void 0:this.style.removeProperty("--ha-progress-ring-size")}}static get styles(){return[o.A.styles,(0,n.AH)(p||(p=h`:host{--indicator-color:var(
--ha-spinner-indicator-color,
var(--primary-color)
);--track-color:var(--ha-spinner-divider-color, var(--divider-color));--track-width:4px;--speed:3.5s;font-size:var(--ha-spinner-size, 48px)}`))]}}(0,i.Cg)([(0,r.MZ)()],c.prototype,"size",void 0),c=(0,i.Cg)([(0,r.EM)("ha-spinner")],c),a()}catch(p){a(p)}})},22529:function(e,t,s){s.a(e,async function(e,a){try{s.r(t);s(62953);var i=s(40445),o=s(5124),n=s(67576),r=s(1087),l=s(72554),p=s(65829),h=s(38962),c=s(18350),d=(s(93444),s(14503)),u=e([l,p,h,c]);[l,p,h,c]=u.then?(await u)():u;let _,m,y,g,v=e=>e;class f extends o.WF{showDialog(e){this._opened=!0,this._params=e,this._saveComplete=!1,this._params.savedPromise.then(()=>{this._saveComplete=!0})}closeDialog(){this._opened=!1}_dialogClosed(){var e,t;return null===(e=(t=this._params).onClose)||void 0===e||e.call(t),this._opened&&(0,r.r)(this,"dialog-closed"),this._opened=!1,!0}render(){const e=this.hass.localize("ui.panel.config.automation.editor.new_automation_setup_failed_title",{type:this.hass.localize(`ui.panel.config.automation.editor.type_${this._params.type}`)});return(0,o.qy)(_||(_=v` <ha-dialog .open="${0}" header-title="${0}" ="${0}"> <div class="content"> ${0} <p></p> ${0} ${0} </div> <ha-dialog-footer slot="footer"> <ha-button slot="primaryAction" ="${0}" variant="${0}"> ${0} </ha-button> </ha-dialog-footer> </ha-dialog> `),this._opened,e,this._dialogClosed,this.hass.localize("ui.panel.config.automation.editor.new_automation_setup_failed_text",{type:this.hass.localize(`ui.panel.config.automation.editor.type_${this._params.type}`),types:this.hass.localize(`ui.panel.config.automation.editor.type_${this._params.type}_plural`)}),this.hass.localize("ui.panel.config.automation.editor.new_automation_setup_keep_waiting",{type:this.hass.localize(`ui.panel.config.automation.editor.type_${this._params.type}`)}),this._saveComplete?(0,o.qy)(m||(m=v`<p></p> <ha-alert alert-type="success">${0}</ha-alert>`),this.hass.localize("ui.panel.config.automation.editor.new_automation_setup_timedout_success")):(0,o.qy)(y||(y=v`<div class="loading"> <ha-spinner size="medium"> </ha-spinner> </div>`)),this._dialogClosed,this._saveComplete?"brand":"danger",this.hass.localize("ui.common."+(this._saveComplete?"ok":"cancel")))}static get styles(){return[d.RF,d.nA,(0,o.AH)(g||(g=v`.loading{display:flex;justify-content:center}`))]}constructor(...e){super(...e),this._opened=!1,this._saveComplete=!1}}(0,i.Cg)([(0,n.MZ)({attribute:!1})],f.prototype,"hass",void 0),(0,i.Cg)([(0,n.wk)()],f.prototype,"_opened",void 0),(0,i.Cg)([(0,n.wk)()],f.prototype,"_saveComplete",void 0),f=(0,i.Cg)([(0,n.EM)("ha-dialog-automation-save-timeout")],f),a()}catch(_){a(_)}})}}]);