iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
10 lines • 19.1 kB
JavaScript
;(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[36748],{93421:function(e,t,n){n.d(t,{IW:function(){return c},dH:function(){return d},fI:function(){return l}});n(44114),n(62953);var o=n(35211),i=n(22792),r=n(32172);const a=(e,t)=>{let n=e;for(const o of t){if(null==n)return;n=n[o]}return n},s=(e,t,n)=>{const i=(0,r.p)({transformer:function(e){return n.call(this,e)},watch:t?[t]:[]}),a=(0,o.Fg)({context:e,subscribe:!0});return(e,t)=>{i(e,t),a(e,t)}},l=e=>s(i.iN,e.entityIdPath[0],function(t){const n=a(this,e.entityIdPath);return"string"==typeof n?null==t?void 0:t[n]:void 0}),d=e=>s(i.X1,e.entityIdPath[0],function(t){const n=a(this,e.entityIdPath);return"string"==typeof n?null==t?void 0:t[n]:void 0}),c=()=>s(i.D5,void 0,({localize:e})=>e)},38962:function(e,t,n){n.a(e,async function(e,o){try{n.r(t);n(62953);var i=n(40445),r=n(5124),a=n(67576),s=n(6412),l=n(93421),d=n(1087),c=n(26300),p=(n(67094),e([c]));c=(p.then?(await p)():p)[0];let h,m,g,u,f=e=>e;const v="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",_={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 w extends r.WF{render(){var e;return(0,r.qy)(h||(h=f` <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,s.H)({[this.alertType]:!0}),this.title?"":"no-title",_[this.alertType],(0,s.H)({content:!0,narrow:this.narrow}),this.title?(0,r.qy)(m||(m=f`<div class="title">${0}</div>`),this.title):r.s6,this.dismissable?(0,r.qy)(g||(g=f`<ha-icon-button @click="${0}" .label="${0}" .path="${0}"></ha-icon-button>`),this._dismissClicked,null===(e=this._localize)||void 0===e?void 0:e.call(this,"ui.common.dismiss_alert"),v):r.s6)}_dismissClicked(){(0,d.r)(this,"alert-dismissed-clicked")}constructor(...e){super(...e),this.title="",this.alertType="info",this.dismissable=!1,this.narrow=!1}}w.styles=(0,r.AH)(u||(u=f`.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,i.Cg)([(0,a.MZ)()],w.prototype,"title",void 0),(0,i.Cg)([(0,a.MZ)({attribute:"alert-type"})],w.prototype,"alertType",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean})],w.prototype,"dismissable",void 0),(0,i.Cg)([(0,a.wk)(),(0,l.IW)()],w.prototype,"_localize",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean})],w.prototype,"narrow",void 0),w=(0,i.Cg)([(0,a.EM)("ha-alert")],w),o()}catch(h){o(h)}})},76776:function(e,t,n){n(62953);var o=n(40445),i=n(5124),r=n(67576);let a,s,l,d=e=>e;class c extends i.WF{render(){return(0,i.qy)(a||(a=d` ${0} <slot></slot> `),this.header?(0,i.qy)(s||(s=d`<h1 class="card-header">${0}</h1>`),this.header):i.s6)}constructor(...e){super(...e),this.raised=!1}}c.styles=(0,i.AH)(l||(l=d`:host{background:var(--ha-card-background,var(--card-background-color,#fff));-webkit-backdrop-filter:var(--ha-card-backdrop-filter,none);backdrop-filter:var(--ha-card-backdrop-filter,none);box-shadow:var(--ha-card-box-shadow,none);box-sizing:border-box;border-radius:var(--ha-card-border-radius,var(--ha-border-radius-lg));border-width:var(--ha-card-border-width,1px);border-style:solid;border-color:var(--ha-card-border-color,var(--divider-color,#e0e0e0));color:var(--primary-text-color);display:block;transition:all .3s ease-out;position:relative}:host([raised]){border:none;box-shadow:var(--ha-card-box-shadow,0px 2px 1px -1px rgba(0,0,0,.2),0px 1px 1px 0px rgba(0,0,0,.14),0px 1px 3px 0px rgba(0,0,0,.12))}.card-header,:host ::slotted(.card-header){color:var(--ha-card-header-color,var(--primary-text-color));font-family:var(--ha-card-header-font-family, inherit);font-size:var(--ha-card-header-font-size, var(--ha-font-size-2xl));letter-spacing:-.012em;line-height:var(--ha-line-height-expanded);padding:var(--ha-space-3) var(--ha-space-4) var(--ha-space-4);display:block;margin-block-start:0;margin-block-end:0;font-weight:var(--ha-font-weight-normal)}
:host
::slotted(
.card-content:not(:nth-child(1 of .card-content, .card-header))
),
slot:not(:first-child)::slotted(.card-content) {
padding-top: 0;
margin-top: calc(var(--ha-space-2) * -1);
}
:host ::slotted(.card-content){padding:var(--ha-space-4)}:host ::slotted(.card-actions){border-top:1px solid var(--divider-color,#e8e8e8);padding:var(--ha-space-2)}`)),(0,o.Cg)([(0,r.MZ)()],c.prototype,"header",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean,reflect:!0})],c.prototype,"raised",void 0),c=(0,o.Cg)([(0,r.EM)("ha-card")],c)},28732:function(e,t,n){var o=n(40445),i=n(27686),r=n(7731),a=n(5124),s=n(67576);let l,d,c,p=e=>e;class h extends i.J{renderRipple(){return this.noninteractive?"":super.renderRipple()}static get styles(){return[r.R,(0,a.AH)(l||(l=p`:host{padding-left:var(--mdc-list-side-padding-left,var(--mdc-list-side-padding,20px));padding-inline-start:var(--mdc-list-side-padding-left,var(--mdc-list-side-padding,20px));padding-right:var(--mdc-list-side-padding-right,var(--mdc-list-side-padding,20px));padding-inline-end:var(--mdc-list-side-padding-right,var(--mdc-list-side-padding,20px))}:host([graphic=avatar]:not([twoLine])),:host([graphic=icon]:not([twoLine])){height:48px}span.material-icons:first-of-type{margin-inline-start:0px!important;margin-inline-end:var(--mdc-list-item-graphic-margin,16px)!important;direction:var(--direction)!important}span.material-icons:last-of-type{margin-inline-start:auto!important;margin-inline-end:0px!important;direction:var(--direction)!important}.mdc-deprecated-list-item__meta{display:var(--mdc-list-item-meta-display);align-items:center;flex-shrink:0}:host([graphic=icon]:not([twoline])) .mdc-deprecated-list-item__graphic{margin-inline-end:var(--mdc-list-item-graphic-margin,20px)!important}:host([multiline-secondary]){height:auto}:host([multiline-secondary]) .mdc-deprecated-list-item__text{padding:8px 0}:host([multiline-secondary]) .mdc-deprecated-list-item__secondary-text{text-overflow:initial;white-space:normal;overflow:auto;display:inline-block;margin-top:10px}:host([multiline-secondary]) .mdc-deprecated-list-item__primary-text{margin-top:10px}:host([multiline-secondary]) .mdc-deprecated-list-item__secondary-text::before{display:none}:host([multiline-secondary]) .mdc-deprecated-list-item__primary-text::before{display:none}:host([disabled]){color:var(--disabled-text-color)}:host([noninteractive]){pointer-events:unset}`)),"rtl"===document.dir?(0,a.AH)(d||(d=p`span.material-icons:first-of-type,span.material-icons:last-of-type{direction:rtl!important;--direction:rtl}`)):(0,a.AH)(c||(c=p``))]}}h=(0,o.Cg)([(0,s.EM)("ha-list-item")],h)},81762:function(e,t,n){n(62953);var o=n(40445),i=n(5124),r=n(67576),a=n(6412),s=n(14503),l=n(27330);let d,c,p,h,m,g=e=>e;const u={passive:!0};class f extends l.L{_isPaneHeader(){return this.pane}_renderContent(){return(0,i.qy)(d||(d=g` <div class="${0}"> ${0} <div class="main"> ${0} <div class="content"> <slot></slot> </div> </div> </div> `),(0,a.H)({"top-app-bar-fixed-adjust":!0,"top-app-bar-fixed-adjust--pane":this.pane}),this.pane?(0,i.qy)(c||(c=g`<div class="pane"> <div class="shadow-container"></div> <div class="ha-scrollbar"> <slot name="pane"></slot> </div> ${0} </div>`),this.footer?(0,i.qy)(p||(p=g`<div class="footer"> <slot name="pane-footer"></slot> </div>`)):i.s6):i.s6,this.pane?(0,i.qy)(h||(h=g`<div class="shadow-container"></div>`)):i.s6)}willUpdate(e){super.willUpdate(e),e.has("pane")&&this.hasUpdated&&this._unregisterListeners()}updated(e){super.updated(e),e.has("pane")&&void 0!==e.get("pane")&&(this._registerListeners(),this._syncScrollState())}_registerListeners(){var e,t;if(this.pane)return null===(e=this._paneElement)||void 0===e||e.addEventListener("scroll",this._handlePaneScroll,u),void(null===(t=this._contentElement)||void 0===t||t.addEventListener("scroll",this._handlePaneScroll,u));super._registerListeners()}_unregisterListeners(){var e,t;null===(e=this._paneElement)||void 0===e||e.removeEventListener("scroll",this._handlePaneScroll),null===(t=this._contentElement)||void 0===t||t.removeEventListener("scroll",this._handlePaneScroll),super._unregisterListeners()}constructor(...e){super(...e),this.pane=!1,this.footer=!1,this._handlePaneScroll=e=>{var t;const n=e.currentTarget;null===(t=n.parentElement)||void 0===t||t.classList.toggle("scrolled",n.scrollTop>0)}}}f.styles=[l.p,s.dp,(0,i.AH)(m||(m=g`.shadow-container{position:absolute;top:calc(-1 * var(--header-height));width:100%;height:var(--header-height);z-index:1;transition:box-shadow .2s linear}.scrolled .shadow-container{box-shadow:var(--ha-box-shadow-m)}#title{border-right:1px solid rgba(255,255,255,.12);border-inline-end:1px solid rgba(255,255,255,0.12);border-inline-start:initial;box-sizing:border-box;flex:0 0 var(--sidepane-width,250px);width:var(--sidepane-width,250px)}.top-app-bar-fixed-adjust--pane{display:flex;height:calc(100vh - var(--header-height,0px) - var(--safe-area-inset-top,0px) - var(--safe-area-inset-bottom,0px))}.pane{border-right:1px solid var(--divider-color);border-inline-end:1px solid var(--divider-color);border-inline-start:initial;box-sizing:border-box;display:flex;flex:0 0 var(--sidepane-width,250px);width:var(--sidepane-width,250px);flex-direction:column;position:relative}.pane .ha-scrollbar{flex:1}.pane .footer{border-top:1px solid var(--divider-color);padding-bottom:8px}.main{min-height:100%}.top-app-bar-fixed-adjust--pane .main{position:relative;flex:1;height:100%}.top-app-bar-fixed-adjust--pane .content{height:100%;overflow:auto}`))],(0,o.Cg)([(0,r.MZ)({type:Boolean})],f.prototype,"pane",void 0),(0,o.Cg)([(0,r.MZ)({type:Boolean})],f.prototype,"footer",void 0),(0,o.Cg)([(0,r.P)(".content")],f.prototype,"_contentElement",void 0),(0,o.Cg)([(0,r.P)(".pane .ha-scrollbar")],f.prototype,"_paneElement",void 0),f=(0,o.Cg)([(0,r.EM)("ha-two-pane-top-app-bar-fixed")],f)},26571:function(e,t,n){n.d(t,{Al:function(){return r},KY:function(){return i},PN:function(){return l},dG:function(){return c},jm:function(){return d},m7:function(){return u},sR:function(){return p},t1:function(){return s},t2:function(){return m},x:function(){return g},yu:function(){return h}});var o=n(95350);const i=["bluetooth","dhcp","discovery","esphome","hardware","hassio","homekit","integration_discovery","mqtt","ssdp","unignore","usb","zeroconf"],r=["reauth"],a={"HA-Frontend-Base":`${location.protocol}//${location.host}`},s=(e,t,n)=>e.callApi("POST","config/config_entries/flow",{handler:t,entry_id:n},a),l=(e,t)=>e.callApi("GET",`config/config_entries/flow/${t}`,void 0,a),d=(e,t,n)=>e.callApi("POST",`config/config_entries/flow/${t}`,n,a),c=(e,t,n)=>e.callWS({type:"config_entries/ignore_flow",flow_id:t,title:n}),p=(e,t)=>e.callApi("DELETE",`config/config_entries/flow/${t}`),h=(e,t)=>e.callApi("GET","config/config_entries/flow_handlers"+(t?`?type=${t}`:"")),m=e=>e.sendMessagePromise({type:"config_entries/flow/progress"}),g=(e,t)=>e.connection.subscribeMessage(e=>t(e),{type:"config_entries/flow/subscribe"}),u=(e,t)=>t.context.title_placeholders&&0!==Object.keys(t.context.title_placeholders).length?e(`component.${t.handler}.config.flow_title`,t.context.title_placeholders)||("name"in t.context.title_placeholders?t.context.title_placeholders.name:(0,o.p$)(e,t.handler)):(0,o.p$)(e,t.handler)},77763:function(e,t,n){n.d(t,{W:function(){return v}});n(89463),n(3362),n(62953);var o=n(5124),i=n(26571),r=n(95350),a=n(29094);let s,l,d,c,p,h,m,g,u,f=e=>e;const v=(e,t)=>(0,a.g)(e,t,{flowType:"config_flow",showDevices:!0,createFlow:async(e,n)=>{const[o]=await Promise.all([(0,i.t1)(e,n,t.entryId),e.loadFragmentTranslation("config"),e.loadBackendTranslation("config",n),e.loadBackendTranslation("selector",n),e.loadBackendTranslation("title",n)]);return o},fetchFlow:async(e,t)=>{const[n]=await Promise.all([(0,i.PN)(e,t),e.loadFragmentTranslation("config")]);return await Promise.all([e.loadBackendTranslation("config",n.handler),e.loadBackendTranslation("selector",n.handler),e.loadBackendTranslation("title",n.handler)]),n},handleFlowStep:i.jm,deleteFlow:i.sR,renderAbortDescription(e,t){const n=e.localize(`component.${t.translation_domain||t.handler}.config.abort.${t.reason}`,t.description_placeholders);return n?(0,o.qy)(s||(s=f` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),n):t.reason},renderShowFormStepHeader(e,t){return e.localize(`component.${t.translation_domain||t.handler}.config.step.${t.step_id}.title`,t.description_placeholders)||e.localize(`component.${t.handler}.title`)},renderShowFormStepDescription(e,t){const n=e.localize(`component.${t.translation_domain||t.handler}.config.step.${t.step_id}.description`,t.description_placeholders);return n?(0,o.qy)(l||(l=f` <ha-markdown .allowDataUrl="${0}" allow-svg breaks .content="${0}"></ha-markdown> `),"zwave_js"===t.handler,n):""},renderShowFormStepFieldLabel(e,t,n,o){var i;if("expandable"===n.type)return e.localize(`component.${t.handler}.config.step.${t.step_id}.sections.${n.name}.name`,t.description_placeholders)||n.name;const r=null!=o&&null!==(i=o.path)&&void 0!==i&&i[0]?`sections.${o.path[0]}.`:"";return e.localize(`component.${t.handler}.config.step.${t.step_id}.${r}data.${n.name}`,t.description_placeholders)||n.name},renderShowFormStepFieldHelper(e,t,n,i){var r;if("expandable"===n.type)return e.localize(`component.${t.translation_domain||t.handler}.config.step.${t.step_id}.sections.${n.name}.description`,t.description_placeholders);const a=null!=i&&null!==(r=i.path)&&void 0!==r&&r[0]?`sections.${i.path[0]}.`:"",s=e.localize(`component.${t.translation_domain||t.handler}.config.step.${t.step_id}.${a}data_description.${n.name}`,t.description_placeholders);return s?(0,o.qy)(d||(d=f`<ha-markdown breaks .content="${0}"></ha-markdown>`),s):""},renderShowFormStepFieldError(e,t,n){return e.localize(`component.${t.translation_domain||t.translation_domain||t.handler}.config.error.${n}`,t.description_placeholders)||n},renderShowFormStepFieldLocalizeValue(e,t,n){return e.localize(`component.${t.handler}.selector.${n}`)},renderShowFormStepSubmitButton(e,t){return e.localize(`component.${t.handler}.config.step.${t.step_id}.submit`)||e.localize("ui.panel.config.integrations.config_flow."+(!1===t.last_step?"next":"submit"))},renderExternalStepHeader(e,t){return e.localize(`component.${t.handler}.config.step.${t.step_id}.title`)||e.localize("ui.panel.config.integrations.config_flow.external_step.open_site")},renderExternalStepDescription(e,t){const n=e.localize(`component.${t.translation_domain||t.handler}.config.${t.step_id}.description`,t.description_placeholders);return(0,o.qy)(c||(c=f` <p> ${0} </p> ${0} `),e.localize("ui.panel.config.integrations.config_flow.external_step.description"),n?(0,o.qy)(p||(p=f` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),n):"")},renderCreateEntryDescription(e,t){const n=e.localize(`component.${t.translation_domain||t.handler}.config.create_entry.${t.description||"default"}`,t.description_placeholders);return(0,o.qy)(h||(h=f` ${0} `),n?(0,o.qy)(m||(m=f` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),n):o.s6)},renderShowFormProgressHeader(e,t){return e.localize(`component.${t.handler}.config.step.${t.step_id}.title`)||e.localize(`component.${t.handler}.title`)},renderShowFormProgressDescription(e,t){const n=e.localize(`component.${t.translation_domain||t.handler}.config.progress.${t.progress_action}`,t.description_placeholders);return n?(0,o.qy)(g||(g=f` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),n):""},renderMenuHeader(e,t){return e.localize(`component.${t.handler}.config.step.${t.step_id}.title`)||e.localize(`component.${t.handler}.title`)},renderMenuDescription(e,t){const n=e.localize(`component.${t.translation_domain||t.handler}.config.step.${t.step_id}.description`,t.description_placeholders);return n?(0,o.qy)(u||(u=f` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),n):""},renderMenuOption(e,t,n){return e.localize(`component.${t.translation_domain||t.handler}.config.step.${t.step_id}.menu_options.${n}`,t.description_placeholders)},renderMenuOptionDescription(e,t,n){return e.localize(`component.${t.translation_domain||t.handler}.config.step.${t.step_id}.menu_option_descriptions.${n}`,t.description_placeholders)},renderLoadingDescription(e,t,n,o){if("loading_flow"!==t&&"loading_step"!==t)return"";const i=(null==o?void 0:o.handler)||n;return e.localize(`ui.panel.config.integrations.config_flow.loading.${t}`,{integration:i?(0,r.p$)(e.localize,i):e.localize("ui.panel.config.integrations.config_flow.loading.fallback_title")})}})},29094:function(e,t,n){n.d(t,{g:function(){return r}});n(3362),n(62953);var o=n(1087);const i=()=>Promise.all([n.e(72850),n.e(39763),n.e(32450),n.e(46095),n.e(7305),n.e(92769),n.e(3283),n.e(80131),n.e(98470),n.e(54066),n.e(84038),n.e(62364),n.e(62574),n.e(26092),n.e(39005),n.e(28501),n.e(29792)]).then(n.bind(n,78314)),r=(e,t,n)=>{(0,o.r)(e,"show-dialog",{dialogTag:"dialog-data-entry-flow",dialogImport:i,dialogParams:Object.assign(Object.assign({},t),{},{flowConfig:n,dialogParentElement:e})})}}}]);