iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
2 lines • 18.1 kB
JavaScript
(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[4682],{7323:(e,t,o)=>{"use strict";o.d(t,{p:()=>i});const i=(e,t)=>e&&-1!==e.config.components.indexOf(t)},83270:(e,t,o)=>{"use strict";o.d(t,{LI:()=>i,AV:()=>n,Mc:()=>r,dn:()=>a,H9:()=>s,De:()=>c,Wz:()=>l,LV:()=>d,QD:()=>p,A$:()=>h,tW:()=>u});const i=e=>e.callWS({type:"cloud/status"}),n=(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})},29311:(e,t,o)=>{"use strict";o.r(t),o.d(t,{configSections:()=>b});o(53973),o(89194);var i=o(15652),n=o(7323),r=o(59708),a=o(83270),s=(o(15291),o(18199)),c=o(55317);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(i){t.forEach((function(t){var n=t.placement;if(t.kind===i&&("static"===n||"prototype"===n)){var r="static"===n?e:o;this.defineClassElement(r,t)}}),this)}),this)},defineClassElement:function(e,t){var o=t.descriptor;if("field"===t.kind){var i=t.initializer;o={enumerable:o.enumerable,writable:o.writable,configurable:o.configurable,value:void 0===i?void 0:i.call(e)}}Object.defineProperty(e,t.key,o)},decorateClass:function(e,t){var o=[],i=[],n={static:[],prototype:[],own:[]};if(e.forEach((function(e){this.addElementPlacement(e,n)}),this),e.forEach((function(e){if(!h(e))return o.push(e);var t=this.decorateElement(e,n);o.push(t.element),o.push.apply(o,t.extras),i.push.apply(i,t.finishers)}),this),!t)return{elements:o,finishers:i};var r=this.decorateConstructor(o,t);return i.push.apply(i,r.finishers),r.finishers=i,r},addElementPlacement:function(e,t,o){var i=t[e.placement];if(!o&&-1!==i.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");i.push(e.key)},decorateElement:function(e,t){for(var o=[],i=[],n=e.decorators,r=n.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,n[r])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&i.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:i,extras:o}},decorateConstructor:function(e,t){for(var o=[],i=t.length-1;i>=0;i--){var n=this.fromClassDescriptor(e),r=this.toClassDescriptor((0,t[i])(n)||n);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&&Symbol.iterator in Object(e))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),i=String(e.placement);if("static"!==i&&"prototype"!==i&&"own"!==i)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 "'+i+'"');var n=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var r={kind:t,key:o,placement:i,descriptor:Object.assign({},n)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(n,"get","The property descriptor of a field descriptor"),this.disallowProperty(n,"set","The property descriptor of a field descriptor"),this.disallowProperty(n,"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 i=(0,t[o])(e);if(void 0!==i){if("function"!=typeof i)throw new TypeError("Finishers must return a constructor.");e=i}}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 i={kind:"field"===e.kind?"field":"method",key:o,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:t};return e.decorators&&(i.decorators=e.decorators),"field"===e.kind&&(i.initializer=e.value),i}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 i=o.call(e,t||"default");if("object"!=typeof i)return i;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,i=new Array(t);o<t;o++)i[o]=e[o];return i}function y(e,t,o){return(y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,o){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=v(e)););return e}(e,t);if(i){var n=Object.getOwnPropertyDescriptor(i,t);return n.get?n.get.call(o):n.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:c.$Z0,core:!0},{component:"devices",path:"/config/devices",translationKey:"ui.panel.config.devices.caption",iconPath:c.p0g,core:!0},{component:"entities",path:"/config/entities",translationKey:"ui.panel.config.entities.caption",iconPath:c.RIj,core:!0},{component:"areas",path:"/config/areas",translationKey:"ui.panel.config.areas.caption",iconPath:c.yvc,core:!0}],automation:[{component:"automation",path:"/config/automation",translationKey:"ui.panel.config.automation.caption",iconPath:c.$Th},{component:"scene",path:"/config/scene",translationKey:"ui.panel.config.scene.caption",iconPath:c.sc6},{component:"script",path:"/config/script",translationKey:"ui.panel.config.script.caption",iconPath:c.EQk},{component:"helpers",path:"/config/helpers",translationKey:"ui.panel.config.helpers.caption",iconPath:c.cl8,core:!0}],experimental:[{component:"tags",path:"/config/tags",translationKey:"ui.panel.config.tags.caption",iconPath:c.AIu,core:!0}],lovelace:[{component:"lovelace",path:"/config/lovelace/dashboards",translationKey:"ui.panel.config.lovelace.caption",iconPath:c.Ccq}],persons:[{component:"person",path:"/config/person",translationKey:"ui.panel.config.person.caption",iconPath:c.rI3},{component:"zone",path:"/config/zone",translationKey:"ui.panel.config.zone.caption",iconPath:c.OBx},{component:"users",path:"/config/users",translationKey:"ui.panel.config.users.caption",iconPath:c.EjC,core:!0,advancedOnly:!0}],general:[{component:"core",path:"/config/core",translationKey:"ui.panel.config.core.caption",iconPath:c.T__,core:!0},{component:"server_control",path:"/config/server_control",translationKey:"ui.panel.config.server_control.caption",iconPath:c.K12,core:!0},{component:"logs",path:"/config/logs",translationKey:"ui.panel.config.logs.caption",iconPath:c.ofU,core:!0},{component:"info",path:"/config/info",translationKey:"ui.panel.config.info.caption",iconPath:c.geb,core:!0}],advanced:[{component:"customize",path:"/config/customize",translationKey:"ui.panel.config.customize.caption",iconPath:c.r9,core:!0,advancedOnly:!0}]};!function(e,t,o,i){var n=l();if(i)for(var r=0;r<i.length;r++)n=i[r](n);var a=t((function(e){n.initializeInstanceElements(e,s.elements)}),o),s=n.decorateClass(function(e){for(var t=[],o=function(e){return"method"===e.kind&&e.key===r.key&&e.placement===r.placement},i=0;i<e.length;i++){var n,r=e[i];if("method"===r.kind&&(n=t.find(o)))if(u(r.descriptor)||u(n.descriptor)){if(h(r)||h(n))throw new ReferenceError("Duplicated methods ("+r.key+") can't be decorated.");n.descriptor=r.descriptor}else{if(h(r)){if(h(n))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+r.key+").");n.decorators=r.decorators}p(r,n)}else t.push(r)}return t}(a.d.map(d)),e);n.initializeClassElements(a.F,s.elements),n.runClassFinishers(a.F,s.finishers)}([(0,i.Mo)("ha-panel-config")],(function(e,t){class s extends t{constructor(...t){super(...t),e(this)}}return{F:s,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(8941),o.e(879),o.e(9119),o.e(5755),o.e(9494),o.e(3598),o.e(6509),o.e(1359),o.e(2899),o.e(2519),o.e(4122)]).then(o.bind(o,83567))},automation:{tag:"ha-config-automation",load:()=>Promise.all([o.e(5009),o.e(4358),o.e(8161),o.e(8941),o.e(879),o.e(1041),o.e(8374),o.e(3641),o.e(9119),o.e(5755),o.e(9494),o.e(6547),o.e(9033),o.e(3268),o.e(1572),o.e(2174),o.e(3598),o.e(3238),o.e(486),o.e(1574),o.e(7190),o.e(5469),o.e(6509),o.e(4535),o.e(1359),o.e(2899),o.e(1927),o.e(3822),o.e(2519),o.e(1311),o.e(8331),o.e(5020),o.e(7069),o.e(1254)]).then(o.bind(o,44030))},tags:{tag:"ha-config-tags",load:()=>Promise.all([o.e(8941),o.e(879),o.e(9119),o.e(5755),o.e(9494),o.e(3598),o.e(6509),o.e(1359),o.e(2899),o.e(2519),o.e(2683)]).then(o.bind(o,22130))},cloud:{tag:"ha-config-cloud",load:()=>Promise.all([o.e(8941),o.e(879),o.e(6547),o.e(8367),o.e(6509),o.e(2164),o.e(5126)]).then(o.bind(o,92310))},core:{tag:"ha-config-core",load:()=>Promise.all([o.e(8161),o.e(8941),o.e(879),o.e(3268),o.e(1895),o.e(6509),o.e(1359),o.e(1482),o.e(9220),o.e(4527)]).then(o.bind(o,32728))},devices:{tag:"ha-config-devices",load:()=>Promise.all([o.e(8941),o.e(879),o.e(5755),o.e(9494),o.e(6547),o.e(3598),o.e(486),o.e(5062),o.e(6509),o.e(1359),o.e(2899),o.e(1927),o.e(2519),o.e(1311),o.e(4030),o.e(9966)]).then(o.bind(o,53490))},server_control:{tag:"ha-config-server-control",load:()=>Promise.all([o.e(8941),o.e(879),o.e(3268),o.e(6509),o.e(1359),o.e(9220),o.e(3018)]).then(o.bind(o,77980))},logs:{tag:"ha-config-logs",load:()=>Promise.all([o.e(9555),o.e(6509),o.e(1359),o.e(8445)]).then(o.bind(o,56795))},info:{tag:"ha-config-info",load:()=>Promise.all([o.e(6324),o.e(6509),o.e(1359),o.e(9032)]).then(o.bind(o,74685))},customize:{tag:"ha-config-customize",load:()=>Promise.all([o.e(5009),o.e(4358),o.e(8161),o.e(8941),o.e(879),o.e(3007),o.e(6509),o.e(1359),o.e(4035),o.e(8387)]).then(o.bind(o,93585))},dashboard:{tag:"ha-config-dashboard",load:()=>Promise.all([o.e(3268),o.e(2772)]).then(o.bind(o,74222))},entities:{tag:"ha-config-entities",load:()=>Promise.all([o.e(5009),o.e(4358),o.e(8161),o.e(8941),o.e(879),o.e(5755),o.e(9494),o.e(2174),o.e(3598),o.e(3238),o.e(7896),o.e(6509),o.e(1359),o.e(2899),o.e(2519),o.e(8207)]).then(o.bind(o,94009))},integrations:{tag:"ha-config-integrations",load:()=>Promise.all([o.e(8941),o.e(879),o.e(9119),o.e(2174),o.e(3238),o.e(1480),o.e(8988),o.e(6509),o.e(1359),o.e(6999)]).then(o.bind(o,72019))},lovelace:{tag:"ha-config-lovelace",load:()=>o.e(1944).then(o.bind(o,52730))},person:{tag:"ha-config-person",load:()=>Promise.all([o.e(9119),o.e(6509),o.e(1359),o.e(3071)]).then(o.bind(o,32503))},script:{tag:"ha-config-script",load:()=>Promise.all([o.e(5009),o.e(4358),o.e(8161),o.e(8941),o.e(879),o.e(1041),o.e(8374),o.e(3641),o.e(9119),o.e(5755),o.e(9494),o.e(9033),o.e(3268),o.e(1572),o.e(2174),o.e(3598),o.e(3238),o.e(486),o.e(5062),o.e(1574),o.e(7190),o.e(6509),o.e(4535),o.e(1359),o.e(2899),o.e(1927),o.e(3822),o.e(2519),o.e(8331),o.e(5020),o.e(7069),o.e(884)]).then(o.bind(o,29813))},scene:{tag:"ha-config-scene",load:()=>Promise.all([o.e(8161),o.e(8941),o.e(879),o.e(1041),o.e(8374),o.e(9119),o.e(5755),o.e(9494),o.e(3598),o.e(6509),o.e(4535),o.e(1359),o.e(2899),o.e(1927),o.e(2519),o.e(5020),o.e(9226)]).then(o.bind(o,38562))},helpers:{tag:"ha-config-helpers",load:()=>Promise.all([o.e(5009),o.e(4358),o.e(8161),o.e(8941),o.e(879),o.e(9119),o.e(5755),o.e(9494),o.e(3598),o.e(6442),o.e(6509),o.e(1359),o.e(2899),o.e(2519),o.e(4820)]).then(o.bind(o,18690))},users:{tag:"ha-config-users",load:()=>Promise.all([o.e(8941),o.e(879),o.e(9119),o.e(5755),o.e(9494),o.e(3598),o.e(6509),o.e(1359),o.e(2899),o.e(2519),o.e(3465)]).then(o.bind(o,9914))},zone:{tag:"ha-config-zone",load:()=>Promise.all([o.e(8161),o.e(9119),o.e(5194),o.e(6509),o.e(1359),o.e(9220),o.e(981)]).then(o.bind(o,19180))},zha:{tag:"zha-config-dashboard-router",load:()=>o.e(1875).then(o.bind(o,86094))},zwave:{tag:"ha-config-zwave",load:()=>Promise.all([o.e(5009),o.e(4358),o.e(8161),o.e(8941),o.e(879),o.e(3268),o.e(3007),o.e(6509),o.e(315),o.e(4035),o.e(9343)]).then(o.bind(o,62127))},mqtt:{tag:"mqtt-config-panel",load:()=>Promise.all([o.e(8941),o.e(879),o.e(3822),o.e(7260)]).then(o.bind(o,42660))},ozw:{tag:"ozw-config-router",load:()=>o.e(5464).then(o.bind(o,37904))}}})},{kind:"field",decorators:[(0,i.sz)()],key:"_wideSidebar",value:()=>!1},{kind:"field",decorators:[(0,i.sz)()],key:"_wide",value:()=>!1},{kind:"field",decorators:[(0,i.sz)()],key:"_cloudStatus",value:void 0},{kind:"field",key:"_listeners",value:()=>[]},{kind:"method",key:"connectedCallback",value:function(){y(v(s.prototype),"connectedCallback",this).call(this),this._listeners.push((0,r.K)("(min-width: 1040px)",(e=>{this._wide=e}))),this._listeners.push((0,r.K)("(min-width: 1296px)",(e=>{this._wideSidebar=e})))}},{kind:"method",key:"disconnectedCallback",value:function(){for(y(v(s.prototype),"disconnectedCallback",this).call(this);this._listeners.length;)this._listeners.pop()()}},{kind:"method",key:"firstUpdated",value:function(e){y(v(s.prototype),"firstUpdated",this).call(this,e),this.hass.loadBackendTranslation("title"),(0,n.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,i;"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===(i=this.hass.userData)||void 0===i?void 0:i.showAdvanced),e.isWide=t,e.narrow=this.narrow,e.cloudStatus=this._cloudStatus)}},{kind:"method",key:"_updateCloudStatus",value:async function(){this._cloudStatus=await(0,a.LI)(this.hass),"connecting"===this._cloudStatus.cloud&&setTimeout((()=>this._updateCloudStatus()),5e3)}}]}}),s.n)}}]);
//# sourceMappingURL=chunk.9adf41505668008b062f.js.map