UNPKG

iobroker.lovelace

Version:

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

4 lines 20.6 kB
export const __rspack_esm_id=88013;export const __rspack_esm_ids=[88013];export const __webpack_modules__={93421(t,e,i){i.d(e,{IW:()=>l,dH:()=>c,fI:()=>h});i(44114);var s=i(35211),o=i(22792),a=i(32172);const n=(t,e)=>{let i=t;for(const t of e){if(null==i)return;i=i[t]}return i},r=(t,e,i)=>{const o=(0,a.p)({transformer:function(t){return i.call(this,t)},watch:e?[e]:[]}),n=(0,s.Fg)({context:t,subscribe:!0});return(t,e)=>{o(t,e),n(t,e)}},h=t=>r(o.iN,t.entityIdPath[0],function(e){const i=n(this,t.entityIdPath);return"string"==typeof i?e?.[i]:void 0}),c=t=>r(o.X1,t.entityIdPath[0],function(e){const i=n(this,t.entityIdPath);return"string"==typeof i?e?.[i]:void 0}),l=()=>r(o.D5,void 0,({localize:t})=>t)},32172(t,e,i){i.d(e,{p:()=>s});i(18111),i(7588),i(45367),i(92731),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698);function s(t){return(e,i)=>{if("object"==typeof i)throw new Error("This decorator does not support this compilation type.");const s=String(i),o=e;if(o._transformers){if(!o.hasOwnProperty("_transformers")){const t=o._transformers;o._transformers=new Map,t.forEach((t,e)=>o._transformers.set(e,t))}}else{o._transformers=new Map,o._watching=new Map;const t=o.willUpdate;o.willUpdate=function(e){t.call(this,e);const i=new Set;e.forEach((t,e)=>{const s=this._watching.get(e);void 0!==s&&s.forEach(t=>i.add(t))}),i.forEach(t=>{this[t]=this[`__original_${String(t)}`]})}}o._transformers.set(i,t.transformer),t.watch&&t.watch.forEach(t=>{let e=o._watching.get(t);e||(e=new Set,o._watching.set(t,e)),e.add(i)});const a=Object.getOwnPropertyDescriptor(e,i);let n;if(void 0===a)n={get(){return this[`__transform_${s}`]},set(t){const e=this[`__transform_${s}`],i=this._transformers.get(s);this[`__transform_${s}`]=i?i.call(this,t):t,this[`__original_${s}`]=t,this.requestUpdate(s,e)},configurable:!0,enumerable:!0};else{const t=a.set;n={...a,set(e){const i=this[`__transform_${s}`],o=this._transformers.get(s);this[`__transform_${s}`]=o?o.call(this,e):e,this[`__original_${s}`]=e,this.requestUpdate(s,i),t?.call(this,e)}}}Object.defineProperty(e,i,n)}}},38962(t,e,i){i.a(t,async function(t,s){try{i.r(e);var o=i(62826),a=i(5124),n=i(22441),r=i(6412),h=i(93421),c=i(1087),l=i(26300),d=(i(67094),t([l]));l=(d.then?(await d)():d)[0];const p="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",g={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"};class u extends a.WF{render(){return a.qy` <div class="issue-type ${(0,r.H)({[this.alertType]:!0})}" role="alert"> <div class="icon ${this.title?"":"no-title"}"> <slot name="icon"> <ha-svg-icon .path="${g[this.alertType]}"></ha-svg-icon> </slot> </div> <div class="${(0,r.H)({content:!0,narrow:this.narrow})}"> <div class="main-content"> ${this.title?a.qy`<div class="title">${this.title}</div>`:a.s6} <slot></slot> </div> <div class="action"> <slot name="action"> ${this.dismissable?a.qy`<ha-icon-button @click="${this._dismissClicked}" .label="${this._localize?.("ui.common.dismiss_alert")}" .path="${p}"></ha-icon-button>`:a.s6} </slot> </div> </div> </div> `}_dismissClicked(){(0,c.r)(this,"alert-dismissed-clicked")}constructor(...t){super(...t),this.title="",this.alertType="info",this.dismissable=!1,this.narrow=!1}}u.styles=a.AH`.issue-type{position:relative;padding:8px;display:flex}.icon{height:var(--ha-alert-icon-size,24px);width:var(--ha-alert-icon-size,24px)}.issue-type::after{position:absolute;top:0;right:0;bottom:0;left:0;opacity:.12;pointer-events:none;content:"";border-radius:var(--ha-border-radius-sm)}.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;line-height:normal;margin-left:8px;margin-right:0;margin-inline-start:8px;margin-inline-end:8px}.title{margin-top:2px;font-weight:var(--ha-font-weight-bold)}.action ha-icon-button{--mdc-theme-primary:var(--primary-text-color);--ha-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}`,(0,o.Cg)([(0,n.MZ)()],u.prototype,"title",void 0),(0,o.Cg)([(0,n.MZ)({attribute:"alert-type"})],u.prototype,"alertType",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean})],u.prototype,"dismissable",void 0),(0,o.Cg)([(0,n.wk)(),(0,h.IW)()],u.prototype,"_localize",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean})],u.prototype,"narrow",void 0),u=(0,o.Cg)([(0,n.EM)("ha-alert")],u),s()}catch(t){s(t)}})},90248(t,e,i){i.a(t,async function(t,s){try{i.r(e),i.d(e,{HaIconButtonArrowPrev:()=>p});var o=i(62826),a=i(5124),n=i(22441),r=i(63091),h=i(26300),c=t([h]);h=(c.then?(await c)():c)[0];const l="M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z",d="M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z";class p extends a.WF{render(){return a.qy` <ha-icon-button .disabled="${this.disabled}" .label="${this.label||this.hass?.localize("ui.common.back")||"Back"}" .path="${this._icon}" .href="${this.href}" .target="${this.target}" .rel="${this.rel}" .download="${this.download}"></ha-icon-button> `}constructor(...t){super(...t),this.disabled=!1,this._icon="rtl"===r.G.document.dir?d:l}}(0,o.Cg)([(0,n.MZ)({attribute:!1})],p.prototype,"hass",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean})],p.prototype,"disabled",void 0),(0,o.Cg)([(0,n.MZ)()],p.prototype,"label",void 0),(0,o.Cg)([(0,n.MZ)()],p.prototype,"href",void 0),(0,o.Cg)([(0,n.MZ)()],p.prototype,"target",void 0),(0,o.Cg)([(0,n.MZ)()],p.prototype,"rel",void 0),(0,o.Cg)([(0,n.MZ)()],p.prototype,"download",void 0),(0,o.Cg)([(0,n.wk)()],p.prototype,"_icon",void 0),p=(0,o.Cg)([(0,n.EM)("ha-icon-button-arrow-prev")],p),s()}catch(t){s(t)}})},26300(t,e,i){i.a(t,async function(t,s){try{i.r(e),i.d(e,{HaIconButton:()=>l});var o=i(62826),a=i(5124),n=i(22441),r=i(63672),h=i(18350),c=(i(67094),t([h]));h=(c.then?(await c)():c)[0];class l extends a.WF{render(){return a.qy` <ha-button appearance="plain" variant="neutral" aria-label="${(0,r.J)(this.label)}" title="${(0,r.J)(this.hideTitle?void 0:this.label)}" aria-haspopup="${(0,r.J)(this.ariaHasPopup)}" .disabled="${this.disabled}" .iconTag="${this.path?"ha-svg-icon":"span"}" .href="${this.href}" .target="${this.target}" .rel="${this.rel}" .download="${this.download}"> ${this.path?a.qy`<ha-svg-icon aria-hidden="true" .path="${this.path}"></ha-svg-icon>`:a.qy`<span><slot></slot></span>`} </ha-button> `}constructor(...t){super(...t),this.disabled=!1,this.hideTitle=!1,this.selected=!1}}l.shadowRootOptions={mode:"open",delegatesFocus:!0},l.styles=a.AH`: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,o.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],l.prototype,"disabled",void 0),(0,o.Cg)([(0,n.MZ)({type:String})],l.prototype,"path",void 0),(0,o.Cg)([(0,n.MZ)({type:String})],l.prototype,"label",void 0),(0,o.Cg)([(0,n.MZ)({type:String,attribute:"aria-haspopup"})],l.prototype,"ariaHasPopup",void 0),(0,o.Cg)([(0,n.MZ)({attribute:"hide-title",type:Boolean})],l.prototype,"hideTitle",void 0),(0,o.Cg)([(0,n.MZ)({type:Boolean,reflect:!0})],l.prototype,"selected",void 0),(0,o.Cg)([(0,n.MZ)()],l.prototype,"href",void 0),(0,o.Cg)([(0,n.MZ)()],l.prototype,"target",void 0),(0,o.Cg)([(0,n.MZ)()],l.prototype,"rel",void 0),(0,o.Cg)([(0,n.MZ)()],l.prototype,"download",void 0),l=(0,o.Cg)([(0,n.EM)("ha-icon-button")],l),s()}catch(t){s(t)}})},2054(t,e,i){i.a(t,async function(t,e){try{var s=i(62826),o=i(5124),a=i(22441),n=i(1087),r=i(44249),h=i(26300),c=t([h]);h=(c.then?(await c)():c)[0];const l="M3,6H21V8H3V6M3,11H21V13H3V11M3,16H21V18H3V16Z";class d extends o.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 o.s6;const t=this._hasNotifications&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);return o.qy` <ha-icon-button .label="${this.hass.localize("ui.sidebar.sidebar_toggle")}" .path="${l}" @click="${this._toggleMenu}"></ha-icon-button> ${t?o.qy`<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,s=!1===e?.kioskMode&&(i||"always_hidden"===e?.dockedSidebar),o=!1===this.hass.kioskMode&&(this.narrow||"always_hidden"===this.hass.dockedSidebar);this.hasUpdated&&s===o||(this._show=o||this._alwaysVisible,o?this._subscribeNotifications():this._unsubNotifications&&(this._unsubNotifications(),this._unsubNotifications=void 0))}_subscribeNotifications(){if(this._unsubNotifications)throw new Error("Already subscribed");this._unsubNotifications=(0,r.V)(this.hass.connection,t=>{this._hasNotifications=t.length>0})}_toggleMenu(){(0,n.r)(this,"hass-toggle-menu")}constructor(...t){super(...t),this.narrow=!1,this._hasNotifications=!1,this._show=!1,this._alwaysVisible=!1,this._attachNotifOnConnect=!1}}d.styles=o.AH`: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,s.Cg)([(0,a.MZ)({type:Boolean})],d.prototype,"narrow",void 0),(0,s.Cg)([(0,a.MZ)({attribute:!1})],d.prototype,"hass",void 0),(0,s.Cg)([(0,a.wk)()],d.prototype,"_hasNotifications",void 0),(0,s.Cg)([(0,a.wk)()],d.prototype,"_show",void 0),d=(0,s.Cg)([(0,a.EM)("ha-menu-button")],d),e()}catch(t){e(t)}})},67094(t,e,i){i.r(e),i.d(e,{HaSvgIcon:()=>n});var s=i(62826),o=i(5124),a=i(22441);class n extends o.WF{render(){return o.JW` <svg viewBox="${this.viewBox||"0 0 24 24"}" preserveAspectRatio="xMidYMid meet" focusable="false" role="img" aria-hidden="true"> <g> ${this.path?o.JW`<path class="primary-path" d="${this.path}"></path>`:o.s6} ${this.secondaryPath?o.JW`<path class="secondary-path" d="${this.secondaryPath}"></path>`:o.s6} </g> </svg>`}}n.styles=o.AH`: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,s.Cg)([(0,a.MZ)()],n.prototype,"path",void 0),(0,s.Cg)([(0,a.MZ)({attribute:!1})],n.prototype,"secondaryPath",void 0),(0,s.Cg)([(0,a.MZ)({attribute:!1})],n.prototype,"viewBox",void 0),n=(0,s.Cg)([(0,a.EM)("ha-svg-icon")],n)},44249(t,e,i){i.d(e,{V:()=>s});const s=(t,e)=>{const i=new o,s=t.subscribeMessage(t=>e(i.processMessage(t)),{type:"persistent_notification/subscribe"});return()=>{s.then(t=>t?.())}};class o{processMessage(t){if("removed"===t.type)for(const e of Object.keys(t.notifications))delete this.notifications[e];else this.notifications={...this.notifications,...t.notifications};return Object.values(this.notifications)}constructor(){this.notifications={}}}},8872(t,e,i){i.d(e,{F:()=>o,_:()=>a});var s=i(1087);const o=()=>Promise.all([i.e(92769),i.e(3283),i.e(33192),i.e(26092),i.e(66201),i.e(90108)]).then(i.bind(i,22756)),a=(t,e)=>{(0,s.r)(t,"show-dialog",{dialogTag:"dialog-device-registry-detail",dialogImport:o,dialogParams:e})}},74699(t,e,i){i.d(e,{X:()=>a});var s=i(1087);const o=()=>Promise.all([i.e(3650),i.e(95309)]).then(i.bind(i,284)),a=(t,e)=>{(0,s.r)(t,"show-dialog",{dialogTag:"dialog-edit-home",dialogImport:o,dialogParams:e})}},75480(t,e,i){i.d(e,{x:()=>a});var s=i(1087);const o=()=>i.e(31581).then(i.bind(i,31756)),a=(t,e)=>{(0,s.r)(t,"show-dialog",{dialogTag:"dialog-new-overview",dialogImport:o,dialogParams:e})}},50647(t,e,i){i.a(t,async function(t,s){try{i.r(e);var o=i(62826),a=i(88696),n=i(5124),r=i(22441),h=i(89784),c=i(62384),l=i(91926),d=i(9899),p=i(19459),g=i(18350),u=(i(67094),i(2514)),v=i(58594),f=i(48250),_=i(53580),y=i(81619),b=i(34023),m=i(8872),w=i(76559),C=i(29994),x=i(15656),M=i(74699),$=i(75480),L=i(99774),k=t([g,C]);[g,C]=k.then?(await k)():k;const H="M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z";class A extends n.WF{get _showBanner(){if(this._config.welcome_banner_dismissed)return!1;if("RUNNING"!==this.hass.config.state)return!1;const t=this.hass.systemData?.onboarded_version,e=t&&(0,c.v)(t,2026,2),i=(0,L.Dq)(this.hass);return!e&&!i}willUpdate(t){if(super.willUpdate(t),!this.hasUpdated)return void this._setup();if(t.has("route")&&this._updateExtraActionItems(),!t.has("hass"))return;const e=t.get("hass");if(e&&e.localize!==this.hass.localize)this._setLovelace();else if(e&&this.hass){if((e.entities!==this.hass.entities||e.devices!==this.hass.devices||e.areas!==this.hass.areas||e.floors!==this.hass.floors||e.panels!==this.hass.panels)&&"RUNNING"===this.hass.config.state)return void this._debounceRegistriesChanged();"RUNNING"===this.hass.config.state&&"RUNNING"!==e.config.state&&this._setup()}}async _setup(){this._updateExtraActionItems(),this._loadConfigPromise=this._loadConfig(),await this._loadConfigPromise,this._setLovelace()}async _loadConfig(){try{const[t,e]=await Promise.all([this.hass.loadFragmentTranslation("lovelace"),(0,f.wE)(this.hass.connection,"home")]);this._config=e||{}}catch(t){console.error("Failed to load favorites:",t),this._config={}}}_updateExtraActionItems(){const t=this.route?.path?.split("/")[1];t?.startsWith("areas-")?this._extraActionItems=[{icon:H,labelKey:"ui.panel.lovelace.menu.edit_area",action:this._editArea}]:this._extraActionItems=t&&"overview"!==t?void 0:[{icon:H,labelKey:"ui.panel.lovelace.menu.edit_overview",action:this._editHome}]}async _showAddIntegrationDialog(){await this.hass.loadFragmentTranslation("config"),(0,w.X)(this,{navigateToResult:!1})}_showAssignAreaDialog(t){const e=this.hass.devices[t];e&&(0,m._)(this,{device:e,updateEntry:async e=>{await(0,v.FB)(this.hass,t,e)}})}render(){if(!this._lovelace)return n.s6;const t=(0,h.W)({"--view-container-padding-top":this._bannerHeight.value?`${this._bannerHeight.value}px`:void 0});return n.qy` ${this._renderBanner()} <hui-root .hass="${this.hass}" .narrow="${this.narrow}" .lovelace="${this._lovelace}" .route="${this.route}" .panel="${this.panel}" no-edit .extraActionItems="${this._extraActionItems}" @ll-custom="${this._handleLLCustomEvent}" style="${t}"></hui-root> `}_renderBanner(){return this._showBanner?n.qy` <div class="banner"> <div class="banner-content"> <ha-svg-icon .path="${_.mdiHomeAssistant}"></ha-svg-icon> <span class="banner-text"> ${this.hass.localize("ui.panel.home.banner.welcome_message")} </span> </div> <div class="banner-actions"> <ha-button size="small" appearance="filled" @click="${this._learnMore}"> ${this.hass.localize("ui.panel.home.banner.learn_more")} </ha-button> </div> </div> `:n.s6}updated(t){super.updated(t),(t.has("_showBanner")||t.has("_lovelace"))&&this._banner&&this._bannerHeight.observe(this._banner)}_learnMore(){(0,$.x)(this,{dismiss:async()=>{const t={...this._config,welcome_banner_dismissed:!0};this._config=t,await(0,f.x0)(this.hass.connection,"home",t)}})}async _setLovelace(){this._loadConfigPromise&&await this._loadConfigPromise;const t={strategy:{type:"home",favorite_entities:this._config.favorite_entities,home_panel:!0,hide_welcome_message:this._config.hide_welcome_message,hide_suggested_entities:this._config.hide_suggested_entities,shortcuts:this._config.shortcuts}},e=await(0,x.d4)(t,this.hass);(0,p.b)(e,this._lovelace?.config)||(this._lovelace={config:e,rawConfig:e,editMode:!1,urlPath:"home",mode:"generated",locale:this.hass.locale,enableFullEditMode:()=>{},saveConfig:async()=>{},deleteConfig:async()=>{},setEditMode:()=>{},showToast:()=>{}})}async _saveConfig(t){try{await(0,f.x0)(this.hass.connection,"home",t),this._config=t||{}}catch(t){return console.error("Failed to save home configuration:",t),void(0,y.P)(this,{message:this.hass.localize("ui.panel.home.editor.save_failed"),duration:0,dismissable:!0})}(0,y.P)(this,{message:this.hass.localize("ui.common.successfully_saved")}),this._setLovelace()}constructor(...t){super(...t),this.narrow=!1,this._config={},this._bannerHeight=new a.P(this,{target:null,callback:t=>t[0]?.target?.offsetHeight??0}),this._debounceRegistriesChanged=(0,d.s)(()=>this._registriesChanged(),200),this._registriesChanged=async()=>{const t=this.route?.path?.split("/")[1];if(t?.startsWith("areas-")){const e=t.replace("areas-","");if(!this.hass.areas[e])return void(0,l.oo)("/home")}this._setLovelace()},this._editHome=()=>{(0,M.X)(this,{config:this._config,saveConfig:async t=>{await this._saveConfig(t)}})},this._editArea=async()=>{const t=this.route?.path?.split("/")[1];if(!t?.startsWith("areas-"))return;const e=t.replace("areas-",""),i=this.hass.areas[e];i&&(await this.hass.loadFragmentTranslation("config"),(0,b.J)(this,{entry:i,updateEntry:t=>(0,u.gs)(this.hass,e,t)}))},this._handleLLCustomEvent=t=>{const e=t.detail;if(e.home_panel){const{type:t}=e.home_panel;switch(t){case"assign_area":{const{device_id:t}=e.home_panel;this._showAssignAreaDialog(t);break}case"add_integration":this._showAddIntegrationDialog()}}}}}A.styles=n.AH`:host{display:block}.banner{display:flex;align-items:center;flex-wrap:wrap;padding:var(--ha-space-2) var(--ha-space-4);background-color:var(--primary-color);color:var(--text-primary-color);gap:var(--ha-space-2);position:fixed;top:var(--header-height,56px);left:var(--ha-sidebar-width,0px);right:0;z-index:5}.banner-content{display:flex;align-items:center;gap:var(--ha-space-2);flex:1;min-width:200px}.banner ha-svg-icon{--mdc-icon-size:24px;flex-shrink:0}.banner-text{font-size:14px;font-weight:500}.banner-actions{display:flex;flex:none;gap:var(--ha-space-2);align-items:center;margin-inline-start:auto}.banner-actions ha-button::part(base){text-wrap:nowrap}`,(0,o.Cg)([(0,r.MZ)({attribute:!1})],A.prototype,"hass",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],A.prototype,"narrow",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],A.prototype,"route",void 0),(0,o.Cg)([(0,r.MZ)({attribute:!1})],A.prototype,"panel",void 0),(0,o.Cg)([(0,r.wk)()],A.prototype,"_lovelace",void 0),(0,o.Cg)([(0,r.wk)()],A.prototype,"_config",void 0),(0,o.Cg)([(0,r.wk)()],A.prototype,"_extraActionItems",void 0),(0,o.Cg)([(0,r.P)(".banner")],A.prototype,"_banner",void 0),A=(0,o.Cg)([(0,r.EM)("ha-panel-home")],A),s()}catch(t){s(t)}})}};