UNPKG

iobroker.lovelace

Version:

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

2 lines 3.09 kB
export const __webpack_ids__=["48679"];export const __webpack_modules__={98192:function(t,e,o){o.r(e);var s=o(44249),i=(o(31622),o(57243)),a=o(15093),n=o(36522),r=o(73729),c=(o(37583),o(79011)),l=o(28008),d=o(76131),h=o(83523);var u=function(t){return t[t.NotStarted=0]="NotStarted",t[t.InProgress=1]="InProgress",t[t.Done=2]="Done",t}(u||{});const _={[u.NotStarted]:"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",[u.InProgress]:"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",[u.Done]:"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"};(0,s.Z)([(0,a.Mo)("dialog-zwave_js-hard-reset-controller")],(function(t,e){return{F:class extends e{constructor(...e){super(...e),t(this)}},d:[{kind:"field",decorators:[(0,a.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,a.SB)()],key:"_entryId",value:void 0},{kind:"field",decorators:[(0,a.SB)()],key:"_resetStatus",value:()=>u.NotStarted},{kind:"method",key:"showDialog",value:function(t){this._entryId=t.entryId}},{kind:"method",key:"closeDialog",value:function(){this._entryId=void 0,this._resetStatus=u.NotStarted,(0,n.B)(this,"dialog-closed",{dialog:this.localName})}},{kind:"method",key:"render",value:function(){return this._entryId?i.dy`<ha-dialog open @closed="${this.closeDialog}" .heading="${(0,r.i)(this.hass,this.hass.localize(`ui.panel.config.zwave_js.hard_reset_controller.${u[this._resetStatus]}.title`))}"> <div class="flex-container"> <div> <ha-svg-icon .path="${_[this._resetStatus]}" class="icon"></ha-svg-icon> </div> <p> ${this.hass.localize(`ui.panel.config.zwave_js.hard_reset_controller.${u[this._resetStatus]}.body`)} </p> </div> ${this._resetStatus===u.NotStarted?i.dy`<mwc-button slot="primaryAction" @click="${this._hardResetController}"> ${this.hass.localize("ui.common.continue")} </mwc-button> <mwc-button slot="secondaryAction" @click="${this.closeDialog}"> ${this.hass.localize("ui.common.cancel")} </mwc-button>`:i.Ld} </ha-dialog>`:i.Ld}},{kind:"method",key:"_hardResetController",value:async function(){if(await(0,d.showConfirmationDialog)(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=u.InProgress;const t=await(0,c.mE)(this.hass,this._entryId);setTimeout((()=>(0,h.c)(`/config/devices/device/${t}`)),0),this._resetStatus=u.Done}}},{kind:"get",static:!0,key:"styles",value:function(){return[l.yu,i.iv`.icon{color:var(--label-badge-red)}.flex-container{display:flex;align-items:center;margin-bottom:5px}ha-svg-icon{width:68px;height:48px}`]}}]}}),i.oi)}}; //# sourceMappingURL=48679.ebd864b63b524a34.js.map