UNPKG

iobroker.lovelace

Version:

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

4 lines 14.7 kB
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[42452],{90433:function(t,e,i){i.d(e,{Vy:function(){return r},fI:function(){return n},ux:function(){return c}});var o=i(22786),a=i(79468);const s=54;function r(t,e){const i=t%s+1;return e.getPropertyValue(`--color-${i}`)}function n(t,e){const i=e.getPropertyValue(`--graph-color-${t+1}`)||r(t,e);return(0,a.RQ)(i)}const c=(0,o.A)(t=>Array.from({length:s},(e,i)=>n(i,t)),(t,e)=>t[0].getPropertyValue("--graph-color-1")===e[0].getPropertyValue("--graph-color-1")&&t[0].getPropertyValue("--color-1")===e[0].getPropertyValue("--color-1"))},69543:function(t,e,i){i.d(e,{J:function(){return s}});i(74423);var o=i(22786),a=i(46927);const s=(0,o.A)(t=>{if(t.time_format===a.Hg.language||t.time_format===a.Hg.system){const e=t.time_format===a.Hg.language?t.language:void 0;return new Date("January 1, 2023 22:00:00").toLocaleString(e).includes("10")}return t.time_format===a.Hg.am_pm})},32172:function(t,e,i){i.d(e,{p:function(){return o}});i(16280),i(18111),i(7588),i(45367),i(92731),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698),i(62953);function o(t){return(e,i)=>{if("object"==typeof i)throw new Error("This decorator does not support this compilation type.");const o=String(i),a=e;if(a._transformers){if(!a.hasOwnProperty("_transformers")){const t=a._transformers;a._transformers=new Map,t.forEach((t,e)=>a._transformers.set(e,t))}}else{a._transformers=new Map,a._watching=new Map;const t=a.willUpdate;a.willUpdate=function(e){t.call(this,e);const i=new Set;e.forEach((t,e)=>{const o=this._watching.get(e);void 0!==o&&o.forEach(t=>i.add(t))}),i.forEach(t=>{this[t]=this[`__original_${String(t)}`]})}}a._transformers.set(i,t.transformer),t.watch&&t.watch.forEach(t=>{let e=a._watching.get(t);e||(e=new Set,a._watching.set(t,e)),e.add(i)});const s=Object.getOwnPropertyDescriptor(e,i);let r;if(void 0===s)r={get(){return this[`__transform_${o}`]},set(t){const e=this[`__transform_${o}`],i=this._transformers.get(o);this[`__transform_${o}`]=i?i.call(this,t):t,this[`__original_${o}`]=t,this.requestUpdate(o,e)},configurable:!0,enumerable:!0};else{const t=s.set;r=Object.assign(Object.assign({},s),{},{set(e){const i=this[`__transform_${o}`],a=this._transformers.get(o);this[`__transform_${o}`]=a?a.call(this,e):e,this[`__original_${o}`]=e,this.requestUpdate(o,i),null==t||t.call(this,e)}})}Object.defineProperty(e,i,r)}}},69093:function(t,e,i){i.d(e,{t:function(){return a}});var o=i(71727);const a=t=>(0,o.m)(t.entity_id)},82286:function(t,e,i){i.d(e,{$:function(){return o}});const o=(t,e)=>a(t.attributes,e),a=(t,e)=>0!==(t.supported_features&e)},26300:function(t,e,i){i.a(t,async function(t,o){try{i.r(e),i.d(e,{HaIconButton:function(){return f}});i(62953);var a=i(40445),s=i(5124),r=i(67576),n=i(63672),c=i(18350),l=(i(67094),t([c]));c=(l.then?(await l)():l)[0];let h,d,p,u,g=t=>t;class f extends s.WF{render(){return(0,s.qy)(h||(h=g` <ha-button appearance="plain" variant="neutral" aria-label="${0}" title="${0}" aria-haspopup="${0}" .disabled="${0}" .iconTag="${0}" .href="${0}" .target="${0}" .rel="${0}" .download="${0}"> ${0} </ha-button> `),(0,n.J)(this.label),(0,n.J)(this.hideTitle?void 0:this.label),(0,n.J)(this.ariaHasPopup),this.disabled,this.path?"ha-svg-icon":"span",this.href,this.target,this.rel,this.download,this.path?(0,s.qy)(d||(d=g`<ha-svg-icon aria-hidden="true" .path="${0}"></ha-svg-icon>`),this.path):(0,s.qy)(p||(p=g`<span><slot></slot></span>`)))}constructor(...t){super(...t),this.disabled=!1,this.hideTitle=!1,this.selected=!1}}f.shadowRootOptions={mode:"open",delegatesFocus:!0},f.styles=(0,s.AH)(u||(u=g`:host{display:inline-block;outline:0;--ha-button-height:var(--ha-icon-button-size, 48px)}ha-button{position:relative;isolation:isolate;--wa-form-control-padding-inline:var( --ha-icon-button-padding-inline, --ha-space-2 );--wa-color-on-normal:currentColor;--wa-color-fill-quiet:transparent;--ha-button-label-overflow:visible}ha-button::after{content:"";position:absolute;inset:0;z-index:-1;border-radius:50%;background-color:currentColor;opacity:0;pointer-events:none}ha-button::part(base){width:var(--wa-form-control-height);aspect-ratio:1;outline-offset:-4px}ha-button::part(label){display:flex}:host([selected]) ha-button::after{opacity:.1}@media (hover:hover){:host(:hover:not([disabled])) ha-button::after{opacity:.1}}`)),(0,a.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],f.prototype,"disabled",void 0),(0,a.Cg)([(0,r.MZ)({type:String})],f.prototype,"path",void 0),(0,a.Cg)([(0,r.MZ)({type:String})],f.prototype,"label",void 0),(0,a.Cg)([(0,r.MZ)({type:String,attribute:"aria-haspopup"})],f.prototype,"ariaHasPopup",void 0),(0,a.Cg)([(0,r.MZ)({attribute:"hide-title",type:Boolean})],f.prototype,"hideTitle",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],f.prototype,"selected",void 0),(0,a.Cg)([(0,r.MZ)()],f.prototype,"href",void 0),(0,a.Cg)([(0,r.MZ)()],f.prototype,"target",void 0),(0,a.Cg)([(0,r.MZ)()],f.prototype,"rel",void 0),(0,a.Cg)([(0,r.MZ)()],f.prototype,"download",void 0),f=(0,a.Cg)([(0,r.EM)("ha-icon-button")],f),o()}catch(h){o(h)}})},8630:function(t,e,i){var o=i(40445),a=i(68618),s=i(11081),r=i(67576);class n extends a.iY{}n.styles=s.R,n=(0,o.Cg)([(0,r.EM)("ha-list")],n)},2054:function(t,e,i){i.a(t,async function(t,e){try{i(16280),i(62953);var o=i(40445),a=i(5124),s=i(67576),r=i(1087),n=i(44249),c=i(26300),l=t([c]);c=(l.then?(await l)():l)[0];let h,d,p,u=t=>t;const g="M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z";class f extends a.WF{connectedCallback(){super.connectedCallback(),this._attachNotifOnConnect&&(this._attachNotifOnConnect=!1,this._subscribeNotifications())}disconnectedCallback(){super.disconnectedCallback(),this._unsubNotifications&&(this._attachNotifOnConnect=!0,this._unsubNotifications(),this._unsubNotifications=void 0)}render(){if(!this._show)return a.s6;const t=this._hasNotifications&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);return(0,a.qy)(h||(h=u` <ha-icon-button .label="${0}" .path="${0}" @click="${0}"></ha-icon-button> ${0} `),this.hass.localize("ui.sidebar.sidebar_toggle"),g,this._toggleMenu,t?(0,a.qy)(d||(d=u`<div class="dot"></div>`)):"")}willUpdate(t){if(super.willUpdate(t),!t.has("narrow")&&!t.has("hass"))return;const e=t.has("hass")?t.get("hass"):this.hass,i=t.has("narrow")?t.get("narrow"):this.narrow,o=!1===(null==e?void 0:e.kioskMode)&&(i||"always_hidden"===(null==e?void 0:e.dockedSidebar)),a=!1===this.hass.kioskMode&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);this.hasUpdated&&o===a||(this._show=a||this._alwaysVisible,a?this._subscribeNotifications():this._unsubNotifications&&(this._unsubNotifications(),this._unsubNotifications=void 0))}_subscribeNotifications(){if(this._unsubNotifications)throw new Error("Already subscribed");this._unsubNotifications=(0,n.V)(this.hass.connection,t=>{this._hasNotifications=t.length>0})}_toggleMenu(){(0,r.r)(this,"hass-toggle-menu")}constructor(...t){super(...t),this.narrow=!1,this._hasNotifications=!1,this._show=!1,this._alwaysVisible=!1,this._attachNotifOnConnect=!1}}f.styles=(0,a.AH)(p||(p=u`:host{position:relative}.dot{pointer-events:none;position:absolute;background-color:var(--accent-color);width:12px;height:12px;top:9px;right:7px;inset-inline-end:7px;inset-inline-start:initial;border-radius:var(--ha-border-radius-circle);border:2px solid var(--app-header-background-color)}`)),(0,o.Cg)([(0,s.MZ)({type:Boolean})],f.prototype,"narrow",void 0),(0,o.Cg)([(0,s.MZ)({attribute:!1})],f.prototype,"hass",void 0),(0,o.Cg)([(0,s.wk)()],f.prototype,"_hasNotifications",void 0),(0,o.Cg)([(0,s.wk)()],f.prototype,"_show",void 0),f=(0,o.Cg)([(0,s.EM)("ha-menu-button")],f),e()}catch(h){e(h)}})},67094:function(t,e,i){i.r(e),i.d(e,{HaSvgIcon:function(){return d}});var o=i(40445),a=i(5124),s=i(67576);let r,n,c,l,h=t=>t;class d extends a.WF{render(){return(0,a.JW)(r||(r=h` <svg viewBox="${0}" preserveAspectRatio="xMidYMid meet" focusable="false" role="img" aria-hidden="true"> <g> ${0} ${0} </g> </svg>`),this.viewBox||"0 0 24 24",this.path?(0,a.JW)(n||(n=h`<path class="primary-path" d="${0}"></path>`),this.path):a.s6,this.secondaryPath?(0,a.JW)(c||(c=h`<path class="secondary-path" d="${0}"></path>`),this.secondaryPath):a.s6)}}d.styles=(0,a.AH)(l||(l=h`:host{display:var(--ha-icon-display,inline-flex);align-items:center;justify-content:center;position:relative;vertical-align:middle;fill:var(--icon-primary-color,currentcolor);width:var(--mdc-icon-size,24px);height:var(--mdc-icon-size,24px)}svg{width:100%;height:100%;pointer-events:none;display:block}path.primary-path{opacity:var(--icon-primary-opactity, 1)}path.secondary-path{fill:var(--icon-secondary-color,currentcolor);opacity:var(--icon-secondary-opactity, .5)}`)),(0,o.Cg)([(0,s.MZ)()],d.prototype,"path",void 0),(0,o.Cg)([(0,s.MZ)({attribute:!1})],d.prototype,"secondaryPath",void 0),(0,o.Cg)([(0,s.MZ)({attribute:!1})],d.prototype,"viewBox",void 0),d=(0,o.Cg)([(0,s.EM)("ha-svg-icon")],d)},27330:function(t,e,i){i.d(e,{L:function(){return y},p:function(){return v}});i(62953);var o=i(40445),a=i(5124),s=i(67576),r=i(6412);let n,c,l,h,d,p,u,g,f=t=>t;const b={passive:!0},v=(0,a.AH)(n||(n=f`:host{display:block}.top-app-bar{box-sizing:border-box;color:var(--app-header-text-color,#fff);background-color:var(--app-header-background-color,var(--primary-color));position:fixed;top:0;inset-inline-end:0;width:var(--ha-top-app-bar-width,100%);z-index:4;padding-top:var(--safe-area-inset-top);padding-right:var(--safe-area-inset-right);transition:box-shadow var(--ha-animation-duration-normal) ease,width var(--ha-animation-duration-normal) ease,padding-left var(--ha-animation-duration-normal) ease,padding-right var(--ha-animation-duration-normal) ease}:host([narrow]) .top-app-bar{padding-left:var(--safe-area-inset-left)}.top-app-bar.scrolled:not(.pane-header){box-shadow:var(--ha-box-shadow-s)}.row{display:flex;align-items:center;box-sizing:border-box;width:100%;height:var(--header-height);border-bottom:var(--app-header-border-bottom)}.section{display:flex;align-items:center;box-sizing:border-box;min-width:0;height:100%;padding:0 var(--ha-space-3)}#navigation{flex:1 1 auto}.section.center{flex:1 1 auto;justify-content:center;text-align:center}.section.end{flex:none;justify-content:flex-end}.title{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--ha-font-size-xl);font-weight:var(--ha-font-weight-normal);line-height:var(--header-height);padding-inline-start:var(--ha-space-6)}:host([narrow]) .title{padding-inline-start:var(--ha-space-2)}.top-app-bar-fixed-adjust{padding-top:calc(var(--header-height,0px) + var(--safe-area-inset-top,0px));padding-bottom:var(--safe-area-inset-bottom);padding-right:var(--safe-area-inset-right)}:host([narrow]) .top-app-bar-fixed-adjust{padding-left:var(--safe-area-inset-left)}`));class y extends a.WF{get scrollTarget(){return this._scrollTarget||window}set scrollTarget(t){const e=this.scrollTarget;this._unregisterListeners(),this._scrollTarget=t,this._updateBarPosition(),this.requestUpdate("scrollTarget",e),this.isConnected&&(this._registerListeners(),this._syncScrollState())}_isPaneHeader(){return!1}render(){return(0,a.qy)(c||(c=f`${0}${0}`),this._renderHeader(),this._renderContent())}connectedCallback(){super.connectedCallback(),this.hasUpdated&&(this._updateBarPosition(),this._registerListeners(),this._syncScrollState())}_renderHeader(){const t=(0,a.qy)(l||(l=f`<span class="title"> <slot name="title"></slot> </span>`)),e=this._isPaneHeader();return(0,a.qy)(h||(h=f` <header class="top-app-bar ${0}"> <div class="row"> ${0} <section class="section" id="navigation"> ${0} </section> ${0} <section class="section end" id="actions" role="toolbar"> <slot name="actionItems"></slot> </section> </div> </header> `),(0,r.H)({"pane-header":e}),e?(0,a.qy)(d||(d=f`<section class="section" id="title"> <slot name="navigationIcon"></slot> ${0} </section>`),t):a.s6,e?a.s6:(0,a.qy)(p||(p=f`<slot name="navigationIcon"></slot> ${0}`),this.centerTitle?a.s6:t),!e&&this.centerTitle?(0,a.qy)(u||(u=f`<section class="section center">${0}</section>`),t):a.s6)}_renderContent(){return(0,a.qy)(g||(g=f`<div class="top-app-bar-fixed-adjust"> <slot></slot> </div>`))}firstUpdated(t){super.firstUpdated(t),this._updateBarPosition(),this._registerListeners(),this._syncScrollState()}disconnectedCallback(){super.disconnectedCallback(),this._unregisterListeners()}_updateBarPosition(){this._barElement&&(this._barElement.style.position=this.scrollTarget===window?"":"absolute")}_registerListeners(){this.scrollTarget.addEventListener("scroll",this._syncScrollState,b)}_unregisterListeners(){this.scrollTarget.removeEventListener("scroll",this._syncScrollState)}constructor(...t){super(...t),this.narrow=!1,this.centerTitle=!1,this._syncScrollState=()=>{var t;const e=this.scrollTarget instanceof Window?this.scrollTarget.pageYOffset:this.scrollTarget.scrollTop;null===(t=this._barElement)||void 0===t||t.classList.toggle("scrolled",e>0)}}}y.styles=v,(0,o.Cg)([(0,s.MZ)({type:Boolean,reflect:!0})],y.prototype,"narrow",void 0),(0,o.Cg)([(0,s.MZ)({attribute:"center-title",type:Boolean})],y.prototype,"centerTitle",void 0),(0,o.Cg)([(0,s.P)(".top-app-bar")],y.prototype,"_barElement",void 0),(0,o.Cg)([(0,s.MZ)({attribute:!1})],y.prototype,"scrollTarget",null),y=(0,o.Cg)([(0,s.EM)("ha-top-app-bar-fixed")],y)},44249:function(t,e,i){i.d(e,{V:function(){return o}});i(62953);const o=(t,e)=>{const i=new a,o=t.subscribeMessage(t=>e(i.processMessage(t)),{type:"persistent_notification/subscribe"});return()=>{o.then(t=>null==t?void 0:t())}};class a{processMessage(t){if("removed"===t.type)for(const e of Object.keys(t.notifications))delete this.notifications[e];else this.notifications=Object.assign(Object.assign({},this.notifications),t.notifications);return Object.values(this.notifications)}constructor(){this.notifications={}}}},53580:function(t,e,i){i.d(e,{mdiHomeAssistant:function(){return o}});const o="m12.151 1.5882c-.3262 0-.6523.1291-.8996.3867l-8.3848 8.7354c-.0619.0644-.1223.1368-.1807.2154-.0588.0789-.1151.1638-.1688.2534-.2593.4325-.4552.9749-.5232 1.4555-.0026.018-.0076.0369-.0094.0548-.0121.0987-.0184.1944-.0184.2857v8.0124a1.2731 1.2731 0 001.2731 1.2731h7.8313l-3.4484-3.593a1.7399 1.7399 0 111.0803-1.125l2.6847 2.7972v-10.248a1.7399 1.7399 0 111.5276-0v7.187l2.6702-2.782a1.7399 1.7399 0 111.0566 1.1505l-3.7269 3.8831v2.7299h8.174a1.2471 1.2471 0 001.2471-1.2471v-8.0375c0-.0912-.0059-.1868-.0184-.2855-.0603-.4935-.2636-1.0617-.5326-1.5105-.0537-.0896-.1101-.1745-.1684-.253-.0588-.079-.1191-.1513-.181-.2158l-8.3848-8.7363c-.2473-.2577-.5735-.3866-.8995-.3864"}}]);