iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
2 lines • 18.8 kB
JavaScript
(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[9311],{7323:(e,t,o)=>{"use strict";o.d(t,{p:()=>n});const n=(e,t)=>e&&e.config.components.includes(t)},83270:(e,t,o)=>{"use strict";o.d(t,{LI:()=>n,AV:()=>i,Mc:()=>r,dn:()=>a,H9:()=>s,De:()=>c,Wz:()=>l,LV:()=>d,QD:()=>p,A$:()=>h,tW:()=>u,n8:()=>f});const n=e=>e.callWS({type:"cloud/status"}),i=(e,t)=>e.callWS({type:"cloud/cloudhook/create",webhook_id:t}),r=(e,t)=>e.callWS({type:"cloud/cloudhook/delete",webhook_id:t}),a=e=>e.callWS({type:"cloud/remote/connect"}),s=e=>e.callWS({type:"cloud/remote/disconnect"}),c=e=>e.callWS({type:"cloud/subscription"}),l=(e,t)=>e.callWS({type:"cloud/thingtalk/convert",query:t}),d=(e,t)=>e.callWS({type:"cloud/update_prefs",...t}),p=(e,t,o)=>e.callWS({type:"cloud/google_assistant/entities/update",entity_id:t,...o}),h=e=>e.callApi("POST","cloud/google_actions/sync"),u=(e,t,o)=>e.callWS({type:"cloud/alexa/entities/update",entity_id:t,...o}),f=e=>e.callWS({type:"cloud/tts/info"})},29311:(e,t,o)=>{"use strict";o.r(t),o.d(t,{configSections:()=>b});var n=o(68546),i=(o(53973),o(89194),o(55358)),r=o(7323),a=o(59708),s=o(83270),c=(o(15291),o(18199));function l(){l=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach((function(o){t.forEach((function(t){t.kind===o&&"own"===t.placement&&this.defineClassElement(e,t)}),this)}),this)},initializeClassElements:function(e,t){var o=e.prototype;["method","field"].forEach((function(n){t.forEach((function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var r="static"===i?e:o;this.defineClassElement(r,t)}}),this)}),this)},defineClassElement:function(e,t){var o=t.descriptor;if("field"===t.kind){var n=t.initializer;o={enumerable:o.enumerable,writable:o.writable,configurable:o.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,o)},decorateClass:function(e,t){var o=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,i)}),this),e.forEach((function(e){if(!h(e))return o.push(e);var t=this.decorateElement(e,i);o.push(t.element),o.push.apply(o,t.extras),n.push.apply(n,t.finishers)}),this),!t)return{elements:o,finishers:n};var r=this.decorateConstructor(o,t);return n.push.apply(n,r.finishers),r.finishers=n,r},addElementPlacement:function(e,t,o){var n=t[e.placement];if(!o&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var o=[],n=[],i=e.decorators,r=i.length-1;r>=0;r--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[r])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var d=0;d<l.length;d++)this.addElementPlacement(l[d],t);o.push.apply(o,l)}}return{element:e,finishers:n,extras:o}},decorateConstructor:function(e,t){for(var o=[],n=t.length-1;n>=0;n--){var i=this.fromClassDescriptor(e),r=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==r.finisher&&o.push(r.finisher),void 0!==r.elements){e=r.elements;for(var a=0;a<e.length-1;a++)for(var s=a+1;s<e.length;s++)if(e[a].key===e[s].key&&e[a].placement===e[s].placement)throw new TypeError("Duplicated element ("+e[a].key+")")}}return{elements:e,finishers:o}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){var t;if(void 0!==e)return(t=e,function(e){if(Array.isArray(e))return e}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return g(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?g(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t}),this)},toElementDescriptor:function(e){var t=String(e.kind);if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var o=m(e.key),n=String(e.placement);if("static"!==n&&"prototype"!==n&&"own"!==n)throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "'+n+'"');var i=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var r={kind:t,key:o,placement:n,descriptor:Object.assign({},i)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(i,"get","The property descriptor of a field descriptor"),this.disallowProperty(i,"set","The property descriptor of a field descriptor"),this.disallowProperty(i,"value","The property descriptor of a field descriptor"),r.initializer=e.initializer),r},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:f(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=String(e.kind);if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var o=f(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:o}},runClassFinishers:function(e,t){for(var o=0;o<t.length;o++){var n=(0,t[o])(e);if(void 0!==n){if("function"!=typeof n)throw new TypeError("Finishers must return a constructor.");e=n}}return e},disallowProperty:function(e,t,o){if(void 0!==e[t])throw new TypeError(o+" can't have a ."+t+" property.")}};return e}function d(e){var t,o=m(e.key);"method"===e.kind?t={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?t={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?t={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(t={configurable:!0,writable:!0,enumerable:!0});var n={kind:"field"===e.kind?"field":"method",key:o,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:t};return e.decorators&&(n.decorators=e.decorators),"field"===e.kind&&(n.initializer=e.value),n}function p(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function h(e){return e.decorators&&e.decorators.length}function u(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function f(e,t){var o=e[t];if(void 0!==o&&"function"!=typeof o)throw new TypeError("Expected '"+t+"' to be a function");return o}function m(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}function y(e,t,o){return(y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,o){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=v(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(o):i.value}})(e,t,o||e)}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}const b={integrations:[{component:"integrations",path:"/config/integrations",translationKey:"ui.panel.config.integrations.caption",iconPath:n.$Z0,core:!0},{component:"devices",path:"/config/devices",translationKey:"ui.panel.config.devices.caption",iconPath:n.p0g,core:!0},{component:"entities",path:"/config/entities",translationKey:"ui.panel.config.entities.caption",iconPath:n.RIj,core:!0},{component:"areas",path:"/config/areas",translationKey:"ui.panel.config.areas.caption",iconPath:n.yvc,core:!0}],automation:[{component:"blueprint",path:"/config/blueprint",translationKey:"ui.panel.config.blueprint.caption",iconPath:n.bln},{component:"automation",path:"/config/automation",translationKey:"ui.panel.config.automation.caption",iconPath:n.$Th},{component:"scene",path:"/config/scene",translationKey:"ui.panel.config.scene.caption",iconPath:n.sc6},{component:"script",path:"/config/script",translationKey:"ui.panel.config.script.caption",iconPath:n.EQk}],helpers:[{component:"helpers",path:"/config/helpers",translationKey:"ui.panel.config.helpers.caption",iconPath:n.cl8,core:!0}],experimental:[{component:"tag",path:"/config/tags",translationKey:"ui.panel.config.tag.caption",iconPath:n.AIu}],lovelace:[{component:"lovelace",path:"/config/lovelace/dashboards",translationKey:"ui.panel.config.lovelace.caption",iconPath:n.Ccq}],persons:[{component:"person",path:"/config/person",translationKey:"ui.panel.config.person.caption",iconPath:n.rI3},{component:"zone",path:"/config/zone",translationKey:"ui.panel.config.zone.caption",iconPath:n.OBx},{component:"users",path:"/config/users",translationKey:"ui.panel.config.users.caption",iconPath:n.EjC,core:!0,advancedOnly:!0}],general:[{component:"core",path:"/config/core",translationKey:"ui.panel.config.core.caption",iconPath:n.T__,core:!0},{component:"server_control",path:"/config/server_control",translationKey:"ui.panel.config.server_control.caption",iconPath:n.K12,core:!0},{component:"logs",path:"/config/logs",translationKey:"ui.panel.config.logs.caption",iconPath:n.ofU,core:!0},{component:"info",path:"/config/info",translationKey:"ui.panel.config.info.caption",iconPath:n.geb,core:!0}],advanced:[{component:"customize",path:"/config/customize",translationKey:"ui.panel.config.customize.caption",iconPath:n.r9,core:!0,advancedOnly:!0}]};!function(e,t,o,n){var i=l();if(n)for(var r=0;r<n.length;r++)i=n[r](i);var a=t((function(e){i.initializeInstanceElements(e,s.elements)}),o),s=i.decorateClass(function(e){for(var t=[],o=function(e){return"method"===e.kind&&e.key===r.key&&e.placement===r.placement},n=0;n<e.length;n++){var i,r=e[n];if("method"===r.kind&&(i=t.find(o)))if(u(r.descriptor)||u(i.descriptor)){if(h(r)||h(i))throw new ReferenceError("Duplicated methods ("+r.key+") can't be decorated.");i.descriptor=r.descriptor}else{if(h(r)){if(h(i))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+r.key+").");i.decorators=r.decorators}p(r,i)}else t.push(r)}return t}(a.d.map(d)),e);i.initializeClassElements(a.F,s.elements),i.runClassFinishers(a.F,s.finishers)}([(0,i.Mo)("ha-panel-config")],(function(e,t){class n extends t{constructor(...t){super(...t),e(this)}}return{F:n,d:[{kind:"field",decorators:[(0,i.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,i.Cb)()],key:"narrow",value:void 0},{kind:"field",decorators:[(0,i.Cb)()],key:"route",value:void 0},{kind:"field",key:"routerOptions",value:()=>({defaultPage:"dashboard",routes:{areas:{tag:"ha-config-areas",load:()=>Promise.all([o.e(8200),o.e(879),o.e(8644),o.e(839),o.e(7138),o.e(6509),o.e(1359),o.e(3511),o.e(7065),o.e(2519),o.e(3567)]).then(o.bind(o,83567))},automation:{tag:"ha-config-automation",load:()=>Promise.all([o.e(5009),o.e(2955),o.e(8161),o.e(1041),o.e(8200),o.e(879),o.e(1657),o.e(8644),o.e(4268),o.e(7724),o.e(2613),o.e(9799),o.e(6294),o.e(8595),o.e(5386),o.e(839),o.e(7895),o.e(6363),o.e(3268),o.e(9266),o.e(5225),o.e(7138),o.e(5829),o.e(3661),o.e(7911),o.e(6509),o.e(4535),o.e(1359),o.e(3511),o.e(8331),o.e(7065),o.e(3902),o.e(577),o.e(437),o.e(2539)]).then(o.bind(o,4813))},blueprint:{tag:"ha-config-blueprint",load:()=>Promise.all([o.e(8200),o.e(879),o.e(8644),o.e(5386),o.e(839),o.e(7895),o.e(7138),o.e(6509),o.e(1359),o.e(3511),o.e(7065),o.e(2519),o.e(3450)]).then(o.bind(o,32958))},tags:{tag:"ha-config-tags",load:()=>Promise.all([o.e(8200),o.e(879),o.e(8644),o.e(839),o.e(7138),o.e(6509),o.e(1359),o.e(3511),o.e(7065),o.e(2519),o.e(2130)]).then(o.bind(o,22130))},cloud:{tag:"ha-config-cloud",load:()=>Promise.all([o.e(5009),o.e(2955),o.e(8161),o.e(8200),o.e(879),o.e(7895),o.e(2913),o.e(6509),o.e(3362),o.e(5733)]).then(o.bind(o,5733))},core:{tag:"ha-config-core",load:()=>Promise.all([o.e(8161),o.e(8200),o.e(879),o.e(8644),o.e(3268),o.e(1895),o.e(5335),o.e(6509),o.e(1359),o.e(9220),o.e(1482),o.e(7282)]).then(o.bind(o,25188))},devices:{tag:"ha-config-devices",load:()=>Promise.all([o.e(8200),o.e(879),o.e(8644),o.e(7724),o.e(2613),o.e(9799),o.e(6294),o.e(5386),o.e(7895),o.e(7138),o.e(5829),o.e(3661),o.e(6509),o.e(1359),o.e(3511),o.e(7065),o.e(1927),o.e(2519),o.e(577),o.e(1177),o.e(2073)]).then(o.bind(o,88744))},server_control:{tag:"ha-config-server-control",load:()=>Promise.all([o.e(8200),o.e(879),o.e(3268),o.e(6509),o.e(1359),o.e(9220),o.e(6074)]).then(o.bind(o,77980))},logs:{tag:"ha-config-logs",load:()=>Promise.all([o.e(1127),o.e(6509),o.e(1359),o.e(6795)]).then(o.bind(o,56795))},info:{tag:"ha-config-info",load:()=>Promise.all([o.e(7724),o.e(2613),o.e(9799),o.e(6294),o.e(8090),o.e(6509),o.e(1359),o.e(4685)]).then(o.bind(o,74685))},customize:{tag:"ha-config-customize",load:()=>Promise.all([o.e(5009),o.e(2955),o.e(8161),o.e(1041),o.e(8200),o.e(879),o.e(1657),o.e(6670),o.e(4742),o.e(6509),o.e(4535),o.e(1359),o.e(1927),o.e(5292)]).then(o.bind(o,9618))},dashboard:{tag:"ha-config-dashboard",load:()=>Promise.all([o.e(3268),o.e(4222)]).then(o.bind(o,74222))},entities:{tag:"ha-config-entities",load:()=>Promise.all([o.e(5009),o.e(2955),o.e(8161),o.e(8200),o.e(879),o.e(8644),o.e(7724),o.e(2613),o.e(9799),o.e(6294),o.e(7138),o.e(2178),o.e(6509),o.e(1359),o.e(3511),o.e(7065),o.e(2519),o.e(4009)]).then(o.bind(o,94009))},integrations:{tag:"ha-config-integrations",load:()=>Promise.all([o.e(8161),o.e(8200),o.e(879),o.e(8644),o.e(7724),o.e(2613),o.e(9799),o.e(6294),o.e(839),o.e(1480),o.e(883),o.e(6509),o.e(1359),o.e(91),o.e(2569)]).then(o.bind(o,72569))},lovelace:{tag:"ha-config-lovelace",load:()=>o.e(2730).then(o.bind(o,52730))},person:{tag:"ha-config-person",load:()=>Promise.all([o.e(839),o.e(6509),o.e(1359),o.e(5145)]).then(o.bind(o,32503))},script:{tag:"ha-config-script",load:()=>Promise.all([o.e(5009),o.e(2955),o.e(8161),o.e(1041),o.e(8200),o.e(879),o.e(1657),o.e(8644),o.e(4268),o.e(7724),o.e(2613),o.e(9799),o.e(6294),o.e(8595),o.e(5386),o.e(839),o.e(7895),o.e(6363),o.e(3268),o.e(9266),o.e(5225),o.e(7138),o.e(5829),o.e(3661),o.e(3707),o.e(6509),o.e(4535),o.e(1359),o.e(3511),o.e(8331),o.e(7065),o.e(3902),o.e(577),o.e(437),o.e(4866)]).then(o.bind(o,29813))},scene:{tag:"ha-config-scene",load:()=>Promise.all([o.e(8161),o.e(1041),o.e(8200),o.e(879),o.e(1657),o.e(8644),o.e(7724),o.e(9799),o.e(839),o.e(7138),o.e(6509),o.e(4535),o.e(1359),o.e(3511),o.e(7065),o.e(8101),o.e(1927),o.e(2519),o.e(437),o.e(9734)]).then(o.bind(o,38562))},helpers:{tag:"ha-config-helpers",load:()=>Promise.all([o.e(5009),o.e(2955),o.e(8161),o.e(8200),o.e(879),o.e(8644),o.e(839),o.e(7138),o.e(1578),o.e(6509),o.e(1359),o.e(3511),o.e(7065),o.e(2519),o.e(8690)]).then(o.bind(o,18690))},users:{tag:"ha-config-users",load:()=>Promise.all([o.e(8200),o.e(879),o.e(8644),o.e(839),o.e(7138),o.e(6509),o.e(1359),o.e(3511),o.e(7065),o.e(2519),o.e(9914)]).then(o.bind(o,9914))},zone:{tag:"ha-config-zone",load:()=>Promise.all([o.e(8161),o.e(839),o.e(4541),o.e(6509),o.e(1359),o.e(9220),o.e(9180)]).then(o.bind(o,19180))},zha:{tag:"zha-config-dashboard-router",load:()=>o.e(6094).then(o.bind(o,86094))},zwave:{tag:"zwave-config-router",load:()=>o.e(8189).then(o.bind(o,88189))},mqtt:{tag:"mqtt-config-panel",load:()=>Promise.all([o.e(8200),o.e(879),o.e(8180)]).then(o.bind(o,42660))},ozw:{tag:"ozw-config-router",load:()=>o.e(7904).then(o.bind(o,37904))},zwave_js:{tag:"zwave_js-config-router",load:()=>o.e(7100).then(o.bind(o,17100))}}})},{kind:"field",decorators:[(0,i.SB)()],key:"_wideSidebar",value:()=>!1},{kind:"field",decorators:[(0,i.SB)()],key:"_wide",value:()=>!1},{kind:"field",decorators:[(0,i.SB)()],key:"_cloudStatus",value:void 0},{kind:"field",key:"_listeners",value:()=>[]},{kind:"method",key:"connectedCallback",value:function(){y(v(n.prototype),"connectedCallback",this).call(this),this._listeners.push((0,a.K)("(min-width: 1040px)",(e=>{this._wide=e}))),this._listeners.push((0,a.K)("(min-width: 1296px)",(e=>{this._wideSidebar=e})))}},{kind:"method",key:"disconnectedCallback",value:function(){for(y(v(n.prototype),"disconnectedCallback",this).call(this);this._listeners.length;)this._listeners.pop()()}},{kind:"method",key:"firstUpdated",value:function(e){y(v(n.prototype),"firstUpdated",this).call(this,e),this.hass.loadBackendTranslation("title"),(0,r.p)(this.hass,"cloud")&&this._updateCloudStatus(),this.addEventListener("ha-refresh-cloud-status",(()=>this._updateCloudStatus())),this.style.setProperty("--app-header-background-color","var(--sidebar-background-color)"),this.style.setProperty("--app-header-text-color","var(--sidebar-text-color)"),this.style.setProperty("--app-header-border-bottom","1px solid var(--divider-color)")}},{kind:"method",key:"updatePageEl",value:function(e){const t="docked"===this.hass.dockedSidebar?this._wideSidebar:this._wide;var o,n;"setProperties"in e?e.setProperties({route:this.routeTail,hass:this.hass,showAdvanced:Boolean(null===(o=this.hass.userData)||void 0===o?void 0:o.showAdvanced),isWide:t,narrow:this.narrow,cloudStatus:this._cloudStatus}):(e.route=this.routeTail,e.hass=this.hass,e.showAdvanced=Boolean(null===(n=this.hass.userData)||void 0===n?void 0:n.showAdvanced),e.isWide=t,e.narrow=this.narrow,e.cloudStatus=this._cloudStatus)}},{kind:"method",key:"_updateCloudStatus",value:async function(){this._cloudStatus=await(0,s.LI)(this.hass),"connecting"===this._cloudStatus.cloud&&setTimeout((()=>this._updateCloudStatus()),5e3)}}]}}),c.n)}}]);
//# sourceMappingURL=chunk.999b4d06e0119c044040.js.map