iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
2 lines • 13.4 kB
JavaScript
"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["84209"],{92636:function(t,e,r){r.d(e,{z:()=>n});r(19083),r(61006);const n=t=>(e,r)=>t.includes(e,r)},49976:function(t,e,r){r.d(e,{U:()=>n});const n=t=>t.stopPropagation()},59847:function(t,e,r){r.d(e,{N:()=>i});var n=r(73850);const i=t=>(0,n.M)(t.entity_id)},75278:function(t,e,r){r.d(e,{e:()=>n});const n=(t,e)=>i(t.attributes,e),i=(t,e)=>!!(t.supported_features&e)},41680:function(t,e,r){r.d(e,{p:()=>i});r(71695),r(92745),r(77439),r(19134),r(97003),r(47021);var n=r(62900);const i=(t,e)=>{if(!(e instanceof n.DD))return{warnings:[e.message],errors:void 0};const r=[],i=[];for(const n of e.failures())if(void 0===n.value)r.push(t.localize("ui.errors.config.key_missing",{key:n.path.join(".")}));else if("never"===n.type)i.push(t.localize("ui.errors.config.key_not_expected",{key:n.path.join(".")}));else{if("union"===n.type)continue;"enums"===n.type?i.push(t.localize("ui.errors.config.key_wrong_type",{key:n.path.join("."),type_correct:n.message.replace("Expected ","").split(", ")[0],type_wrong:JSON.stringify(n.value)})):i.push(t.localize("ui.errors.config.key_wrong_type",{key:n.path.join("."),type_correct:n.refinement||n.type,type_wrong:JSON.stringify(n.value)}))}return{warnings:i,errors:r}}},99426:function(t,e,r){r.r(e);var n=r(61701),i=(r(71695),r(47021),r(57243)),o=r(50778),a=r(35359),s=r(36522);r(23334),r(37583);let c,l,u,d,h=t=>t;const f={info:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z",warning:"M12,2L1,21H23M12,6L19.53,19H4.47M11,10V14H13V10M11,16V18H13V16",error:"M11,15H13V17H11V15M11,7H13V13H11V7M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20Z",success:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2,4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"};(0,n.Z)([(0,o.Mo)("ha-alert")],(function(t,e){return{F:class extends e{constructor(...e){super(...e),t(this)}},d:[{kind:"field",decorators:[(0,o.Cb)()],key:"title",value(){return""}},{kind:"field",decorators:[(0,o.Cb)({attribute:"alert-type"})],key:"alertType",value(){return"info"}},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"dismissable",value(){return!1}},{kind:"field",decorators:[(0,o.Cb)({type:Boolean})],key:"narrow",value(){return!1}},{kind:"method",key:"render",value:function(){return(0,i.dy)(c||(c=h` <div class="issue-type ${0}" role="alert"> <div class="icon ${0}"> <slot name="icon"> <ha-svg-icon .path="${0}"></ha-svg-icon> </slot> </div> <div class="${0}"> <div class="main-content"> ${0} <slot></slot> </div> <div class="action"> <slot name="action"> ${0} </slot> </div> </div> </div> `),(0,a.$)({[this.alertType]:!0}),this.title?"":"no-title",f[this.alertType],(0,a.$)({content:!0,narrow:this.narrow}),this.title?(0,i.dy)(l||(l=h`<div class="title">${0}</div>`),this.title):i.Ld,this.dismissable?(0,i.dy)(u||(u=h`<ha-icon-button ="${0}" label="Dismiss alert" .path="${0}"></ha-icon-button>`),this._dismissClicked,"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"):i.Ld)}},{kind:"method",key:"_dismissClicked",value:function(){(0,s.B)(this,"alert-dismissed-clicked")}},{kind:"field",static:!0,key:"styles",value(){return(0,i.iv)(d||(d=h`.issue-type{position:relative;padding:8px;display:flex}.issue-type::after{position:absolute;top:0;right:0;bottom:0;left:0;opacity:.12;pointer-events:none;content:"";border-radius:4px}.icon{z-index:1}.icon.no-title{align-self:center}.content{display:flex;justify-content:space-between;align-items:center;width:100%;text-align:var(--float-start)}.content.narrow{flex-direction:column;align-items:flex-end}.action{z-index:1;width:min-content;--mdc-theme-primary:var(--primary-text-color)}.main-content{overflow-wrap:anywhere;word-break:break-word;margin-left:8px;margin-right:0;margin-inline-start:8px;margin-inline-end:0}.title{margin-top:2px;font-weight:700}.action ha-icon-button,.action mwc-button{--mdc-theme-primary:var(--primary-text-color);--mdc-icon-button-size:36px}.issue-type.info>.icon{color:var(--info-color)}.issue-type.info::after{background-color:var(--info-color)}.issue-type.warning>.icon{color:var(--warning-color)}.issue-type.warning::after{background-color:var(--warning-color)}.issue-type.error>.icon{color:var(--error-color)}.issue-type.error::after{background-color:var(--error-color)}.issue-type.success>.icon{color:var(--success-color)}.issue-type.success::after{background-color:var(--success-color)}:host ::slotted(ul){margin:0;padding-inline-start:20px}`))}}]}}),i.oi)},59826:function(t,e,r){var n=r(61701),i=(r(71695),r(47021),r(31622)),o=r(57243),a=r(50778),s=r(22344);let c,l=t=>t;(0,n.Z)([(0,a.Mo)("ha-button")],(function(t,e){return{F:class extends e{constructor(...e){super(...e),t(this)}},d:[{kind:"field",static:!0,key:"styles",value(){return[s.W,(0,o.iv)(c||(c=l`::slotted([slot=icon]){margin-inline-start:0px;margin-inline-end:8px;direction:var(--direction);display:block}.mdc-button{height:var(--button-height,36px)}.trailing-icon{display:flex}.slot-container{overflow:var(--button-slot-container-overflow,visible)}:host([destructive]){--mdc-theme-primary:var(--error-color)}`))]}}]}}),i.Button)},96530:function(t,e,r){r.d(e,{X:()=>o,y:()=>i});var n=r(92636);const i=["input_boolean","input_button","input_text","input_number","input_datetime","input_select","counter","timer","schedule"],o=(0,n.z)(i)},94818:function(t,e,r){r.a(t,(async function(t,n){try{r.r(e),r.d(e,{DialogLovelaceDashboardDetail:()=>g});var i=r(61701),o=(r(71695),r(19423),r(40251),r(47021),r(57243)),a=r(50778),s=r(36522),c=(r(59826),r(73729)),l=(r(29073),r(28008)),u=r(16815),d=t([u]);u=(d.then?(await d)():d)[0];let h,f,p=t=>t,g=(0,i.Z)([(0,a.Mo)("dialog-lovelace-dashboard-configure-strategy")],(function(t,e){return{F:class extends e{constructor(...e){super(...e),t(this)}},d:[{kind:"field",decorators:[(0,a.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,a.SB)()],key:"_params",value:void 0},{kind:"field",decorators:[(0,a.SB)()],key:"_submitting",value(){return!1}},{kind:"field",decorators:[(0,a.SB)()],key:"_data",value:void 0},{kind:"method",key:"showDialog",value:function(t){this._params=t,this._data=t.config.strategy}},{kind:"method",key:"closeDialog",value:function(){this._params=void 0,this._data=void 0,(0,s.B)(this,"dialog-closed",{dialog:this.localName})}},{kind:"method",key:"render",value:function(){return this._params&&this._data?(0,o.dy)(h||(h=p` <ha-dialog open ="${0}" scrimClickAction escapeKeyAction .heading="${0}"> <div> <hui-dashboard-strategy-element-editor .hass="${0}" .lovelace="${0}" .value="${0}" -changed="${0}" dialogInitialFocus></hui-dashboard-strategy-element-editor> </div> <ha-button slot="primaryAction" ="${0}" .disabled="${0}"> ${0} </ha-button> </ha-dialog> `),this.closeDialog,(0,c.i)(this.hass,this.hass.localize("ui.panel.config.lovelace.dashboards.detail.new_dashboard")),this.hass,this._params.config,this._data,this._handleConfigChanged,this._save,this._submitting,this.hass.localize("ui.common.next")):o.Ld}},{kind:"method",key:"_handleConfigChanged",value:function(t){this._data=t.detail.config}},{kind:"method",key:"_save",value:async function(){this._data&&(this._submitting=!0,await this._params.saveConfig(Object.assign(Object.assign({},this._params.config),{},{strategy:this._data})),this._submitting=!1,this.closeDialog())}},{kind:"get",static:!0,key:"styles",value:function(){return[l.yu,(0,o.iv)(f||(f=p``))]}}]}}),o.oi);n()}catch(h){n(h)}}))},78344:function(t){var e=TypeError;t.exports=function(t){if("string"==typeof t)return t;throw new e("Argument is not a string")}},87265:function(t,e,r){var n=r(61896),i=String,o=TypeError;t.exports=function(t){if(void 0===t||n(t))return t;throw new o(i(t)+" is not an object or undefined")}},87038:function(t,e,r){var n=r(59069),i=TypeError;t.exports=function(t){if("Uint8Array"===n(t))return t;throw new i("Argument is not an Uint8Array")}},15419:function(t){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=e+"+/",n=e+"-_",i=function(t){for(var e={},r=0;r<64;r++)e[t.charAt(r)]=r;return e};t.exports={i2c:r,c2i:i(r),i2cUrl:n,c2iUrl:i(n)}},93474:function(t){var e=TypeError;t.exports=function(t){var r=t&&t.alphabet;if(void 0===r||"base64"===r||"base64url"===r)return r||"base64";throw new e("Incorrect `alphabet` option")}},30338:function(t,e,r){var n=r(97934),i=r(71998),o=r(4576),a=r(36760);t.exports=function(t,e){e&&"string"==typeof t||i(t);var r=a(t);return o(i(void 0!==r?n(r,t):t))}},47057:function(t,e,r){var n=r(1569),i=r(72878),o=r(87265),a=r(78344),s=r(39129),c=r(15419),l=r(93474),u=r(38511),d=c.c2i,h=c.c2iUrl,f=n.SyntaxError,p=n.TypeError,g=i("".charAt),v=function(t,e){for(var r=t.length;e<r;e++){var n=g(t,e);if(" "!==n&&"\t"!==n&&"\n"!==n&&"\f"!==n&&"\r"!==n)break}return e},y=function(t,e,r){var n=t.length;n<4&&(t+=2===n?"AA":"A");var i=(e[g(t,0)]<<18)+(e[g(t,1)]<<12)+(e[g(t,2)]<<6)+e[g(t,3)],o=[i>>16&255,i>>8&255,255&i];if(2===n){if(r&&0!==o[1])throw new f("Extra bits");return[o[0]]}if(3===n){if(r&&0!==o[2])throw new f("Extra bits");return[o[0],o[1]]}return o},m=function(t,e,r){for(var n=e.length,i=0;i<n;i++)t[r+i]=e[i];return r+n};t.exports=function(t,e,r,n){a(t),o(e);var i="base64"===l(e)?d:h,c=e?e.lastChunkHandling:void 0;if(void 0===c&&(c="loose"),"loose"!==c&&"strict"!==c&&"stop-before-partial"!==c)throw new p("Incorrect `lastChunkHandling` option");r&&u(r.buffer);var b=r||[],w=0,k=0,_="",x=0;if(n)for(;;){if((x=v(t,x))===t.length){if(_.length>0){if("stop-before-partial"===c)break;if("loose"!==c)throw new f("Missing padding");if(1===_.length)throw new f("Malformed padding: exactly one additional character");w=m(b,y(_,i,!1),w)}k=t.length;break}var A=g(t,x);if(++x,"="===A){if(_.length<2)throw new f("Padding is too early");if(x=v(t,x),2===_.length){if(x===t.length){if("stop-before-partial"===c)break;throw new f("Malformed padding: only one =")}"="===g(t,x)&&(++x,x=v(t,x))}if(x<t.length)throw new f("Unexpected character after padding");w=m(b,y(_,i,"strict"===c),w),k=t.length;break}if(!s(i,A))throw new f("Unexpected character");var M=n-w;if(1===M&&2===_.length||2===M&&3===_.length)break;if(4===(_+=A).length&&(w=m(b,y(_,i,!1),w),_="",k=x,w===n))break}return{bytes:b,read:k,written:w}}},35303:function(t,e,r){var n=r(1569),i=r(72878),o=n.Uint8Array,a=n.SyntaxError,s=n.parseInt,c=Math.min,l=/[^\da-f]/i,u=i(l.exec),d=i("".slice);t.exports=function(t,e){var r=t.length;if(r%2!=0)throw new a("String should be an even number of characters");for(var n=e?c(e.length,r/2):r/2,i=e||new o(n),h=0,f=0;f<n;){var p=d(t,h,h+=2);if(u(l,p))throw new a("String should only contain hex characters");i[f++]=s(p,16)}return{bytes:i,read:h}}},60933:function(t,e,r){var n=r(40810),i=r(57877),o=r(63983),a=r(12360),s=r(13053),c=r(47645);n({target:"Array",proto:!0},{flatMap:function(t){var e,r=a(this),n=s(r);return o(t),(e=c(r,0)).length=i(e,r,r,n,0,1,t,arguments.length>1?arguments[1]:void 0),e}})},32126:function(t,e,r){r(35709)("flatMap")},25677:function(t,e,r){var n=r(40810),i=r(97934),o=r(63983),a=r(71998),s=r(4576),c=r(30338),l=r(79995),u=r(14181),d=r(92288),h=l((function(){for(var t,e,r=this.iterator,n=this.mapper;;){if(e=this.inner)try{if(!(t=a(i(e.next,e.iterator))).done)return t.value;this.inner=null}catch(o){u(r,"throw",o)}if(t=a(i(this.next,r)),this.done=!!t.done)return;try{this.inner=c(n(t.value,this.counter++),!1)}catch(o){u(r,"throw",o)}}}));n({target:"Iterator",proto:!0,real:!0,forced:d},{flatMap:function(t){return a(this),o(t),new h(s(this),{mapper:t,inner:null})}})},92789:function(t,e,r){r(13492)("Uint8",(function(t){return function(e,r,n){return t(this,e,r,n)}}))},21917:function(t,e,r){var n=r(40810),i=r(1569),o=r(47057),a=r(87038);i.Uint8Array&&n({target:"Uint8Array",proto:!0},{setFromBase64:function(t){a(this);var e=o(t,arguments.length>1?arguments[1]:void 0,this,this.length);return{read:e.read,written:e.written}}})},56193:function(t,e,r){var n=r(40810),i=r(1569),o=r(78344),a=r(87038),s=r(38511),c=r(35303);i.Uint8Array&&n({target:"Uint8Array",proto:!0},{setFromHex:function(t){a(this),o(t),s(this.buffer);var e=c(t,this).read;return{read:e,written:e/2}}})},25020:function(t,e,r){var n=r(40810),i=r(1569),o=r(72878),a=r(87265),s=r(87038),c=r(38511),l=r(15419),u=r(93474),d=l.i2c,h=l.i2cUrl,f=o("".charAt);i.Uint8Array&&n({target:"Uint8Array",proto:!0},{toBase64:function(){var t=s(this),e=arguments.length?a(arguments[0]):void 0,r="base64"===u(e)?d:h,n=!!e&&!!e.omitPadding;c(this.buffer);for(var i,o="",l=0,p=t.length,g=function(t){return f(r,i>>6*t&63)};l+2<p;l+=3)i=(t[l]<<16)+(t[l+1]<<8)+t[l+2],o+=g(3)+g(2)+g(1)+g(0);return l+2===p?(i=(t[l]<<16)+(t[l+1]<<8),o+=g(3)+g(2)+g(1)+(n?"":"=")):l+1===p&&(i=t[l]<<16,o+=g(3)+g(2)+(n?"":"==")),o}})},86913:function(t,e,r){var n=r(40810),i=r(1569),o=r(72878),a=r(87038),s=r(38511),c=o(1..toString);i.Uint8Array&&n({target:"Uint8Array",proto:!0},{toHex:function(){a(this),s(this.buffer);for(var t="",e=0,r=this.length;e<r;e++){var n=c(this[e],16);t+=1===n.length?"0"+n:n}return t}})}}]);
//# sourceMappingURL=84209.756d5cf72bee8534.js.map