UNPKG

iobroker.lovelace

Version:

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

1 lines 12.1 kB
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[314],{72001:function(e,n,t){t.d(n,{$D:function(){return oe},$O:function(){return re},Bm:function(){return w},Cr:function(){return G},Cy:function(){return s},DE:function(){return u},DJ:function(){return b},El:function(){return Y},Eo:function(){return F},GP:function(){return c},Hz:function(){return o},Is:function(){return y},JZ:function(){return C},Lx:function(){return O},MY:function(){return f},PY:function(){return B},RE:function(){return q},S0:function(){return K},SG:function(){return h},TH:function(){return W},Tx:function(){return P},U:function(){return X},VA:function(){return N},VL:function(){return _},Ve:function(){return se},W6:function(){return T},YG:function(){return d},YP:function(){return j},Yn:function(){return S},Z1:function(){return ne},Zp:function(){return E},aG:function(){return I},aL:function(){return a},au:function(){return l},dZ:function(){return v},fC:function(){return x},i4:function(){return R},iK:function(){return z},in:function(){return ie},jF:function(){return V},jT:function(){return H},lz:function(){return g},m:function(){return k},mQ:function(){return M},mR:function(){return J},mX:function(){return Q},of:function(){return ee},pN:function(){return te},qN:function(){return A},re:function(){return Z},sb:function(){return D},tj:function(){return L},u1:function(){return r},wI:function(){return m},zI:function(){return p},zP:function(){return U},zb:function(){return $}});t(16280),t(3362);var i=t(37619),r=function(e){return e[e.Idle=0]="Idle",e[e.Including=1]="Including",e[e.Excluding=2]="Excluding",e[e.Busy=3]="Busy",e[e.SmartStart=4]="SmartStart",e}({}),s=function(e){return e[e.Default=0]="Default",e[e.SmartStart=1]="SmartStart",e[e.Insecure=2]="Insecure",e[e.Security_S0=3]="Security_S0",e[e.Security_S2=4]="Security_S2",e}({}),o=function(e){return e[e.Temporary=-2]="Temporary",e[e.None=-1]="None",e[e.S2_Unauthenticated=0]="S2_Unauthenticated",e[e.S2_Authenticated=1]="S2_Authenticated",e[e.S2_AccessControl=2]="S2_AccessControl",e[e.S0_Legacy=7]="S0_Legacy",e}({}),a=function(e){return e[e.SmartStart=0]="SmartStart",e}({}),c=function(e){return e[e.ZWave=0]="ZWave",e[e.ZWaveLongRange=1]="ZWaveLongRange",e}({}),_=function(e){return e[e.Error_Timeout=-1]="Error_Timeout",e[e.Error_Checksum=0]="Error_Checksum",e[e.Error_TransmissionFailed=1]="Error_TransmissionFailed",e[e.Error_InvalidManufacturerID=2]="Error_InvalidManufacturerID",e[e.Error_InvalidFirmwareID=3]="Error_InvalidFirmwareID",e[e.Error_InvalidFirmwareTarget=4]="Error_InvalidFirmwareTarget",e[e.Error_InvalidHeaderInformation=5]="Error_InvalidHeaderInformation",e[e.Error_InvalidHeaderFormat=6]="Error_InvalidHeaderFormat",e[e.Error_InsufficientMemory=7]="Error_InsufficientMemory",e[e.Error_InvalidHardwareVersion=8]="Error_InvalidHardwareVersion",e[e.OK_WaitingForActivation=253]="OK_WaitingForActivation",e[e.OK_NoRestart=254]="OK_NoRestart",e[e.OK_RestartPending=255]="OK_RestartPending",e}({}),u=function(e){return e[e.Error_Timeout=0]="Error_Timeout",e[e.Error_RetryLimitReached=1]="Error_RetryLimitReached",e[e.Error_Aborted=2]="Error_Aborted",e[e.Error_NotSupported=3]="Error_NotSupported",e[e.OK=255]="OK",e}({}),d=function(e){return e[e.Active=0]="Active",e[e.Inactive=1]="Inactive",e}({});var l=function(e){return e[e.NotAvailable=127]="NotAvailable",e[e.ReceiverSaturated=126]="ReceiverSaturated",e[e.NoSignalDetected=125]="NoSignalDetected",e}({}),v=function(e){return e[e.ZWave_9k6=1]="ZWave_9k6",e[e.ZWave_40k=2]="ZWave_40k",e[e.ZWave_100k=3]="ZWave_100k",e[e.LongRange_100k=4]="LongRange_100k",e}({}),p=function(e){return e[e.Unknown=0]="Unknown",e[e.Asleep=1]="Asleep",e[e.Awake=2]="Awake",e[e.Dead=3]="Dead",e[e.Alive=4]="Alive",e}({});const f=(e,n,t,i,r,s,o)=>e.callWS({type:"zwave_js/invoke_cc_api",device_id:n,command_class:t,endpoint:i,method_name:r,parameters:s,wait_for_result:o}),y=(e,n)=>{if(n.device_id&&n.entry_id)throw new Error("Only one of device or entry ID should be supplied.");if(!n.device_id&&!n.entry_id)throw new Error("Either device or entry ID should be supplied.");return(0,i.X)(e,{type:"zwave_js/network_status",device_id:n.device_id,entry_id:n.entry_id})},h=(e,n)=>e.callWS({type:"zwave_js/data_collection_status",entry_id:n}),g=(e,n,t)=>e.callWS({type:"zwave_js/update_data_collection_preference",entry_id:n,opted_in:t}),w=(e,n)=>e.callWS({type:"zwave_js/get_provisioning_entries",entry_id:n}),b=(e,n,t,i,r,s,o,a=0)=>e.connection.subscribeMessage(e=>t(e),{type:"zwave_js/add_node",entry_id:n,inclusion_strategy:a,qr_code_string:r,qr_provisioning_information:i,planned_provisioning_entry:s,dsk:o}),m=(e,n)=>e.callWS({type:"zwave_js/stop_inclusion",entry_id:n}),z=(e,n,t,i)=>e.callWS({type:"zwave_js/grant_security_classes",entry_id:n,securityClasses:t,clientSideAuth:i}),S=(e,n,t)=>e.callWS({type:"zwave_js/try_parse_dsk_from_qr_code_string",entry_id:n,qr_code_string:t}),j=(e,n,t)=>e.callWS({type:"zwave_js/validate_dsk_and_enter_pin",entry_id:n,pin:t}),E=(e,n,t)=>e.callWS({type:"zwave_js/supports_feature",entry_id:n,feature:t}),W=(e,n,t)=>e.callWS({type:"zwave_js/parse_qr_code_string",entry_id:n,qr_code_string:t}),k=(e,n,t,i,r,s)=>e.callWS({type:"zwave_js/lookup_device",entry_id:n,manufacturerId:t,productType:i,productId:r,applicationVersion:s}),I=(e,n,t,i,r,s)=>e.callWS({type:"zwave_js/provision_smart_start_node",entry_id:n,qr_provisioning_information:t,protocol:i,device_name:r,area_id:s}),C=(e,n,t,i)=>e.callWS({type:"zwave_js/unprovision_smart_start_node",entry_id:n,dsk:t,node_id:i}),A=(e,n,t)=>e.connection.subscribeMessage(e=>t(e),{type:"zwave_js/subscribe_new_devices",entry_id:n}),M=(e,n)=>e.callWS({type:"zwave_js/node_status",device_id:n}),R=(e,n)=>e.callWS({type:"zwave_js/node_capabilities",device_id:n}),D=(e,n,t)=>e.connection.subscribeMessage(e=>t(e),{type:"zwave_js/subscribe_node_status",device_id:n}),Z=(e,n)=>e.callWS({type:"zwave_js/node_metadata",device_id:n}),$=(e,n)=>e.callWS({type:"zwave_js/node_alerts",device_id:n}),T=(e,n)=>e.callWS({type:"zwave_js/get_config_parameters",device_id:n}),x=(e,n,t,i,r,s)=>{const o={type:"zwave_js/set_config_parameter",device_id:n,property:t,endpoint:i,value:r,property_key:s};return e.callWS(o)},N=(e,n,t,i,r,s)=>{const o={type:"zwave_js/set_raw_config_parameter",device_id:n,property:t,value:i,value_size:r,value_format:s};return e.callWS(o)},q=(e,n,t)=>e.callWS({type:"zwave_js/get_raw_config_parameter",device_id:n,property:t}).then(e=>e.value),F=(e,n,t)=>e.connection.subscribeMessage(e=>t(e),{type:"zwave_js/refresh_node_info",device_id:n}),H=(e,n)=>e.callWS({type:"zwave_js/rebuild_node_routes",device_id:n}),L=(e,n,t)=>e.connection.subscribeMessage(e=>t(e),{type:"zwave_js/remove_failed_node",device_id:n}),O=(e,n)=>(0,i.X)(e,{type:"zwave_js/begin_rebuilding_routes",entry_id:n}),P=(e,n)=>(0,i.X)(e,{type:"zwave_js/stop_rebuilding_routes",entry_id:n}),K=(e,n,t)=>e.subscribeMessage(e=>t(e),{type:"zwave_js/subscribe_rebuild_routes_progress",entry_id:n}),U=(e,n,t)=>e.connection.subscribeMessage(e=>t(e),{type:"zwave_js/subscribe_controller_statistics",entry_id:n}),V=(e,n,t)=>e.connection.subscribeMessage(e=>t(e),{type:"zwave_js/subscribe_node_statistics",device_id:n}),Y=(e,n,t)=>e.connection.subscribeMessage(e=>t(e),{type:"zwave_js/subscribe_s2_inclusion",entry_id:n}),G=(e,n)=>e.callWS({type:"zwave_js/is_node_firmware_update_in_progress",device_id:n}),X=(e,n)=>e.callWS({type:"zwave_js/is_any_ota_firmware_update_in_progress",entry_id:n}),B=(e,n)=>e.callWS({type:"zwave_js/hard_reset_controller",entry_id:n}),J=async(e,n,t,i,r)=>{const s=new FormData;s.append("file",t),void 0!==i&&s.append("target",i.toString());const o=await e.fetchWithAuth(`/api/zwave_js/firmware/upload/${n}`,{method:"POST",body:s,signal:r});if(200!==o.status)throw new Error(o.statusText)},Q=(e,n,t)=>e.connection.subscribeMessage(e=>t(e),{type:"zwave_js/subscribe_firmware_update_status",device_id:n}),ee=(e,n)=>e.callWS({type:"zwave_js/abort_firmware_update",device_id:n}),ne=(e,n,t)=>e.connection.subscribeMessage(t,{type:"zwave_js/backup_nvm",entry_id:n}),te=(e,n,t,i)=>e.connection.subscribeMessage(i,{type:"zwave_js/restore_nvm",entry_id:n,data:t}),ie=(e,n,t)=>e.connection.subscribeMessage(t,{type:"zwave_js/subscribe_log_updates",entry_id:n}),re=(e,n)=>e.callWS({type:"zwave_js/get_log_config",entry_id:n}),se=(e,n,t)=>e.callWS({type:"zwave_js/update_log_config",entry_id:n,config:{level:t}}),oe=(e,n)=>e.callWS({type:"zwave_js/cancel_secure_bootstrap_s2",entry_id:n})},54706:function(e,n,t){t.d(n,{E:function(){return s}});t(74423),t(18111),t(13579),t(3362),t(62953);var i=t(40445),r=t(67576);const s=e=>{class n extends e{connectedCallback(){super.connectedCallback(),this._checkSubscribed()}disconnectedCallback(){if(super.disconnectedCallback(),this.__unsubs){for(;this.__unsubs.length;){const e=this.__unsubs.pop();e instanceof Promise?e.then(e=>e()):e()}this.__unsubs=void 0}}updated(e){if(super.updated(e),e.has("hass"))this._checkSubscribed();else if(this.hassSubscribeRequiredHostProps)for(const n of e.keys())if(this.hassSubscribeRequiredHostProps.includes(n))return void this._checkSubscribed()}hassSubscribe(){return[]}_checkSubscribed(){var e;void 0!==this.__unsubs||!this.isConnected||void 0===this.hass||null!==(e=this.hassSubscribeRequiredHostProps)&&void 0!==e&&e.some(e=>void 0===this[e])||(this.__unsubs=this.hassSubscribe())}}return(0,i.Cg)([(0,r.MZ)({attribute:!1})],n.prototype,"hass",void 0),n}},13153:function(e,n,t){t.r(n),t.d(n,{HaDeviceInfoZWaveJS:function(){return f}});t(74423),t(18111),t(20116),t(3362),t(62953);var i=t(40445),r=t(5124),s=t(67576),o=(t(11382),t(77423)),a=t(72001),c=t(54706),_=t(14503);let u,d,l,v,p=e=>e;class f extends((0,c.E)(r.WF)){willUpdate(e){super.willUpdate(e),e.has("device")&&this._fetchNodeDetails()}async _fetchNodeDetails(){if(!this.device)return;const e=await(0,o.VN)(this.hass,{domain:"zwave_js"});this._multipleConfigEntries=e.length>1;const n=e.find(e=>this.device.config_entries.includes(e.entry_id));n&&(this._configEntry=n,this._node=await(0,a.mQ)(this.hass,this.device.id))}render(){return this._node?(0,r.qy)(u||(u=p` <ha-expansion-panel .header="${0}"> <div> ${0} <div> ${0}: ${0} </div> ${0} </div> </ha-expansion-panel> `),this.hass.localize("ui.panel.config.zwave_js.device_info.zwave_info"),this._multipleConfigEntries?(0,r.qy)(d||(d=p` <div> ${0}: ${0} </div> `),this.hass.localize("ui.panel.config.zwave_js.common.source"),this._configEntry.title):r.s6,this.hass.localize("ui.panel.config.zwave_js.device_info.node_id"),this._node.node_id,this._node.is_controller_node?r.s6:(0,r.qy)(l||(l=p` <div> ${0}: ${0} </div> <div> ${0}: ${0} </div> <div> ${0}: ${0} </div> `),this.hass.localize("ui.panel.config.zwave_js.device_info.node_ready"),this._node.ready?this.hass.localize("ui.common.yes"):this.hass.localize("ui.common.no"),this.hass.localize("ui.panel.config.zwave_js.device_info.highest_security"),null!==this._node.highest_security_class?this.hass.localize(`ui.panel.config.zwave_js.security_classes.${a.Hz[this._node.highest_security_class]}.title`):!1===this._node.is_secure?this.hass.localize("ui.panel.config.zwave_js.security_classes.none.title"):this.hass.localize("ui.panel.config.zwave_js.device_info.unknown"),this.hass.localize("ui.panel.config.zwave_js.device_info.zwave_plus"),this._node.zwave_plus_version?this.hass.localize("ui.panel.config.zwave_js.device_info.zwave_plus_version",{version:this._node.zwave_plus_version}):this.hass.localize("ui.common.no"))):r.s6}static get styles(){return[_.RF,(0,r.AH)(v||(v=p`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}`))]}constructor(...e){super(...e),this._multipleConfigEntries=!1}}(0,i.Cg)([(0,s.MZ)({attribute:!1})],f.prototype,"hass",void 0),(0,i.Cg)([(0,s.MZ)({attribute:!1})],f.prototype,"device",void 0),(0,i.Cg)([(0,s.wk)()],f.prototype,"_configEntry",void 0),(0,i.Cg)([(0,s.wk)()],f.prototype,"_multipleConfigEntries",void 0),(0,i.Cg)([(0,s.wk)()],f.prototype,"_node",void 0),f=(0,i.Cg)([(0,s.EM)("ha-device-info-zwave_js")],f)}}]);