UNPKG

iobroker.lovelace

Version:

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

2 lines 80.9 kB
(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[8387],{27269:function(t,e,n){"use strict";n.d(e,{p:function(){return r}});var r=function(t){return t.substr(t.indexOf(".")+1)}},22311:function(t,e,n){"use strict";n.d(e,{N:function(){return o}});var r=n(58831),o=function(t){return(0,r.M)(t.entity_id)}},91741:function(t,e,n){"use strict";n.d(e,{C:function(){return o}});var r=n(27269),o=function(t){return void 0===t.attributes.friendly_name?(0,r.p)(t.entity_id).replace(/_/g," "):t.attributes.friendly_name||""}},47266:function(t,e,n){"use strict";n.d(e,{y:function(){return o}});var r=n(91741),o=function(t,e){var n=(0,r.C)(t),o=(0,r.C)(e);return n<o?-1:n>o?1:0}},22098:function(t,e,n){"use strict";var r=n(15652);function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(){var t=u([""]);return i=function(){return t},t}function c(){var t=u(['<h1 class="card-header">',"</h1>"]);return c=function(){return t},t}function a(){var t=u(["\n      ","\n      <slot></slot>\n    "]);return a=function(){return t},t}function s(){var t=u(["\n      :host {\n        background: var(\n          --ha-card-background,\n          var(--card-background-color, white)\n        );\n        border-radius: var(--ha-card-border-radius, 4px);\n        box-shadow: var(\n          --ha-card-box-shadow,\n          0px 2px 1px -1px rgba(0, 0, 0, 0.2),\n          0px 1px 1px 0px rgba(0, 0, 0, 0.14),\n          0px 1px 3px 0px rgba(0, 0, 0, 0.12)\n        );\n        color: var(--primary-text-color);\n        display: block;\n        transition: all 0.3s ease-out;\n        position: relative;\n      }\n\n      :host([outlined]) {\n        box-shadow: none;\n        border-width: var(--ha-card-border-width, 1px);\n        border-style: solid;\n        border-color: var(\n          --ha-card-border-color,\n          var(--divider-color, #e0e0e0)\n        );\n      }\n\n      .card-header,\n      :host ::slotted(.card-header) {\n        color: var(--ha-card-header-color, --primary-text-color);\n        font-family: var(--ha-card-header-font-family, inherit);\n        font-size: var(--ha-card-header-font-size, 24px);\n        letter-spacing: -0.012em;\n        line-height: 48px;\n        padding: 12px 16px 16px;\n        display: block;\n        margin-block-start: 0px;\n        margin-block-end: 0px;\n        font-weight: normal;\n      }\n\n      :host ::slotted(.card-content:not(:first-child)),\n      slot:not(:first-child)::slotted(.card-content) {\n        padding-top: 0px;\n        margin-top: -8px;\n      }\n\n      :host ::slotted(.card-content) {\n        padding: 16px;\n      }\n\n      :host ::slotted(.card-actions) {\n        border-top: 1px solid var(--divider-color, #e8e8e8);\n        padding: 5px 16px;\n      }\n    "]);return s=function(){return t},t}function u(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){return(f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function p(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=h(t);if(e){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?y(t):e}function y(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function m(){m=function(){return t};var t={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(t,e){["method","field"].forEach((function(n){e.forEach((function(e){e.kind===n&&"own"===e.placement&&this.defineClassElement(t,e)}),this)}),this)},initializeClassElements:function(t,e){var n=t.prototype;["method","field"].forEach((function(r){e.forEach((function(e){var o=e.placement;if(e.kind===r&&("static"===o||"prototype"===o)){var i="static"===o?t:n;this.defineClassElement(i,e)}}),this)}),this)},defineClassElement:function(t,e){var n=e.descriptor;if("field"===e.kind){var r=e.initializer;n={enumerable:n.enumerable,writable:n.writable,configurable:n.configurable,value:void 0===r?void 0:r.call(t)}}Object.defineProperty(t,e.key,n)},decorateClass:function(t,e){var n=[],r=[],o={static:[],prototype:[],own:[]};if(t.forEach((function(t){this.addElementPlacement(t,o)}),this),t.forEach((function(t){if(!g(t))return n.push(t);var e=this.decorateElement(t,o);n.push(e.element),n.push.apply(n,e.extras),r.push.apply(r,e.finishers)}),this),!e)return{elements:n,finishers:r};var i=this.decorateConstructor(n,e);return r.push.apply(r,i.finishers),i.finishers=r,i},addElementPlacement:function(t,e,n){var r=e[t.placement];if(!n&&-1!==r.indexOf(t.key))throw new TypeError("Duplicated element ("+t.key+")");r.push(t.key)},decorateElement:function(t,e){for(var n=[],r=[],o=t.decorators,i=o.length-1;i>=0;i--){var c=e[t.placement];c.splice(c.indexOf(t.key),1);var a=this.fromElementDescriptor(t),s=this.toElementFinisherExtras((0,o[i])(a)||a);t=s.element,this.addElementPlacement(t,e),s.finisher&&r.push(s.finisher);var u=s.extras;if(u){for(var l=0;l<u.length;l++)this.addElementPlacement(u[l],e);n.push.apply(n,u)}}return{element:t,finishers:r,extras:n}},decorateConstructor:function(t,e){for(var n=[],r=e.length-1;r>=0;r--){var o=this.fromClassDescriptor(t),i=this.toClassDescriptor((0,e[r])(o)||o);if(void 0!==i.finisher&&n.push(i.finisher),void 0!==i.elements){t=i.elements;for(var c=0;c<t.length-1;c++)for(var a=c+1;a<t.length;a++)if(t[c].key===t[a].key&&t[c].placement===t[a].placement)throw new TypeError("Duplicated element ("+t[c].key+")")}}return{elements:t,finishers:n}},fromElementDescriptor:function(t){var e={kind:t.kind,key:t.key,placement:t.placement,descriptor:t.descriptor};return Object.defineProperty(e,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===t.kind&&(e.initializer=t.initializer),e},toElementDescriptors:function(t){var e;if(void 0!==t)return(e=t,function(t){if(Array.isArray(t))return t}(e)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(e)||function(t,e){if(t){if("string"==typeof t)return E(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(t,e):void 0}}(e)||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(t){var e=this.toElementDescriptor(t);return this.disallowProperty(t,"finisher","An element descriptor"),this.disallowProperty(t,"extras","An element descriptor"),e}),this)},toElementDescriptor:function(t){var e=String(t.kind);if("method"!==e&&"field"!==e)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+e+'"');var n=k(t.key),r=String(t.placement);if("static"!==r&&"prototype"!==r&&"own"!==r)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 "'+r+'"');var o=t.descriptor;this.disallowProperty(t,"elements","An element descriptor");var i={kind:e,key:n,placement:r,descriptor:Object.assign({},o)};return"field"!==e?this.disallowProperty(t,"initializer","A method descriptor"):(this.disallowProperty(o,"get","The property descriptor of a field descriptor"),this.disallowProperty(o,"set","The property descriptor of a field descriptor"),this.disallowProperty(o,"value","The property descriptor of a field descriptor"),i.initializer=t.initializer),i},toElementFinisherExtras:function(t){return{element:this.toElementDescriptor(t),finisher:O(t,"finisher"),extras:this.toElementDescriptors(t.extras)}},fromClassDescriptor:function(t){var e={kind:"class",elements:t.map(this.fromElementDescriptor,this)};return Object.defineProperty(e,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),e},toClassDescriptor:function(t){var e=String(t.kind);if("class"!==e)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+e+'"');this.disallowProperty(t,"key","A class descriptor"),this.disallowProperty(t,"placement","A class descriptor"),this.disallowProperty(t,"descriptor","A class descriptor"),this.disallowProperty(t,"initializer","A class descriptor"),this.disallowProperty(t,"extras","A class descriptor");var n=O(t,"finisher");return{elements:this.toElementDescriptors(t.elements),finisher:n}},runClassFinishers:function(t,e){for(var n=0;n<e.length;n++){var r=(0,e[n])(t);if(void 0!==r){if("function"!=typeof r)throw new TypeError("Finishers must return a constructor.");t=r}}return t},disallowProperty:function(t,e,n){if(void 0!==t[e])throw new TypeError(n+" can't have a ."+e+" property.")}};return t}function b(t){var e,n=k(t.key);"method"===t.kind?e={value:t.value,writable:!0,configurable:!0,enumerable:!1}:"get"===t.kind?e={get:t.value,configurable:!0,enumerable:!1}:"set"===t.kind?e={set:t.value,configurable:!0,enumerable:!1}:"field"===t.kind&&(e={configurable:!0,writable:!0,enumerable:!0});var r={kind:"field"===t.kind?"field":"method",key:n,placement:t.static?"static":"field"===t.kind?"own":"prototype",descriptor:e};return t.decorators&&(r.decorators=t.decorators),"field"===t.kind&&(r.initializer=t.value),r}function v(t,e){void 0!==t.descriptor.get?e.descriptor.get=t.descriptor.get:e.descriptor.set=t.descriptor.set}function g(t){return t.decorators&&t.decorators.length}function w(t){return void 0!==t&&!(void 0===t.value&&void 0===t.writable)}function O(t,e){var n=t[e];if(void 0!==n&&"function"!=typeof n)throw new TypeError("Expected '"+e+"' to be a function");return n}function k(t){var e=function(t,e){if("object"!==o(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===o(e)?e:String(e)}function E(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}!function(t,e,n,r){var o=m();if(r)for(var i=0;i<r.length;i++)o=r[i](o);var c=e((function(t){o.initializeInstanceElements(t,a.elements)}),n),a=o.decorateClass(function(t){for(var e=[],n=function(t){return"method"===t.kind&&t.key===i.key&&t.placement===i.placement},r=0;r<t.length;r++){var o,i=t[r];if("method"===i.kind&&(o=e.find(n)))if(w(i.descriptor)||w(o.descriptor)){if(g(i)||g(o))throw new ReferenceError("Duplicated methods ("+i.key+") can't be decorated.");o.descriptor=i.descriptor}else{if(g(i)){if(g(o))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+i.key+").");o.decorators=i.decorators}v(i,o)}else e.push(i)}return e}(c.d.map(b)),t);o.initializeClassElements(c.F,a.elements),o.runClassFinishers(c.F,a.finishers)}([(0,r.Mo)("ha-card")],(function(t,e){return{F:function(e){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(r,e);var n=p(r);function r(){var e;l(this,r);for(var o=arguments.length,i=new Array(o),c=0;c<o;c++)i[c]=arguments[c];return e=n.call.apply(n,[this].concat(i)),t(y(e)),e}return r}(e),d:[{kind:"field",decorators:[(0,r.Cb)()],key:"header",value:void 0},{kind:"field",decorators:[(0,r.Cb)({type:Boolean,reflect:!0})],key:"outlined",value:function(){return!1}},{kind:"get",static:!0,key:"styles",value:function(){return(0,r.iv)(s())}},{kind:"method",key:"render",value:function(){return(0,r.dy)(a(),this.header?(0,r.dy)(c(),this.header):(0,r.dy)(i()))}}]}}),r.oi)},10983:function(t,e,n){"use strict";n(25230);var r=n(15652);n(16509);function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(){var t=a(["\n      :host {\n        display: inline-block;\n        outline: none;\n      }\n      :host([disabled]) {\n        pointer-events: none;\n      }\n      mwc-icon-button {\n        --mdc-theme-on-primary: currentColor;\n        --mdc-theme-text-disabled-on-light: var(--disabled-text-color);\n      }\n      ha-icon {\n        --ha-icon-display: inline;\n      }\n    "]);return i=function(){return t},t}function c(){var t=a(["\n      <mwc-icon-button .label="," .disabled=",">\n        <ha-icon .icon=","></ha-icon>\n      </mwc-icon-button>\n    "]);return c=function(){return t},t}function a(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=d(t);if(e){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}function f(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?p(t):e}function p(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function d(t){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function y(){y=function(){return t};var t={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(t,e){["method","field"].forEach((function(n){e.forEach((function(e){e.kind===n&&"own"===e.placement&&this.defineClassElement(t,e)}),this)}),this)},initializeClassElements:function(t,e){var n=t.prototype;["method","field"].forEach((function(r){e.forEach((function(e){var o=e.placement;if(e.kind===r&&("static"===o||"prototype"===o)){var i="static"===o?t:n;this.defineClassElement(i,e)}}),this)}),this)},defineClassElement:function(t,e){var n=e.descriptor;if("field"===e.kind){var r=e.initializer;n={enumerable:n.enumerable,writable:n.writable,configurable:n.configurable,value:void 0===r?void 0:r.call(t)}}Object.defineProperty(t,e.key,n)},decorateClass:function(t,e){var n=[],r=[],o={static:[],prototype:[],own:[]};if(t.forEach((function(t){this.addElementPlacement(t,o)}),this),t.forEach((function(t){if(!b(t))return n.push(t);var e=this.decorateElement(t,o);n.push(e.element),n.push.apply(n,e.extras),r.push.apply(r,e.finishers)}),this),!e)return{elements:n,finishers:r};var i=this.decorateConstructor(n,e);return r.push.apply(r,i.finishers),i.finishers=r,i},addElementPlacement:function(t,e,n){var r=e[t.placement];if(!n&&-1!==r.indexOf(t.key))throw new TypeError("Duplicated element ("+t.key+")");r.push(t.key)},decorateElement:function(t,e){for(var n=[],r=[],o=t.decorators,i=o.length-1;i>=0;i--){var c=e[t.placement];c.splice(c.indexOf(t.key),1);var a=this.fromElementDescriptor(t),s=this.toElementFinisherExtras((0,o[i])(a)||a);t=s.element,this.addElementPlacement(t,e),s.finisher&&r.push(s.finisher);var u=s.extras;if(u){for(var l=0;l<u.length;l++)this.addElementPlacement(u[l],e);n.push.apply(n,u)}}return{element:t,finishers:r,extras:n}},decorateConstructor:function(t,e){for(var n=[],r=e.length-1;r>=0;r--){var o=this.fromClassDescriptor(t),i=this.toClassDescriptor((0,e[r])(o)||o);if(void 0!==i.finisher&&n.push(i.finisher),void 0!==i.elements){t=i.elements;for(var c=0;c<t.length-1;c++)for(var a=c+1;a<t.length;a++)if(t[c].key===t[a].key&&t[c].placement===t[a].placement)throw new TypeError("Duplicated element ("+t[c].key+")")}}return{elements:t,finishers:n}},fromElementDescriptor:function(t){var e={kind:t.kind,key:t.key,placement:t.placement,descriptor:t.descriptor};return Object.defineProperty(e,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===t.kind&&(e.initializer=t.initializer),e},toElementDescriptors:function(t){var e;if(void 0!==t)return(e=t,function(t){if(Array.isArray(t))return t}(e)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(e)||function(t,e){if(t){if("string"==typeof t)return O(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?O(t,e):void 0}}(e)||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(t){var e=this.toElementDescriptor(t);return this.disallowProperty(t,"finisher","An element descriptor"),this.disallowProperty(t,"extras","An element descriptor"),e}),this)},toElementDescriptor:function(t){var e=String(t.kind);if("method"!==e&&"field"!==e)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+e+'"');var n=w(t.key),r=String(t.placement);if("static"!==r&&"prototype"!==r&&"own"!==r)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 "'+r+'"');var o=t.descriptor;this.disallowProperty(t,"elements","An element descriptor");var i={kind:e,key:n,placement:r,descriptor:Object.assign({},o)};return"field"!==e?this.disallowProperty(t,"initializer","A method descriptor"):(this.disallowProperty(o,"get","The property descriptor of a field descriptor"),this.disallowProperty(o,"set","The property descriptor of a field descriptor"),this.disallowProperty(o,"value","The property descriptor of a field descriptor"),i.initializer=t.initializer),i},toElementFinisherExtras:function(t){return{element:this.toElementDescriptor(t),finisher:g(t,"finisher"),extras:this.toElementDescriptors(t.extras)}},fromClassDescriptor:function(t){var e={kind:"class",elements:t.map(this.fromElementDescriptor,this)};return Object.defineProperty(e,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),e},toClassDescriptor:function(t){var e=String(t.kind);if("class"!==e)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+e+'"');this.disallowProperty(t,"key","A class descriptor"),this.disallowProperty(t,"placement","A class descriptor"),this.disallowProperty(t,"descriptor","A class descriptor"),this.disallowProperty(t,"initializer","A class descriptor"),this.disallowProperty(t,"extras","A class descriptor");var n=g(t,"finisher");return{elements:this.toElementDescriptors(t.elements),finisher:n}},runClassFinishers:function(t,e){for(var n=0;n<e.length;n++){var r=(0,e[n])(t);if(void 0!==r){if("function"!=typeof r)throw new TypeError("Finishers must return a constructor.");t=r}}return t},disallowProperty:function(t,e,n){if(void 0!==t[e])throw new TypeError(n+" can't have a ."+e+" property.")}};return t}function h(t){var e,n=w(t.key);"method"===t.kind?e={value:t.value,writable:!0,configurable:!0,enumerable:!1}:"get"===t.kind?e={get:t.value,configurable:!0,enumerable:!1}:"set"===t.kind?e={set:t.value,configurable:!0,enumerable:!1}:"field"===t.kind&&(e={configurable:!0,writable:!0,enumerable:!0});var r={kind:"field"===t.kind?"field":"method",key:n,placement:t.static?"static":"field"===t.kind?"own":"prototype",descriptor:e};return t.decorators&&(r.decorators=t.decorators),"field"===t.kind&&(r.initializer=t.value),r}function m(t,e){void 0!==t.descriptor.get?e.descriptor.get=t.descriptor.get:e.descriptor.set=t.descriptor.set}function b(t){return t.decorators&&t.decorators.length}function v(t){return void 0!==t&&!(void 0===t.value&&void 0===t.writable)}function g(t,e){var n=t[e];if(void 0!==n&&"function"!=typeof n)throw new TypeError("Expected '"+e+"' to be a function");return n}function w(t){var e=function(t,e){if("object"!==o(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===o(e)?e:String(e)}function O(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}!function(t,e,n,r){var o=y();if(r)for(var i=0;i<r.length;i++)o=r[i](o);var c=e((function(t){o.initializeInstanceElements(t,a.elements)}),n),a=o.decorateClass(function(t){for(var e=[],n=function(t){return"method"===t.kind&&t.key===i.key&&t.placement===i.placement},r=0;r<t.length;r++){var o,i=t[r];if("method"===i.kind&&(o=e.find(n)))if(v(i.descriptor)||v(o.descriptor)){if(b(i)||b(o))throw new ReferenceError("Duplicated methods ("+i.key+") can't be decorated.");o.descriptor=i.descriptor}else{if(b(i)){if(b(o))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+i.key+").");o.decorators=i.decorators}m(i,o)}else e.push(i)}return e}(c.d.map(h)),t);o.initializeClassElements(c.F,a.elements),o.runClassFinishers(c.F,a.finishers)}([(0,r.Mo)("ha-icon-button")],(function(t,e){return{F:function(e){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(r,e);var n=l(r);function r(){var e;s(this,r);for(var o=arguments.length,i=new Array(o),c=0;c<o;c++)i[c]=arguments[c];return e=n.call.apply(n,[this].concat(i)),t(p(e)),e}return r}(e),d:[{kind:"field",decorators:[(0,r.Cb)({type:Boolean,reflect:!0})],key:"disabled",value:function(){return!1}},{kind:"field",decorators:[(0,r.Cb)({type:String})],key:"icon",value:function(){return""}},{kind:"field",decorators:[(0,r.Cb)({type:String})],key:"label",value:function(){return""}},{kind:"method",key:"createRenderRoot",value:function(){return this.attachShadow({mode:"open",delegatesFocus:!0})}},{kind:"method",key:"render",value:function(){return(0,r.dy)(c(),this.label,this.disabled,this.icon)}},{kind:"get",static:!0,key:"styles",value:function(){return(0,r.iv)(i())}}]}}),r.oi)},11052:function(t,e,n){"use strict";n.d(e,{I:function(){return p}});var r=n(76389),o=n(47181);function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}function l(t,e){return!e||"object"!==i(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var p=(0,r.o)((function(t){return function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(l,t);var e,n,r,i=u(l);function l(){return c(this,l),i.apply(this,arguments)}return e=l,(n=[{key:"fire",value:function(t,e,n){return n=n||{},(0,o.B)(n.node||this,t,e,n)}}])&&a(e.prototype,n),r&&a(e,r),l}(t)}))},1265:function(t,e,n){"use strict";var r=n(76389);function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=l(t);if(e){var o=l(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u(this,n)}}function u(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}e.Z=(0,r.o)((function(t){return function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(u,t);var e,n,r,o=s(u);function u(){return i(this,u),o.apply(this,arguments)}return e=u,r=[{key:"properties",get:function(){return{hass:Object,localize:{type:Function,computed:"__computeLocalize(hass.localize)"}}}}],(n=[{key:"__computeLocalize",value:function(t){return t}}])&&c(e.prototype,n),r&&c(e,r),u}(t)}))},93585:function(t,e,n){"use strict";n.r(e);var r=n(50856),o=n(28426),i=n(22311),c=n(91741),a=n(47266),s=(n(1359),n(1265));n(3426),n(88165),n(53918),n(8878),n(53973),n(51095),n(31206),n(22098);function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(){var t=function(t,e){e||(e=t.slice(0));return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}(['\n      <style include="iron-flex ha-style">\n        ha-card {\n          direction: ltr;\n        }\n\n        .device-picker {\n          @apply --layout-horizontal;\n          padding-bottom: 24px;\n        }\n\n        .form-placeholder {\n          @apply --layout-vertical;\n          @apply --layout-center-center;\n          height: 96px;\n        }\n\n        [hidden]: {\n          display: none;\n        }\n\n        .card-actions {\n          @apply --layout-horizontal;\n          @apply --layout-justified;\n        }\n      </style>\n      <ha-card>\n        <div class="card-content">\n          <div class="device-picker">\n            <paper-dropdown-menu\n              label="[[label]]"\n              class="flex"\n              disabled="[[!entities.length]]"\n            >\n              <paper-listbox\n                slot="dropdown-content"\n                selected="{{selectedEntity}}"\n              >\n                <template is="dom-repeat" items="[[entities]]" as="state">\n                  <paper-item>[[computeSelectCaption(state)]]</paper-item>\n                </template>\n              </paper-listbox>\n            </paper-dropdown-menu>\n          </div>\n\n          <div class="form-container">\n            <template is="dom-if" if="[[computeShowPlaceholder(formState)]]">\n              <div class="form-placeholder">\n                <template is="dom-if" if="[[computeShowNoDevices(formState)]]">\n                  No entities found! :-(\n                </template>\n\n                <template is="dom-if" if="[[computeShowSpinner(formState)]]">\n                  <ha-circular-progress\n                    active=""\n                    alt="[[formState]]"\n                  ></ha-circular-progress>\n                  [[formState]]\n                </template>\n              </div>\n            </template>\n\n            <div hidden$="[[!computeShowForm(formState)]]" id="form"></div>\n          </div>\n        </div>\n        <div class="card-actions">\n          <mwc-button\n            on-click="saveEntity"\n            disabled="[[computeShowPlaceholder(formState)]]"\n            >SAVE</mwc-button\n          >\n          <template is="dom-if" if="[[allowDelete]]">\n            <mwc-button\n              class="warning"\n              on-click="deleteEntity"\n              disabled="[[computeShowPlaceholder(formState)]]"\n              >DELETE</mwc-button\n            >\n          </template>\n        </div>\n      </ha-card>\n    ']);return l=function(){return t},t}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function d(t,e,n){return(d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=b(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function y(t,e){return(y=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function h(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=b(t);if(e){var o=b(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m(this,n)}}function m(t,e){return!e||"object"!==u(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function b(t){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var v=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&y(t,e)}(a,t);var e,n,o,i=h(a);function a(){return f(this,a),i.apply(this,arguments)}return e=a,o=[{key:"template",get:function(){return(0,r.d)(l())}},{key:"properties",get:function(){return{hass:{type:Object,observer:"hassChanged"},label:{type:String,value:"Device"},entities:{type:Array,observer:"entitiesChanged"},allowDelete:{type:Boolean,value:!1},selectedEntity:{type:Number,value:-1,observer:"entityChanged"},formState:{type:String,value:"no-devices"},config:{type:Object}}}}],(n=[{key:"connectedCallback",value:function(){d(b(a.prototype),"connectedCallback",this).call(this),this.formEl=document.createElement(this.config.component),this.formEl.hass=this.hass,this.$.form.appendChild(this.formEl),this.entityChanged(this.selectedEntity)}},{key:"computeSelectCaption",value:function(t){return this.config.computeSelectCaption?this.config.computeSelectCaption(t):(0,c.C)(t)}},{key:"computeShowNoDevices",value:function(t){return"no-devices"===t}},{key:"computeShowSpinner",value:function(t){return"loading"===t||"saving"===t}},{key:"computeShowPlaceholder",value:function(t){return"editing"!==t}},{key:"computeShowForm",value:function(t){return"editing"===t}},{key:"hassChanged",value:function(t){this.formEl&&(this.formEl.hass=t)}},{key:"entitiesChanged",value:function(t,e){if(0!==t.length)if(e){var n=e[this.selectedEntity].entity_id,r=t.findIndex((function(t){return t.entity_id===n}));-1===r?this.selectedEntity=0:r!==this.selectedEntity&&(this.selectedEntity=r)}else this.selectedEntity=0;else this.formState="no-devices"}},{key:"entityChanged",value:function(t){if(this.entities&&this.formEl){var e=this.entities[t];if(e){this.formState="loading";var n=this;this.formEl.loadEntity(e).then((function(){n.formState="editing"}))}}}},{key:"saveEntity",value:function(){this.formState="saving";var t=this;this.formEl.saveEntity().then((function(){t.formState="editing"}))}}])&&p(e.prototype,n),o&&p(e,o),a}(o.H3);customElements.define("ha-entity-config",v);var g=n(29311),w=n(27322),O=n(29821),k=(n(40138),n(18691));n(10983);function E(t){return(E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _(){var t=function(t,e){e||(e=t.slice(0));return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}(['\n      <style>\n        paper-dropdown-menu {\n          margin: -9px 0;\n        }\n      </style>\n      <paper-dropdown-menu\n        label="[[item.description]]"\n        disabled="[[item.secondary]]"\n        selected-item-label="{{item.value}}"\n        dynamic-align=""\n      >\n        <paper-listbox\n          slot="dropdown-content"\n          selected="[[computeSelected(item)]]"\n        >\n          <template is="dom-repeat" items="[[getOptions(item)]]" as="option">\n            <paper-item>[[option]]</paper-item>\n          </template>\n        </paper-listbox>\n      </paper-dropdown-menu>\n    ']);return _=function(){return t},t}function S(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function j(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function A(t,e){return(A=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function x(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=z(t);if(e){var o=z(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return P(this,n)}}function P(t,e){return!e||"object"!==E(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function z(t){return(z=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var C=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&A(t,e)}(c,t);var e,n,o,i=x(c);function c(){return S(this,c),i.apply(this,arguments)}return e=c,o=[{key:"template",get:function(){return(0,r.d)(_())}},{key:"properties",get:function(){return{item:{type:Object,notifies:!0}}}}],(n=[{key:"getOptions",value:function(t){var e=t.domain||"*",n=t.options[e]||t.options["*"];return n?n.sort():(this.item.type="string",this.fire("item-changed"),[])}},{key:"computeSelected",value:function(t){return this.getOptions(t).indexOf(t.value)}}])&&j(e.prototype,n),o&&j(e,o),c}((0,n(11052).I)(o.H3));customElements.define("ha-customize-array",C);n(32296);function T(t){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function D(){var t=function(t,e){e||(e=t.slice(0));return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}(['\n      <paper-checkbox disabled="[[item.secondary]]" checked="{{item.value}}">\n        [[item.description]]\n      </paper-checkbox>\n    ']);return D=function(){return t},t}function R(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function N(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function I(t,e){return(I=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function F(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=B(t);if(e){var o=B(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return L(this,n)}}function L(t,e){return!e||"object"!==T(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function B(t){return(B=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var U=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&I(t,e)}(c,t);var e,n,o,i=F(c);function c(){return R(this,c),i.apply(this,arguments)}return e=c,o=[{key:"template",get:function(){return(0,r.d)(D())}},{key:"properties",get:function(){return{item:{type:Object,notifies:!0}}}}],(n=null)&&N(e.prototype,n),o&&N(e,o),c}(o.H3);customElements.define("ha-customize-boolean",U);n(30879),n(16509);function G(t){return(G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function H(){var t=function(t,e){e||(e=t.slice(0));return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}(['\n      <style>\n        :host {\n          @apply --layout-horizontal;\n        }\n        .icon-image {\n          border: 1px solid grey;\n          padding: 8px;\n          margin-right: 20px;\n          margin-top: 10px;\n        }\n      </style>\n      <ha-icon class="icon-image" icon="[[item.value]]"></ha-icon>\n      <paper-input\n        disabled="[[item.secondary]]"\n        label="icon"\n        value="{{item.value}}"\n      >\n      </paper-input>\n    ']);return H=function(){return t},t}function M(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function W(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function $(t,e){return($=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Z(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=J(t);if(e){var o=J(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Y(this,n)}}function Y(t,e){return!e||"object"!==G(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function J(t){return(J=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var V=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&$(t,e)}(c,t);var e,n,o,i=Z(c);function c(){return M(this,c),i.apply(this,arguments)}return e=c,o=[{key:"template",get:function(){return(0,r.d)(H())}},{key:"properties",get:function(){return{item:{type:Object,notifies:!0}}}}],(n=null)&&W(e.prototype,n),o&&W(e,o),c}(o.H3);function K(t){return(K="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Q(){var t=function(t,e){e||(e=t.slice(0));return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}(['\n      <style>\n        :host {\n          @apply --layout-horizontal;\n        }\n        paper-input {\n          @apply --layout-flex;\n        }\n        .key {\n          padding-right: 20px;\n        }\n      </style>\n      <paper-input\n        disabled="[[item.secondary]]"\n        class="key"\n        label="Attribute name"\n        value="{{item.attribute}}"\n      >\n      </paper-input>\n      <paper-input\n        disabled="[[item.secondary]]"\n        label="Attribute value"\n        value="{{item.value}}"\n      >\n      </paper-input>\n    ']);return Q=function(){return t},t}function q(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function X(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function tt(t,e){return(tt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function et(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=rt(t);if(e){var o=rt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return nt(this,n)}}function nt(t,e){return!e||"object"!==K(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function rt(t){return(rt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}customElements.define("ha-customize-icon",V);var ot=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&tt(t,e)}(c,t);var e,n,o,i=et(c);function c(){return q(this,c),i.apply(this,arguments)}return e=c,o=[{key:"template",get:function(){return(0,r.d)(Q())}},{key:"properties",get:function(){return{item:{type:Object,notifies:!0}}}}],(n=null)&&X(e.prototype,n),o&&X(e,o),c}(o.H3);function it(t){return(it="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ct(){var t=function(t,e){e||(e=t.slice(0));return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}(['\n      <paper-input\n        disabled="[[item.secondary]]"\n        label="[[getLabel(item)]]"\n        value="{{item.value}}"\n      >\n      </paper-input>\n    ']);return ct=function(){return t},t}function at(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function st(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ut(t,e){return(ut=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function lt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=pt(t);if(e){var o=pt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ft(this,n)}}function ft(t,e){return!e||"object"!==it(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function pt(t){return(pt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}customElements.define("ha-customize-key-value",ot);var dt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ut(t,e)}(c,t);var e,n,o,i=lt(c);function c(){return at(this,c),i.apply(this,arguments)}return e=c,o=[{key:"template",get:function(){return(0,r.d)(ct())}},{key:"properties",get:function(){return{item:{type:Object,notifies:!0}}}}],(n=[{key:"getLabel",value:function(t){return t.description+("json"===t.type?" (JSON formatted)":"")}}])&&st(e.prototype,n),o&&st(e,o),c}(o.H3);function yt(t){return(yt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ht(){var t=function(t,e){e||(e=t.slice(0));return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}(['\n      <style include="ha-form-style">\n        :host {\n          display: block;\n          position: relative;\n          padding-right: 40px;\n        }\n\n        .button {\n          position: absolute;\n          margin-top: -20px;\n          top: 50%;\n          right: 0;\n        }\n      </style>\n      <div id="wrapper" class="form-group"></div>\n      <ha-icon-button\n        class="button"\n        icon="[[getIcon(item.secondary)]]"\n        on-click="tapButton"\n      ></ha-icon-button>\n    ']);return ht=function(){return t},t}function mt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function bt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function vt(t,e){return(vt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function gt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ot(t);if(e){var o=Ot(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return wt(this,n)}}function wt(t,e){return!e||"object"!==yt(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Ot(t){return(Ot=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}customElements.define("ha-customize-string",dt);var kt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&vt(t,e)}(c,t);var e,n,o,i=gt(c);function c(){return mt(this,c),i.apply(this,arguments)}return e=c,o=[{key:"template",get:function(){return(0,r.d)(ht())}},{key:"properties",get:function(){return{item:{type:Object,notify:!0,observer:"itemObserver"}}}}],(n=[{key:"tapButton",value:function(){this.item.secondary?this.item=Object.assign({},this.item,{secondary:!1}):this.item=Object.assign({},this.item,{closed:!0})}},{key:"getIcon",value:function(t){return t?"hass:pencil":"hass:close"}},{key:"itemObserver",value:function(t){var e,n=this,r=this.$.wrapper,o=O.Z.TYPE_TO_TAG[t.type].toUpperCase();r.lastChild&&r.lastChild.tagName===o?e=r.lastChild:(r.lastChild&&r.removeChild(r.lastChild),this.$.child=e=document.createElement(o.toLowerCase()),e.className="form-control",e.addEventListener("item-changed",(function(){n.item=Object.assign({},e.item)}))),e.setProperties({item:this.item}),null===e.parentNode&&r.appendChild(e)}}])&&bt(e.prototype,n),o&&bt(e,o),c}(o.H3);function Et(t){return(Et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _t(){var t=function(t,e){e||(e=t.slice(0));return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}(['\n      <style>\n        [hidden] {\n          display: none;\n        }\n      </style>\n      <template is="dom-repeat" items="{{attributes}}" mutable-data="">\n        <ha-customize-attribute item="{{item}}" hidden$="[[item.closed]]">\n        </ha-customize-attribute>\n      </template>\n    ']);return _t=function(){return t},t}function St(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function jt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function At(t,e){return(At=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function xt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=zt(t);if(e){var o=zt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Pt(this,n)}}function Pt(t,e){return!e||"object"!==Et(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function zt(t){return(zt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}customElements.define("ha-customize-attribute",kt);var Ct=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&At(t,e)}(c,t);var e,n,o,i=xt(c);function c(){return St(this,c),i.apply(this,arguments)}return e=c,o=[{key:"template",get:function(){return(0,r.d)(_t())}},{key:"properties",get:function(){return{attributes:{type:Array,notify:!0}}}}],(n=null)&&jt(e.prototype,n),o&&jt(e,o),c}((0,k.E)(o.H3));function Tt(t){return(Tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Dt(){var t=function(t,e){e||(e=t.slice(0));return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}(['\n      <style include="iron-flex ha-style ha-form-style">\n        .warning {\n          color: red;\n        }\n\n        .attributes-text {\n          padding-left: 20px;\n        }\n      </style>\n      <template\n        is="dom-if"\n        if="[[computeShowWarning(localConfig, globalConfig)]]"\n      >\n        <div class="warning">\n          [[localize(\'ui.panel.config.customize.warning.include_sentence\')]]\n          <a\n            href="[[_computeDocumentationUrl(hass)]]"\n            target="_blank"\n            rel="noreferrer"\n            >[[localize(\'ui.panel.config.customize.warning.include_link\')]]</a\n          >.<br />\n          [[localize(\'ui.panel.config.customize.warning.not_applied\')]]\n        </div>\n      </template>\n      <template is="dom-if" if="[[hasLocalAttributes]]">\n        <p class="attributes-text">\n          [[localize(\'ui.panel.config.customize.attributes_customize\')]]<br />\n        </p>\n        <ha-form-customize-attributes\n          attributes="{{localAttributes}}"\n        ></ha-form-customize-attributes>\n      </template>\n      <template is="dom-if" if="[[hasGlobalAttributes]]">\n        <p class="attributes-text">\n          [[localize(\'ui.panel.config.customize.attributes_outside\')]]<br />\n          [[localize(\'ui.panel.config.customize.different_include\')]]\n        </p>\n        <ha-form-customize-attributes\n          attributes="{{globalAttributes}}"\n        ></ha-form-customize-attributes>\n      </template>\n      <template is="dom-if" if="[[hasExistingAttributes]]">\n        <p class="attributes-text">\n          [[localize(\'ui.panel.config.customize.attributes_set\')]]<br />\n          [[localize(\'ui.panel.config.customize.attributes_override\')]]\n        </p>\n        <ha-form-customize-attributes\n          attributes="{{existingAttributes}}"\n        ></ha-form-customize-attributes>\n      </template>\n      <template is="dom-if" if="[[hasNewAttributes]]">\n        <p class="attributes-text">\n          [[localize(\'ui.panel.config.customize.attributes_not_set\')]]\n        </p>\n        <ha-form-customize-attributes\n          attributes="{{newAttributes}}"\n        ></ha-form-customize-attributes>\n      </template>\n      <div class="form-group">\n        <paper-dropdown-menu\n          label="[[localize(\'ui.panel.config.customize.pick_attribute\')]]"\n          class="flex"\n          dynamic-align=""\n        >\n          <paper-listbox\n            slot="dropdown-content"\n            selected="{{selectedNewAttribute}}"\n          >\n            <template\n              is="dom-repeat"\n              items="[[newAttributesOptions]]"\n              as="option"\n            >\n              <paper-item>[[option]]</paper-item>\n            </template>\n          </paper-listbox>\n        </paper-dropdown-menu>\n      </div>\n    ']);return Dt=function(){return t},t}function Rt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Nt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function It(t,e){return(It=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ft(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Bt(t);if(e){var o=Bt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Lt(this,n)}}function Lt(t,e){return!e||"object"!==Tt(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Bt(t){return(Bt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}customElements.define("ha-form-customize-attributes",Ct);var Ut=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&It(t,e)}(a,t);var e,n,o,c=Ft(a);function a(){return Rt(this,a),c.apply(this,arguments)}return e=a,o=[{key:"template",get:function(){return(0,r.d)(Dt())}},{key:"properties",get:function(){return{hass:{type:Object},entity:Object,localAttributes:{type:Array,computed:"computeLocalAttributes(localConfig)"},hasLocalAttributes:Boolean,globalAttributes:{type:Array,computed:"computeGlobalAttributes(localConfig, globalConfig)"},hasGlobalAttributes:Boolean,existingAttributes:{type:Array,computed:"computeExistingAttributes(localConfig, globalConfig, entity)"},hasExistingAttributes:Boolean,newAttributes:{type:Array,value:[]},hasNewAttributes:Boolean,newAttributesOptions:Array,selectedNewAttribute:{type:Number,value:-1,observer:"selectedNewAttributeObserver"},localConfig:Object,globalConfig:Object}}},{key:"observers",get:function(){return["attributesObserver(localAttributes.*, globalAttributes.*, existingAttributes.*, newAttributes.*)"]}}],(n=[{key:"_initOpenObject",value:function(t,e,n,r){return Object.assign({attribute:t,value:e,closed:!1,domain:(0,i.N)(this.entity),secondary:n,description:t},r)}},{key:"loadEntity",value:function(t){var e=this;return this.entity=t,this.hass.callApi("GET","config/customize/config/"+t.entity_id).then((function(t){e.localConfig=t.local,e.globalConfig=t.global,e.newAttributes=[]}))}},{key:"saveEntity",value:function(){var t={};this.localAttributes.concat(this.globalAttributes,this.existingAttributes,this.newAttributes).forEach((function(e){if(!e.closed&&!e.secondary&&e.attribute&&e.value){var n="json"===e.type?JSON.parse(e.value):e.value;n&&(t[e.attribute]=n)}}));var e=this.entity.entity_id;return this.hass.callApi("POST","config/customize/config/"+e,t)}},{key:"_computeSingleAttribute",value:function(t,e,n){var r=O.Z.LOGIC_STATE_ATTRIBUTES[t]||{type:O.Z.UNKNOWN_TYPE};return this._initOpenObject(t,"json"===r.type?JSON.stringify(e):e,n,r)}},{key:"_computeAttributes",value:function(t,e,n){var r=this;return e.map((function(e){return r._computeSingleAttribute(e,t[e],n)}))}},{key:"_computeDocumentationUrl",value:function(t){return(0,w.R)(t,"/docs/configuration/customizing-devices/#customization-using-the-ui")}},{key:"computeLocalAttributes",value:function(t){if(!t)return[];var e=Object.keys(t);return this._computeAttributes(t,e,!1)}},{key:"computeGlobalAttributes",value:function(t,e){if(!t||!e)return[];var n=Object.keys(t),r=Object.keys(e).filter((function(t){return!n.includes(t)}));return this._computeAttributes(e,r,!0)}},{key:"computeExistingAttributes",value:function(t,e,n){if(!t||!e||!n)return[];var r=Object.keys(t),o=Object.keys(e),i=Object.keys(n.attributes).filter((function(t){return!r.includes(t)&&!o.includes(t)}));return this._computeAttributes(n.attributes,i,!0)}},{key:"computeShowWarning",value:function(t,e){return!(!t||!e)&&Object.keys(t).some((function(n){return JSON.stringify(e[n])!==JSON.stringify(t[n])}))}},{key:"filterFromAttributes",value:function(t){return function(e){return!t||t.every((function(t){return t.attribute!==e||t.closed}))}}},{key:"getNewAttributesOptions",value:function(t,e,n,r){var o=this;return Object.keys(O.Z.LOGIC_STATE_ATTRIBUTES).filter((function(t){var e=O.Z.LOGIC_STATE_ATTRIBUTES[t];return e&&(!e.domains||!o.entity||e.domains.includes((0,i.N)(o.entity)))})).filter(this.filterFromAttributes(t)).filter(this.filterFromAttributes(e)).filter(this.filterFromAttributes(n)).filter(this.filterFromAttributes(r)).sort().concat("Other")}},{key:"selectedNewAttributeObserver",value:function(t){if(!(t<0)){var e=this.newAttributesOptions[t];if(t===this.newAttributesOptions.length-1){var n=this._initOpenObject("","",!1,{type:O.Z.ADD_TYPE});return this.push("newAttributes",n),void(this.selectedNewAttribute=-1)}var r=this.localAttributes.findIndex((function(t){return t.attribute===e}));if(r>=0)return this.set("localAttributes."+r+".closed",!1),void(this.selectedNewAttribute=-1);if((r=this.globalAttributes.findIndex((function(t){return t.attribute===e})))>=0)return this.set("globalAttributes."+r+".closed",!1),void(this.selectedNewAttribute=-1);if((r=this.existingAttributes.findIndex((function(t){return t.attribute===e})))>=0)return this.set("existingAttributes."+r+".closed",!1),void(this.selectedNewAttribute=-1);if((r=this.newAttributes.findIndex((function(t){return t.attribute===e})))>=0)return this.set("newAttributes."+r+".closed",!1),void(this.selectedNewAttribute=-1);var o=this._computeSingleAttribute(e,"",!1);this.push("newAttributes",o),this.selectedNewAttribute=-1}}},{key:"attributesObserver",value:function(){this.hasLocalAttributes=this.localAttributes&&this.localAttributes.some((function(t){return!t.closed})),this.hasGlobalAttributes=this.globalAttributes&&this.globalAttributes.some((function(t){return!t.closed})),this.hasExistingAttributes=this.existingAttributes&&this.existingAttributes.some((function(t){return!t.closed})),this.hasNewAttributes=this.newAttributes&&this.newAttributes.some((function(t){return!t.closed})),this.newAttributesOptions=this.getNewAttributesOptions(this.localAttributes,this.globalAttributes,this.existingAttributes,this.newAttributes)}}])&&Nt(e.prototype,n),o&&Nt(e,o),a}((0,s.Z)(o.H3));function Gt(t){return(Gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ht(){var t=function(t,e){e||(e=t.slice(0));return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}(['\n      <style include="ha-style"></style>\n      <hass-tabs-subpage\n        hass="[[hass]]"\n        narrow="[[narrow]]"\n        route="[[route]]"\n        back-path="/config"\n        tabs="[[_computeTabs()]]"\n        show-advanced="[[showAdvanced]]"\n      >\n        <div class$="[[computeClasses(isWide)]]">\n          <ha-config-section is-wide="[[isWide]]">\n            <span slot="header">\n              [[localize(\'ui.panel.config.customize.picker.header\')]]\n            </span>\n            <span slot="introduction">\n              [[localize(\'ui.panel.config.customize.picker.introduction\')]]\n              <br />\n              <a\n                href="[[_computeDocumentationUrl(hass)]]"\n                target="_blank"\n                rel="noreferrer"\n              >\n                [[localize("ui.panel.config.customize.picker.documentation")]]\n              </a>\n            </span>\n            <ha-entity-config\n              hass="[[hass]]"\n              label="[[localize(\'ui.panel.config.customize.picker.entity\')]]"\n              entities="[[entities]]"\n              config="[[entityConfig]]"\n            >\n            </ha-entity-config>\n          </ha-config-section>\n        </div>\n      </hass-tabs-subpage>\n    ']);return Ht=function(){return t},t}function Mt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Wt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function $t(t,e){return($t=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Zt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Jt(t);if(e){var o=Jt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Yt(this,n)}}function Yt(t,e){return!e||"object"!==Gt(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Jt(t){return(Jt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}customElements.define("ha-form-customize",Ut);var Vt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&$t(t,e)}(u,t);var e,n,o,s=Zt(u);function u(){return Mt(this,u),s.apply(this,arguments)}return e=u,o=[{key:"template",get:function(){return(0,r.d)(Ht())}},{key:"properties",get:function(){return{hass:Object,isWide:Boolean,narrow:Boolean,route:Object,showAdvanced:Boolean,entities:{type:Array,computed:"computeEntities(hass)"},entityConfig:{type:Object,value:{component:"ha-form-customize",computeSelectCaption:function(t){return(0,c.C)(t)+" ("+(0,i.N)(t)+")"}}}}}}],(n=[{key:"computeClasses",value:function(t){return t?"content":"content narrow"}},{key:"_backTapped",value:function(){history.back()}},{key:"_computeTabs",value:function(){return g.configSections.general}},{key:"computeEntities",value:function(t){return Object.keys(t.states).map((function(e){return t.states[e]})).sort(a.y)}},{key:"_computeDocumentationUrl",value:function(t){return(0,w.R)(t,"/docs/configuration/customizing-devices/#customization-using-the-ui")}}])&&Wt(e.prototype,n),o&&Wt(e,o),u}((0,s.Z)(o.H3));customElements.define("ha-config-customize",Vt)},88165:function(t,e,n){"use strict";var r=n(15652),o=n(81471);function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(){var t=s(["\n      :host {\n        display: block;\n      }\n      .content {\n        padding: 28px 20px 0;\n        max-width: 1040px;\n        margin: 0 auto;\n      }\n\n      .layout {\n        display: flex;\n      }\n\n      .horizontal {\n        flex-direction: row;\n      }\n\n      .vertical {\n        flex-direction: column;\n      }\n\n      .flex-auto {\n        flex: 1 1 auto;\n      }\n\n      .header {\n        font-family: var(--paper-font-headline_-_font-family);\n        -webkit-font-smoothing: var(\n          --paper-font-headline_-_-webkit-font-smoothing\n        );\n        font-size: var(--paper-font-headline_-_font-size);\n        font-weight: var(--paper-font-headline_-_font-weight);\n        letter-spacing: var(--paper-font-headline_-_letter-spacing);\n        line-height: var(--paper-font-headline_-_line-height);\n        opacity: var(--dark-primary-opacity);\n      }\n\n      .together {\n        margin-top: 32px;\n      }\n\n      .intro {\n        font-family: var(--paper-font-subhead_-_font-family);\n        -webkit-font-smoothing: var(\n          --paper-font-subhead_-_-webkit-font-smoothing\n        );\n        font-weight: var(--paper-font-subhead_-_font-weight);\n        line-height: var(--paper-font-subhead_-_line-height);\n        width: 100%;\n        max-width: 400px;\n        margin-right: 40px;\n        opacity: var(--dark-primary-opacity);\n        font-size: 14px;\n        padding-bottom: 20px;\n      }\n\n      .panel {\n        margin-top: -24px;\n      }\n\n      .panel ::slotted(*) {\n        margin-top: 24px;\n        display: block;\n      }\n\n      .narrow.content {\n        max-width: 640px;\n      }\n      .narrow .together {\n        margin-top: 20px;\n      }\n      .narrow .intro {\n        padding-bottom: 20px;\n        margin-right: 0;\n        max-width: 500px;\n      }\n    "]);return c=function(){return t},t}function a(){var t=s(['\n      <div\n        class="content ','"\n      >\n        <div class="header"><slot name="header"></slot></div>\n        <div\n          class="together layout ','"\n        >\n          <div class="intro"><slot name="introduction"></slot></div>\n          <div class="panel flex-auto"><slot></slot></div>\n        </div>\n      </div>\n    ']);return a=function(){return t},t}function s(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=y(t);if(e){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p(this,n)}}function p(t,e){return!e||"object"!==i(e)&&"function"!=typeof e?d(t):e}function d(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function y(t){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function h(){h=function(){return t};var t={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(t,e){["method","field"].forEach((function(n){e.forEach((function(e){e.kind===n&&"own"===e.placement&&this.defineClassElement(t,e)}),this)}),this)},initializeClassElements:function(t,e){var n=t.prototype;["method","field"].forEach((function(r){e.forEach((function(e){var o=e.placement;if(e.kind===r&&("static"===o||"prototype"===o)){var i="static"===o?t:n;this.defineClassElement(i,e)}}),this)}),this)},defineClassElement:function(t,e){var n=e.descriptor;if("field"===e.kind){var r=e.initializer;n={enumerable:n.enumerable,writable:n.writable,configurable:n.configurable,value:void 0===r?void 0:r.call(t)}}Object.defineProperty(t,e.key,n)},decorateClass:function(t,e){var n=[],r=[],o={static:[],prototype:[],own:[]};if(t.forEach((function(t){this.addElementPlacement(t,o)}),this),t.forEach((function(t){if(!v(t))return n.push(t);var e=this.decorateElement(t,o);n.push(e.element),n.push.apply(n,e.extras),r.push.apply(r,e.finishers)}),this),!e)return{elements:n,finishers:r};var i=this.decorateConstructor(n,e);return r.push.apply(r,i.finishers),i.finishers=r,i},addElementPlacement:function(t,e,n){var r=e[t.placement];if(!n&&-1!==r.indexOf(t.key))throw new TypeError("Duplicated element ("+t.key+")");r.push(t.key)},decorateElement:function(t,e){for(var n=[],r=[],o=t.decorators,i=o.length-1;i>=0;i--){var c=e[t.placement];c.splice(c.indexOf(t.key),1);var a=this.fromElementDescriptor(t),s=this.toElementFinisherExtras((0,o[i])(a)||a);t=s.element,this.addElementPlacement(t,e),s.finisher&&r.push(s.finisher);var u=s.extras;if(u){for(var l=0;l<u.length;l++)this.addElementPlacement(u[l],e);n.push.apply(n,u)}}return{element:t,finishers:r,extras:n}},decorateConstructor:function(t,e){for(var n=[],r=e.length-1;r>=0;r--){var o=this.fromClassDescriptor(t),i=this.toClassDescriptor((0,e[r])(o)||o);if(void 0!==i.finisher&&n.push(i.finisher),void 0!==i.elements){t=i.elements;for(var c=0;c<t.length-1;c++)for(var a=c+1;a<t.length;a++)if(t[c].key===t[a].key&&t[c].placement===t[a].placement)throw new TypeError("Duplicated element ("+t[c].key+")")}}return{elements:t,finishers:n}},fromElementDescriptor:function(t){var e={kind:t.kind,key:t.key,placement:t.placement,descriptor:t.descriptor};return Object.defineProperty(e,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===t.kind&&(e.initializer=t.initializer),e},toElementDescriptors:function(t){var e;if(void 0!==t)return(e=t,function(t){if(Array.isArray(t))return t}(e)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(e)||function(t,e){if(t){if("string"==typeof t)return k(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(t,e):void 0}}(e)||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(t){var e=this.toElementDescriptor(t);return this.disallowProperty(t,"finisher","An element descriptor"),this.disallowProperty(t,"extras","An element descriptor"),e}),this)},toElementDescriptor:function(t){var e=String(t.kind);if("method"!==e&&"field"!==e)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+e+'"');var n=O(t.key),r=String(t.placement);if("static"!==r&&"prototype"!==r&&"own"!==r)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 "'+r+'"');var o=t.descriptor;this.disallowProperty(t,"elements","An element descriptor");var i={kind:e,key:n,placement:r,descriptor:Object.assign({},o)};return"field"!==e?this.disallowProperty(t,"initializer","A method descriptor"):(this.disallowProperty(o,"get","The property descriptor of a field descriptor"),this.disallowProperty(o,"set","The property descriptor of a field descriptor"),this.disallowProperty(o,"value","The property descriptor of a field descriptor"),i.initializer=t.initializer),i},toElementFinisherExtras:function(t){return{element:this.toElementDescriptor(t),finisher:w(t,"finisher"),extras:this.toElementDescriptors(t.extras)}},fromClassDescriptor:function(t){var e={kind:"class",elements:t.map(this.fromElementDescriptor,this)};return Object.defineProperty(e,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),e},toClassDescriptor:function(t){var e=String(t.kind);if("class"!==e)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+e+'"');this.disallowProperty(t,"key","A class descriptor"),this.disallowProperty(t,"placement","A class descriptor"),this.disallowProperty(t,"descriptor","A class descriptor"),this.disallowProperty(t,"initializer","A class descriptor"),this.disallowProperty(t,"extras","A class descriptor");var n=w(t,"finisher");return{elements:this.toElementDescriptors(t.elements),finisher:n}},runClassFinishers:function(t,e){for(var n=0;n<e.length;n++){var r=(0,e[n])(t);if(void 0!==r){if("function"!=typeof r)throw new TypeError("Finishers must return a constructor.");t=r}}return t},disallowProperty:function(t,e,n){if(void 0!==t[e])throw new TypeError(n+" can't have a ."+e+" property.")}};return t}function m(t){var e,n=O(t.key);"method"===t.kind?e={value:t.value,writable:!0,configurable:!0,enumerable:!1}:"get"===t.kind?e={get:t.value,configurable:!0,enumerable:!1}:"set"===t.kind?e={set:t.value,configurable:!0,enumerable:!1}:"field"===t.kind&&(e={configurable:!0,writable:!0,enumerable:!0});var r={kind:"field"===t.kind?"field":"method",key:n,placement:t.static?"static":"field"===t.kind?"own":"prototype",descriptor:e};return t.decorators&&(r.decorators=t.decorators),"field"===t.kind&&(r.initializer=t.value),r}function b(t,e){void 0!==t.descriptor.get?e.descriptor.get=t.descriptor.get:e.descriptor.set=t.descriptor.set}function v(t){return t.decorators&&t.decorators.length}function g(t){return void 0!==t&&!(void 0===t.value&&void 0===t.writable)}function w(t,e){var n=t[e];if(void 0!==n&&"function"!=typeof n)throw new TypeError("Expected '"+e+"' to be a function");return n}function O(t){var e=function(t,e){if("object"!==i(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===i(e)?e:String(e)}function k(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}!function(t,e,n,r){var o=h();if(r)for(var i=0;i<r.length;i++)o=r[i](o);var c=e((function(t){o.initializeInstanceElements(t,a.elements)}),n),a=o.decorateClass(function(t){for(var e=[],n=function(t){return"method"===t.kind&&t.key===i.key&&t.placement===i.placement},r=0;r<t.length;r++){var o,i=t[r];if("method"===i.kind&&(o=e.find(n)))if(g(i.descriptor)||g(o.descriptor)){if(v(i)||v(o))throw new ReferenceError("Duplicated methods ("+i.key+") can't be decorated.");o.descriptor=i.descriptor}else{if(v(i)){if(v(o))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+i.key+").");o.decorators=i.decorators}b(i,o)}else e.push(i)}return e}(c.d.map(m)),t);o.initializeClassElements(c.F,a.elements),o.runClassFinishers(c.F,a.finishers)}([(0,r.Mo)("ha-config-section")],(function(t,e){return{F:function(e){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(r,e);var n=f(r);function r(){var e;u(this,r);for(var o=arguments.length,i=new Array(o),c=0;c<o;c++)i[c]=arguments[c];return e=n.call.apply(n,[this].concat(i)),t(d(e)),e}return r}(e),d:[{kind:"field",decorators:[(0,r.Cb)()],key:"isWide",value:function(){return!1}},{kind:"method",key:"render",value:function(){return(0,r.dy)(a(),(0,o.$)({narrow:!this.isWide}),(0,o.$)({narrow:!this.isWide,vertical:!this.isWide,horizontal:this.isWide}))}},{kind:"get",static:!0,key:"styles",value:function(){return(0,r.iv)(c())}}]}}),r.oi)},40138:function(){var t=document.createElement("template");t.setAttribute("style","display: none;"),t.innerHTML='<dom-module id="ha-form-style">\n  <template>\n    <style>\n      .form-group {\n        @apply --layout-horizontal;\n        @apply --layout-center;\n        padding: 8px 16px;\n      }\n\n      .form-group label {\n        @apply --layout-flex-2;\n      }\n\n      .form-group .form-control {\n        @apply --layout-flex;\n      }\n\n      .form-group.vertical {\n        @apply --layout-vertical;\n        @apply --layout-start;\n      }\n\n      paper-dropdown-menu.form-control {\n        margin: -9px 0;\n      }\n    </style>\n  </template>\n</dom-module>',document.head.appendChild(t.content)},3426:function(t,e,n){"use strict";n(21384);var r=n(11654),o=document.createElement("template");o.setAttribute("style","display: none;"),o.innerHTML='<dom-module id="ha-style">\n  <template>\n    <style>\n    '.concat(r.Qx.cssText,"\n    </style>\n  </template>\n</dom-module>"),document.head.appendChild(o.content)},27322:function(t,e,n){"use strict";n.d(e,{R:function(){return r}});var r=function(t,e){return"https://www.iobroker.net/#".concat(t.language&&t.language.split("-")[0]||"en","/adapters/adapterref/iobroker.lovelace/README.md")}},29821:function(t,e){"use strict";var n={DOMAIN_DEVICE_CLASS:{binary_sensor:["battery","cold","connectivity","door","garage_door","gas","heat","light","lock","moisture","motion","moving","occupancy","opening","plug","power","presence","problem","safety","smoke","sound","vibration","window"],cover:["awning","blind","curtain","damper","door","garage","shade","shutter","window"],humidifier:["dehumidifier","humidifier"],sensor:["battery","humidity","illuminance","temperature","pressure","power","signal_strength","timestamp"],switch:["switch","outlet"]},UNKNOWN_TYPE:"json",ADD_TYPE:"key-value",TYPE_TO_TAG:{string:"ha-customize-string",json:"ha-customize-string",icon:"ha-customize-icon",boolean:"ha-customize-boolean",array:"ha-customize-array","key-value":"ha-customize-key-value"}};n.LOGIC_STATE_ATTRIBUTES=n.LOGIC_STATE_ATTRIBUTES||{entity_picture:void 0,friendly_name:{type:"string",description:"Name"},icon:{type:"icon"},emulated_hue:{type:"boolean",domains:["emulated_hue"]},emulated_hue_name:{type:"string",domains:["emulated_hue"]},haaska_hidden:void 0,haaska_name:void 0,supported_features:void 0,attribution:void 0,restored:void 0,custom_ui_more_info:{type:"string"},custom_ui_state_card:{type:"string"},device_class:{type:"array",options:n.DOMAIN_DEVICE_CLASS,description:"Device class",domains:["binary_sensor","cover","humidifier","sensor","switch"]},assumed_state:{type:"boolean",domains:["switch","light","cover","climate","fan","humidifier","group","water_heater"]},initial_state:{type:"string",domains:["automation"]},unit_of_measurement:{type:"string"}},e.Z=n}}]);
//# sourceMappingURL=chunk.44be42da95434527bcf9.js.map