UNPKG

iobroker.lovelace

Version:

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

1 lines 3.13 kB
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[1213],{48748:function(t,e,s){s.a(t,async function(t,o){try{s.r(e);s(3362),s(62953);var i=s(40445),a=s(5124),n=s(67576),r=s(1087),l=(s(67094),s(18350)),c=(s(93444),s(72554)),h=s(72001),d=s(14503),u=s(65063),_=s(91926),p=t([l,c]);[l,c]=p.then?(await p)():p;let L,v,f,y=t=>t;const m="M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z",C="M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19M8.46,11.88L9.87,10.47L12,12.59L14.12,10.47L15.53,11.88L13.41,14L15.53,16.12L14.12,17.53L12,15.41L9.88,17.53L8.47,16.12L10.59,14L8.46,11.88M15.5,4L14.5,3H9.5L8.5,4H5V6H19V4H15.5Z",$="M13,3A9,9 0 0,0 4,12H1L4.89,15.89L4.96,16.03L9,12H6A7,7 0 0,1 13,5A7,7 0 0,1 20,12A7,7 0 0,1 13,19C11.07,19 9.32,18.21 8.06,16.94L6.64,18.36C8.27,20 10.5,21 13,21A9,9 0 0,0 22,12A9,9 0 0,0 13,3Z";var g=function(t){return t[t.NotStarted=0]="NotStarted",t[t.InProgress=1]="InProgress",t[t.Done=2]="Done",t}(g||{});const w={0:C,1:$,2:m};class A extends a.WF{showDialog(t){this._entryId=t.entryId,this._open=!0}closeDialog(){this._open=!1}_dialogClosed(){this._entryId=void 0,this._resetStatus=0,(0,r.r)(this,"dialog-closed",{dialog:this.localName})}render(){return this._entryId?(0,a.qy)(L||(L=y`<ha-dialog .open="${0}" header-title="${0}" @closed="${0}"> <div class="flex-container"> <div> <ha-svg-icon .path="${0}" class="icon"></ha-svg-icon> </div> <p> ${0} </p> </div> ${0} </ha-dialog>`),this._open,this.hass.localize(`ui.panel.config.zwave_js.hard_reset_controller.${g[this._resetStatus]}.title`),this._dialogClosed,w[this._resetStatus],this.hass.localize(`ui.panel.config.zwave_js.hard_reset_controller.${g[this._resetStatus]}.body`),0===this._resetStatus?(0,a.qy)(v||(v=y`<ha-dialog-footer slot="footer"> <ha-button slot="secondaryAction" appearance="plain" @click="${0}"> ${0} </ha-button> <ha-button slot="primaryAction" @click="${0}"> ${0} </ha-button> </ha-dialog-footer>`),this.closeDialog,this.hass.localize("ui.common.cancel"),this._hardResetController,this.hass.localize("ui.common.continue")):a.s6):a.s6}async _hardResetController(){if(await(0,u.dk)(this,{text:this.hass.localize("ui.panel.config.zwave_js.hard_reset_controller.confirmation"),dismissText:this.hass.localize("ui.common.cancel"),confirmText:this.hass.localize("ui.common.continue"),destructive:!0})){this._resetStatus=1;const t=await(0,h.PY)(this.hass,this._entryId);setTimeout(()=>(0,_.oo)(`/config/devices/device/${t}`),0),this._resetStatus=2}}static get styles(){return[d.nA,(0,a.AH)(f||(f=y`.icon{color:var(--label-badge-red)}.flex-container{display:flex;align-items:center;margin-bottom:5px}ha-svg-icon{width:68px;height:48px}`))]}constructor(...t){super(...t),this._resetStatus=0,this._open=!1}}(0,i.Cg)([(0,n.MZ)({attribute:!1})],A.prototype,"hass",void 0),(0,i.Cg)([(0,n.wk)()],A.prototype,"_entryId",void 0),(0,i.Cg)([(0,n.wk)()],A.prototype,"_resetStatus",void 0),(0,i.Cg)([(0,n.wk)()],A.prototype,"_open",void 0),A=(0,i.Cg)([(0,n.EM)("dialog-zwave_js-hard-reset-controller")],A),o()}catch(L){o(L)}})}}]);