iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
2 lines • 3.54 kB
JavaScript
(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[5083],{85083:function(e,t,n){"use strict";n.r(t);n(53918),n(30879);var o,r=n(50856),c=n(28426);n(31811);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=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(e){return!1}}();return function(){var n,o=p(e);if(t){var r=p(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(f,e);var t,n,c,i=s(f);function f(){return a(this,f),i.apply(this,arguments)}return t=f,c=[{key:"template",get:function(){return(0,r.d)(o||(e=['\n <style>\n paper-input {\n display: inline-block;\n }\n </style>\n\n <template is="dom-if" if="[[stateObj.attributes.code_format]]">\n <paper-input\n label="[[localize(\'ui.card.lock.code\')]]"\n value="{{enteredCode}}"\n pattern="[[stateObj.attributes.code_format]]"\n type="password"\n ></paper-input>\n <mwc-button\n on-click="callService"\n data-service="unlock"\n hidden$="[[!isLocked]]"\n >[[localize(\'ui.card.lock.unlock\')]]</mwc-button\n >\n <mwc-button\n on-click="callService"\n data-service="lock"\n hidden$="[[isLocked]]"\n >[[localize(\'ui.card.lock.lock\')]]</mwc-button\n >\n </template>\n <ha-attributes\n hass="[[hass]]"\n state-obj="[[stateObj]]"\n extra-filters="code_format"\n ></ha-attributes>\n '],t||(t=e.slice(0)),o=Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))));var e,t}},{key:"properties",get:function(){return{hass:Object,stateObj:{type:Object,observer:"stateObjChanged"},enteredCode:{type:String,value:""},isLocked:Boolean}}}],(n=[{key:"stateObjChanged",value:function(e){e&&(this.isLocked="locked"===e.state)}},{key:"callService",value:function(e){var t=e.target.getAttribute("data-service"),n={entity_id:this.stateObj.entity_id,code:this.enteredCode};this.hass.callService("lock",t,n)}}])&&u(t.prototype,n),c&&u(t,c),f}((0,n(1265).Z)(c.H3));customElements.define("more-info-lock",b)}}]);
//# sourceMappingURL=chunk.0195d8664e450a20d18d.js.map