UNPKG

iobroker.lovelace

Version:

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

3 lines 17.5 kB
/*! For license information please see chunk.490eb17d6033391f2ac1.js.LICENSE.txt */ (self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[681],{21157:function(n,e,t){"use strict";var i;t(65233);var o,l,r=(0,t(50856).d)(i||(o=['\n/* Most common used flex styles*/\n<dom-module id="iron-flex">\n <template>\n <style>\n .layout.horizontal,\n .layout.vertical {\n display: -ms-flexbox;\n display: -webkit-flex;\n display: flex;\n }\n\n .layout.inline {\n display: -ms-inline-flexbox;\n display: -webkit-inline-flex;\n display: inline-flex;\n }\n\n .layout.horizontal {\n -ms-flex-direction: row;\n -webkit-flex-direction: row;\n flex-direction: row;\n }\n\n .layout.vertical {\n -ms-flex-direction: column;\n -webkit-flex-direction: column;\n flex-direction: column;\n }\n\n .layout.wrap {\n -ms-flex-wrap: wrap;\n -webkit-flex-wrap: wrap;\n flex-wrap: wrap;\n }\n\n .layout.no-wrap {\n -ms-flex-wrap: nowrap;\n -webkit-flex-wrap: nowrap;\n flex-wrap: nowrap;\n }\n\n .layout.center,\n .layout.center-center {\n -ms-flex-align: center;\n -webkit-align-items: center;\n align-items: center;\n }\n\n .layout.center-justified,\n .layout.center-center {\n -ms-flex-pack: center;\n -webkit-justify-content: center;\n justify-content: center;\n }\n\n .flex {\n -ms-flex: 1 1 0.000000001px;\n -webkit-flex: 1;\n flex: 1;\n -webkit-flex-basis: 0.000000001px;\n flex-basis: 0.000000001px;\n }\n\n .flex-auto {\n -ms-flex: 1 1 auto;\n -webkit-flex: 1 1 auto;\n flex: 1 1 auto;\n }\n\n .flex-none {\n -ms-flex: none;\n -webkit-flex: none;\n flex: none;\n }\n </style>\n </template>\n</dom-module>\n/* Basic flexbox reverse styles */\n<dom-module id="iron-flex-reverse">\n <template>\n <style>\n .layout.horizontal-reverse,\n .layout.vertical-reverse {\n display: -ms-flexbox;\n display: -webkit-flex;\n display: flex;\n }\n\n .layout.horizontal-reverse {\n -ms-flex-direction: row-reverse;\n -webkit-flex-direction: row-reverse;\n flex-direction: row-reverse;\n }\n\n .layout.vertical-reverse {\n -ms-flex-direction: column-reverse;\n -webkit-flex-direction: column-reverse;\n flex-direction: column-reverse;\n }\n\n .layout.wrap-reverse {\n -ms-flex-wrap: wrap-reverse;\n -webkit-flex-wrap: wrap-reverse;\n flex-wrap: wrap-reverse;\n }\n </style>\n </template>\n</dom-module>\n/* Flexbox alignment */\n<dom-module id="iron-flex-alignment">\n <template>\n <style>\n /**\n * Alignment in cross axis.\n */\n .layout.start {\n -ms-flex-align: start;\n -webkit-align-items: flex-start;\n align-items: flex-start;\n }\n\n .layout.center,\n .layout.center-center {\n -ms-flex-align: center;\n -webkit-align-items: center;\n align-items: center;\n }\n\n .layout.end {\n -ms-flex-align: end;\n -webkit-align-items: flex-end;\n align-items: flex-end;\n }\n\n .layout.baseline {\n -ms-flex-align: baseline;\n -webkit-align-items: baseline;\n align-items: baseline;\n }\n\n /**\n * Alignment in main axis.\n */\n .layout.start-justified {\n -ms-flex-pack: start;\n -webkit-justify-content: flex-start;\n justify-content: flex-start;\n }\n\n .layout.center-justified,\n .layout.center-center {\n -ms-flex-pack: center;\n -webkit-justify-content: center;\n justify-content: center;\n }\n\n .layout.end-justified {\n -ms-flex-pack: end;\n -webkit-justify-content: flex-end;\n justify-content: flex-end;\n }\n\n .layout.around-justified {\n -ms-flex-pack: distribute;\n -webkit-justify-content: space-around;\n justify-content: space-around;\n }\n\n .layout.justified {\n -ms-flex-pack: justify;\n -webkit-justify-content: space-between;\n justify-content: space-between;\n }\n\n /**\n * Self alignment.\n */\n .self-start {\n -ms-align-self: flex-start;\n -webkit-align-self: flex-start;\n align-self: flex-start;\n }\n\n .self-center {\n -ms-align-self: center;\n -webkit-align-self: center;\n align-self: center;\n }\n\n .self-end {\n -ms-align-self: flex-end;\n -webkit-align-self: flex-end;\n align-self: flex-end;\n }\n\n .self-stretch {\n -ms-align-self: stretch;\n -webkit-align-self: stretch;\n align-self: stretch;\n }\n\n .self-baseline {\n -ms-align-self: baseline;\n -webkit-align-self: baseline;\n align-self: baseline;\n }\n\n /**\n * multi-line alignment in main axis.\n */\n .layout.start-aligned {\n -ms-flex-line-pack: start; /* IE10 */\n -ms-align-content: flex-start;\n -webkit-align-content: flex-start;\n align-content: flex-start;\n }\n\n .layout.end-aligned {\n -ms-flex-line-pack: end; /* IE10 */\n -ms-align-content: flex-end;\n -webkit-align-content: flex-end;\n align-content: flex-end;\n }\n\n .layout.center-aligned {\n -ms-flex-line-pack: center; /* IE10 */\n -ms-align-content: center;\n -webkit-align-content: center;\n align-content: center;\n }\n\n .layout.between-aligned {\n -ms-flex-line-pack: justify; /* IE10 */\n -ms-align-content: space-between;\n -webkit-align-content: space-between;\n align-content: space-between;\n }\n\n .layout.around-aligned {\n -ms-flex-line-pack: distribute; /* IE10 */\n -ms-align-content: space-around;\n -webkit-align-content: space-around;\n align-content: space-around;\n }\n </style>\n </template>\n</dom-module>\n/* Non-flexbox positioning helper styles */\n<dom-module id="iron-flex-factors">\n <template>\n <style>\n .flex,\n .flex-1 {\n -ms-flex: 1 1 0.000000001px;\n -webkit-flex: 1;\n flex: 1;\n -webkit-flex-basis: 0.000000001px;\n flex-basis: 0.000000001px;\n }\n\n .flex-2 {\n -ms-flex: 2;\n -webkit-flex: 2;\n flex: 2;\n }\n\n .flex-3 {\n -ms-flex: 3;\n -webkit-flex: 3;\n flex: 3;\n }\n\n .flex-4 {\n -ms-flex: 4;\n -webkit-flex: 4;\n flex: 4;\n }\n\n .flex-5 {\n -ms-flex: 5;\n -webkit-flex: 5;\n flex: 5;\n }\n\n .flex-6 {\n -ms-flex: 6;\n -webkit-flex: 6;\n flex: 6;\n }\n\n .flex-7 {\n -ms-flex: 7;\n -webkit-flex: 7;\n flex: 7;\n }\n\n .flex-8 {\n -ms-flex: 8;\n -webkit-flex: 8;\n flex: 8;\n }\n\n .flex-9 {\n -ms-flex: 9;\n -webkit-flex: 9;\n flex: 9;\n }\n\n .flex-10 {\n -ms-flex: 10;\n -webkit-flex: 10;\n flex: 10;\n }\n\n .flex-11 {\n -ms-flex: 11;\n -webkit-flex: 11;\n flex: 11;\n }\n\n .flex-12 {\n -ms-flex: 12;\n -webkit-flex: 12;\n flex: 12;\n }\n </style>\n </template>\n</dom-module>\n<dom-module id="iron-positioning">\n <template>\n <style>\n .block {\n display: block;\n }\n\n [hidden] {\n display: none !important;\n }\n\n .invisible {\n visibility: hidden !important;\n }\n\n .relative {\n position: relative;\n }\n\n .fit {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n }\n\n body.fullbleed {\n margin: 0;\n height: 100vh;\n }\n\n .scroll {\n -webkit-overflow-scrolling: touch;\n overflow: auto;\n }\n\n /* fixed position */\n .fixed-bottom,\n .fixed-left,\n .fixed-right,\n .fixed-top {\n position: fixed;\n }\n\n .fixed-top {\n top: 0;\n left: 0;\n right: 0;\n }\n\n .fixed-right {\n top: 0;\n right: 0;\n bottom: 0;\n }\n\n .fixed-bottom {\n right: 0;\n bottom: 0;\n left: 0;\n }\n\n .fixed-left {\n top: 0;\n bottom: 0;\n left: 0;\n }\n </style>\n </template>\n</dom-module>\n'],l||(l=o.slice(0)),i=Object.freeze(Object.defineProperties(o,{raw:{value:Object.freeze(l)}}))));r.setAttribute("style","display: none;"),document.head.appendChild(r.content)},24381:function(n,e,t){"use strict";t.d(e,{Q:function(){return i}});var i=function(n,e){return n?e.map((function(e){return e in n.attributes?"has-"+e:""})).filter((function(n){return""!==n})).join(" "):""}},9146:function(n,e,t){"use strict";t.d(e,{d:function(){return o}});var i=t(40095),o=function(n,e){return n&&n.attributes.supported_features?Object.keys(e).map((function(t){return(0,i.e)(n,Number(t))?e[t]:""})).filter((function(n){return""!==n})).join(" "):""}},73139:function(n,e,t){"use strict";var i,o=t(50856),l=t(28426);t(16509),t(46998);function r(n){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function a(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function s(n,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function f(n,e){return(f=Object.setPrototypeOf||function(n,e){return n.__proto__=e,n})(n,e)}function c(n){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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,i=p(n);if(e){var o=p(this).constructor;t=Reflect.construct(i,arguments,o)}else t=i.apply(this,arguments);return u(this,t)}}function u(n,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(n){if(void 0===n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(n):e}function p(n){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(n)}var d=function(n){!function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&f(n,e)}(u,n);var e,t,l,r=c(u);function u(){return a(this,u),r.apply(this,arguments)}return e=u,l=[{key:"template",get:function(){return(0,o.d)(i||(n=['\n <style>\n :host {\n display: block;\n }\n\n .title {\n margin: 5px 0 8px;\n color: var(--primary-text-color);\n }\n\n .slider-container {\n display: flex;\n }\n\n ha-icon {\n margin-top: 4px;\n color: var(--secondary-text-color);\n }\n\n ha-slider {\n flex-grow: 1;\n background-image: var(--ha-slider-background);\n border-radius: 4px;\n }\n </style>\n\n <div class="title">[[caption]]</div>\n <div class="extra-container"><slot name="extra"></slot></div>\n <div class="slider-container">\n <ha-icon icon="[[icon]]" hidden$="[[!icon]]"></ha-icon>\n <ha-slider\n min="[[min]]"\n max="[[max]]"\n step="[[step]]"\n pin="[[pin]]"\n disabled="[[disabled]]"\n value="{{value}}"\n ></ha-slider>\n </div>\n '],e||(e=n.slice(0)),i=Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))));var n,e}},{key:"properties",get:function(){return{caption:String,disabled:Boolean,min:Number,max:Number,pin:Boolean,step:Number,extra:{type:Boolean,value:!1},ignoreBarTouch:{type:Boolean,value:!0},icon:{type:String,value:""},value:{type:Number,notify:!0}}}}],(t=null)&&s(e.prototype,t),l&&s(e,l),u}(l.H3);customElements.define("ha-labeled-slider",d)},30681:function(n,e,t){"use strict";t.r(e);t(21157);var i,o=t(50856),l=t(28426),r=t(24381),a=t(9146),s=(t(69448),t(73139),t(1265)),f=t(44817);function c(n){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function u(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function p(n,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function d(n,e){return(d=Object.setPrototypeOf||function(n,e){return n.__proto__=e,n})(n,e)}function b(n){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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,i=m(n);if(e){var o=m(this).constructor;t=Reflect.construct(i,arguments,o)}else t=i.apply(this,arguments);return x(this,t)}}function x(n,e){return!e||"object"!==c(e)&&"function"!=typeof e?function(n){if(void 0===n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(n):e}function m(n){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(n)}var y={4:"has-set_position",128:"has-set_tilt_position"},v=function(n){!function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&d(n,e)}(c,n);var e,t,l,s=b(c);function c(){return u(this,c),s.apply(this,arguments)}return e=c,l=[{key:"template",get:function(){return(0,o.d)(i||(n=['\n <style include="iron-flex"></style>\n <style>\n .current_position,\n .tilt {\n max-height: 0px;\n overflow: hidden;\n }\n\n .has-set_position .current_position,\n .has-current_position .current_position,\n .has-set_tilt_position .tilt,\n .has-current_tilt_position .tilt {\n max-height: 208px;\n }\n\n [invisible] {\n visibility: hidden !important;\n }\n </style>\n <div class$="[[computeClassNames(stateObj)]]">\n <div class="current_position">\n <ha-labeled-slider\n caption="[[localize(\'ui.card.cover.position\')]]"\n pin=""\n value="{{coverPositionSliderValue}}"\n disabled="[[!entityObj.supportsSetPosition]]"\n on-change="coverPositionSliderChanged"\n ></ha-labeled-slider>\n </div>\n\n <div class="tilt">\n <ha-labeled-slider\n caption="[[localize(\'ui.card.cover.tilt_position\')]]"\n pin=""\n extra=""\n value="{{coverTiltPositionSliderValue}}"\n disabled="[[!entityObj.supportsSetTiltPosition]]"\n on-change="coverTiltPositionSliderChanged"\n >\n <ha-cover-tilt-controls\n slot="extra"\n hidden$="[[entityObj.isTiltOnly]]"\n hass="[[hass]]"\n state-obj="[[stateObj]]"\n ></ha-cover-tilt-controls>\n </ha-labeled-slider>\n </div>\n </div>\n <ha-attributes\n hass="[[hass]]"\n state-obj="[[stateObj]]"\n extra-filters="current_position,current_tilt_position"\n ></ha-attributes>\n '],e||(e=n.slice(0)),i=Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))));var n,e}},{key:"properties",get:function(){return{hass:Object,stateObj:{type:Object,observer:"stateObjChanged"},entityObj:{type:Object,computed:"computeEntityObj(hass, stateObj)"},coverPositionSliderValue:Number,coverTiltPositionSliderValue:Number}}}],(t=[{key:"computeEntityObj",value:function(n,e){return new f.ZP(n,e)}},{key:"stateObjChanged",value:function(n){n&&this.setProperties({coverPositionSliderValue:n.attributes.current_position,coverTiltPositionSliderValue:n.attributes.current_tilt_position})}},{key:"computeClassNames",value:function(n){return[(0,r.Q)(n,["current_position","current_tilt_position"]),(0,a.d)(n,y)].join(" ")}},{key:"coverPositionSliderChanged",value:function(n){this.entityObj.setCoverPosition(n.target.value)}},{key:"coverTiltPositionSliderChanged",value:function(n){this.entityObj.setCoverTiltPosition(n.target.value)}}])&&p(e.prototype,t),l&&p(e,l),c}((0,s.Z)(l.H3));customElements.define("more-info-cover",v)}}]); //# sourceMappingURL=chunk.490eb17d6033391f2ac1.js.map