iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
2 lines • 4.83 kB
JavaScript
export const __webpack_ids__=["72259"];export const __webpack_modules__={74794:function(e,i,a){a.d(i,{$l:()=>n,An:()=>N,DN:()=>k,Dj:()=>w,Gz:()=>$,H4:()=>L,Js:()=>D,LO:()=>o,Rp:()=>S,S_:()=>u,VZ:()=>s,WB:()=>I,ah:()=>x,bt:()=>z,dy:()=>b,ez:()=>v,f3:()=>t,fm:()=>W,gg:()=>g,go:()=>r,iJ:()=>p,lR:()=>_,lu:()=>Z,m6:()=>E,mO:()=>h,mS:()=>T,o5:()=>d,pT:()=>m,t3:()=>R,tz:()=>f,vn:()=>l,yN:()=>C,yi:()=>y,z3:()=>c});const n=(e,i,a)=>e.connection.subscribeMessage((e=>a(e)),{type:"zha/devices/reconfigure",ieee:i}),t=e=>e.callWS({type:"zha/topology/update"}),s=(e,i,a,n,t)=>e.callWS({type:"zha/devices/clusters/attributes",ieee:i,endpoint_id:a,cluster_id:n,cluster_type:t}),o=e=>e.callWS({type:"zha/devices"}),d=(e,i)=>e.callWS({type:"zha/device",ieee:i}),c=(e,i)=>e.callWS({type:"zha/devices/bindable",ieee:i}),l=(e,i,a)=>e.callWS({type:"zha/devices/bind",source_ieee:i,target_ieee:a}),r=(e,i,a)=>e.callWS({type:"zha/devices/unbind",source_ieee:i,target_ieee:a}),h=(e,i,a,n)=>e.callWS({type:"zha/groups/bind",source_ieee:i,group_id:a,bindings:n}),p=(e,i,a,n)=>e.callWS({type:"zha/groups/unbind",source_ieee:i,group_id:a,bindings:n}),u=(e,i)=>e.callWS({...i,type:"zha/devices/clusters/attributes/value"}),_=(e,i,a,n,t)=>e.callWS({type:"zha/devices/clusters/commands",ieee:i,endpoint_id:a,cluster_id:n,cluster_type:t}),v=(e,i)=>e.callWS({type:"zha/devices/clusters",ieee:i}),z=e=>e.callWS({type:"zha/groups"}),g=(e,i)=>e.callWS({type:"zha/group/remove",group_ids:i}),y=(e,i)=>e.callWS({type:"zha/group",group_id:i}),m=e=>e.callWS({type:"zha/devices/groupable"}),b=(e,i,a)=>e.callWS({type:"zha/group/members/add",group_id:i,members:a}),f=(e,i,a)=>e.callWS({type:"zha/group/members/remove",group_id:i,members:a}),S=(e,i,a,n)=>e.callWS({type:"zha/group/add",group_name:i,group_id:a,members:n}),k=e=>e.callWS({type:"zha/configuration"}),W=(e,i)=>e.callWS({type:"zha/configuration/update",data:i}),D=e=>e.callWS({type:"zha/network/settings"}),$=e=>e.callWS({type:"zha/network/backups/create"}),w=(e,i)=>e.callWS({type:"zha/network/change_channel",new_channel:i}),x="INITIALIZED",I="INTERVIEW_COMPLETE",E="CONFIGURED",C=["PAIRED",E,I],N=["device_joined","raw_device_initialized","device_fully_initialized"],R="log_output",T="zha_channel_bind",Z="zha_channel_configure_reporting",L="zha_channel_cfg_done"},39724:function(e,i,a){a.r(i),a.d(i,{HaDeviceInfoZha:()=>r});var n=a(44249),t=a(72621),s=(a(9359),a(1331),a(57243)),o=a(15093),d=(a(41307),a(74794)),c=a(28008),l=a(71220);let r=(0,n.Z)([(0,o.Mo)("ha-device-info-zha")],(function(e,i){class a extends i{constructor(...i){super(...i),e(this)}}return{F:a,d:[{kind:"field",decorators:[(0,o.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,o.Cb)({attribute:!1})],key:"device",value:void 0},{kind:"field",decorators:[(0,o.SB)()],key:"_zhaDevice",value:void 0},{kind:"method",key:"updated",value:function(e){if((0,t.Z)(a,"updated",this,3)([e]),e.has("device")){const e=this.device.connections.find((e=>"zigbee"===e[0]));if(!e)return;(0,d.o5)(this.hass,e[1]).then((e=>{this._zhaDevice=e}))}}},{kind:"method",key:"render",value:function(){return this._zhaDevice?s.dy` <ha-expansion-panel header="Zigbee info"> <div>IEEE: ${this._zhaDevice.ieee}</div> <div>Nwk: ${(0,l.xC)(this._zhaDevice.nwk)}</div> <div>Device Type: ${this._zhaDevice.device_type}</div> <div> LQI: ${this._zhaDevice.lqi||this.hass.localize("ui.dialogs.zha_device_info.unknown")} </div> <div> RSSI: ${this._zhaDevice.rssi||this.hass.localize("ui.dialogs.zha_device_info.unknown")} </div> <div> ${this.hass.localize("ui.dialogs.zha_device_info.last_seen")}: ${this._zhaDevice.last_seen||this.hass.localize("ui.dialogs.zha_device_info.unknown")} </div> <div> ${this.hass.localize("ui.dialogs.zha_device_info.power_source")}: ${this._zhaDevice.power_source||this.hass.localize("ui.dialogs.zha_device_info.unknown")} </div> ${this._zhaDevice.quirk_applied?s.dy` <div> ${this.hass.localize("ui.dialogs.zha_device_info.quirk")}: ${this._zhaDevice.quirk_class} </div> `:""} </ha-expansion-panel> `:s.Ld}},{kind:"get",static:!0,key:"styles",value:function(){return[c.Qx,s.iv`h4{margin-bottom:4px}div{word-break:break-all;margin-top:2px}ha-expansion-panel{--expansion-panel-summary-padding:0;--expansion-panel-content-padding:0;padding-top:4px}`]}}]}}),s.oi)},71220:function(e,i,a){a.d(i,{Dm:()=>d,jg:()=>s,p4:()=>t,pN:()=>o,xC:()=>n});const n=e=>{let i=e;return"string"==typeof e&&(i=parseInt(e,16)),"0x"+i.toString(16).padStart(4,"0")},t=e=>e.split(":").slice(-4).reverse().join(""),s=(e,i)=>{const a=e.user_given_name?e.user_given_name:e.name,n=i.user_given_name?i.user_given_name:i.name;return a.localeCompare(n)},o=(e,i)=>{const a=e.name,n=i.name;return a.localeCompare(n)},d=e=>`${e.name} (Endpoint id: ${e.endpoint_id}, Id: ${n(e.id)}, Type: ${e.type})`}};
//# sourceMappingURL=72259.978024ade4fd52ef.js.map