UNPKG

iobroker.lovelace

Version:

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

1 lines 2.79 kB
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[54750],{63130:function(t,o,e){e.d(o,{l:function(){return i}});e(3362);var a=e(50248);const i=async(t,o)=>{var e;if(navigator.clipboard)try{return void(await navigator.clipboard.writeText(t))}catch(r){}const i=o||(null===(e=(0,a.n)())||void 0===e?void 0:e.getRootNode())||document.body,s=document.createElement("textarea");s.value=t,s.setAttribute("readonly",""),s.style.position="fixed",s.style.top="0",s.style.left="0",s.style.opacity="0",i.appendChild(s),s.select(),document.execCommand("copy"),i.removeChild(s)}},29517:function(t,o,e){e.a(t,async function(t,a){try{e.r(o);e(18111),e(61701),e(33110),e(3362),e(62953);var i=e(40445),s=e(5124),r=e(67576),n=e(1087),l=e(63130),c=e(18350),p=(e(93444),e(72554)),d=e(81619),h=t([c,p]);[c,p]=h.then?(await h)():h;let y,f,b,m=t=>t;class _ extends s.WF{async showDialog(t){this._params=t,this._open=!0}closeDialog(){this._open=!1}_dialogClosed(){this._params=void 0,(0,n.r)(this,"dialog-closed",{dialog:this.localName})}async _copyToClipboard(){this._params&&(await(0,l.l)(JSON.stringify(this._params.entry)),(0,d.P)(this,{message:this.hass.localize("ui.common.copied_clipboard")}))}render(){return this._params?(0,s.qy)(y||(y=m` <ha-dialog .open="${0}" header-title="${0}" @closed="${0}"> <p> <b>${0}</b>: ${0} <br> <b>${0}</b>: ${0} <br> <b>${0}</b>: ${0} <br> </p> <h4>${0}</h4> <table width="100%"> <tbody> ${0} </tbody> </table> <h4>${0}</h4> <table width="100%"> <tbody> ${0} </tbody> </table> <ha-dialog-footer slot="footer"> <ha-button slot="primaryAction" appearance="plain" @click="${0}"> ${0} </ha-button> </ha-dialog-footer> </ha-dialog> `),this._open,this.hass.localize("ui.panel.config.zeroconf.discovery_information"),this._dialogClosed,this.hass.localize("ui.panel.config.zeroconf.name"),this._params.entry.name.slice(0,-this._params.entry.type.length-1),this.hass.localize("ui.panel.config.zeroconf.type"),this._params.entry.type,this.hass.localize("ui.panel.config.zeroconf.port"),this._params.entry.port,this.hass.localize("ui.panel.config.zeroconf.ip_addresses"),this._params.entry.ip_addresses.map(t=>(0,s.qy)(f||(f=m` <tr> <td>${0}</td> </tr> `),t)),this.hass.localize("ui.panel.config.zeroconf.properties"),Object.entries(this._params.entry.properties).map(([t,o])=>(0,s.qy)(b||(b=m` <tr> <td><b>${0}</b></td> <td>${0}</td> </tr> `),t,o)),this._copyToClipboard,this.hass.localize("ui.panel.config.zeroconf.copy_to_clipboard")):s.s6}constructor(...t){super(...t),this._open=!1}}(0,i.Cg)([(0,r.MZ)({attribute:!1})],_.prototype,"hass",void 0),(0,i.Cg)([(0,r.wk)()],_.prototype,"_params",void 0),(0,i.Cg)([(0,r.wk)()],_.prototype,"_open",void 0),_=(0,i.Cg)([(0,r.EM)("dialog-zeroconf-device-info")],_),a()}catch(y){a(y)}})}}]);