UNPKG

iobroker.lovelace

Version:

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

4 lines 14 kB
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[99422],{89020:function(e,n,o){o.d(n,{P:function(){return $},x:function(){return w}});o(18111),o(22489),o(3362);var i=o(5124),t=o(77423),a=o(95350),r=o(95093),l=o(77763),s=o(65063),c=o(90676),d=o(44919),p=o(36918),g=o(36312),f=o(91926);let u,h,m,_=e=>e;const w=["zha","zwave_js","matter"],$=async(e,n,o,w)=>{if(null!=w&&w.domain){const e=await n.loadBackendTranslation("title",w.domain);w.domain=(0,a.p$)(e,w.domain)}if(null!=w&&w.brand){var $;const e=await(0,r.O)(n);w.brand=(null===($=e.core.integration[w.brand])||void 0===$?void 0:$.name)||w.brand}if("zwave_js"===o){const a=null!=w&&w.config_entry?void 0:(await(0,t.VN)(n,{domain:o})).filter(e=>!e.disabled_by);if(!((0,g.x)(n.config,"zwave_js")&&(null!=w&&w.config_entry||null!=a&&a.length)))return void(0,s.dk)(e,{title:n.localize("ui.panel.config.integrations.config_flow.missing_zwave_zigbee_title",{integration:"Z-Wave"}),text:n.localize("ui.panel.config.integrations.config_flow.missing_zwave_zigbee",{integration:"Z-Wave",brand:(null==w?void 0:w.brand)||(null==w?void 0:w.domain)||"Z-Wave",supported_hardware_link:(0,i.qy)(u||(u=_`<a href="${0}" target="_blank" rel="noreferrer">${0}</a>`),(0,p.o)(n,"/docs/z-wave/controllers"),n.localize("ui.panel.config.integrations.config_flow.supported_hardware"))}),confirmText:n.localize("ui.panel.config.integrations.config_flow.proceed"),confirm:()=>{(0,l.W)(e,{startFlowHandler:"zwave_js"})}});(0,d.X)(e,{entry_id:(null==w?void 0:w.config_entry)||a[0].entry_id})}else if("zha"===o){const a=null!=w&&w.config_entry?void 0:(await(0,t.VN)(n,{domain:o})).filter(e=>!e.disabled_by);if(!((0,g.x)(n.config,"zha")&&(null!=w&&w.config_entry||null!=a&&a.length)))return void(0,s.dk)(e,{title:n.localize("ui.panel.config.integrations.config_flow.missing_zwave_zigbee_title",{integration:"Zigbee"}),text:n.localize("ui.panel.config.integrations.config_flow.missing_zwave_zigbee",{integration:"Zigbee",brand:(null==w?void 0:w.brand)||(null==w?void 0:w.domain)||"Zigbee",supported_hardware_link:(0,i.qy)(h||(h=_`<a href="${0}" target="_blank" rel="noreferrer">${0}</a>`),(0,p.o)(n,"/integrations/zha/#known-working-zigbee-radio-modules"),n.localize("ui.panel.config.integrations.config_flow.supported_hardware"))}),confirmText:n.localize("ui.panel.config.integrations.config_flow.proceed"),confirm:()=>{(0,l.W)(e,{startFlowHandler:"zha"})}});(0,f.oo)("/config/zha/add")}else if("matter"===o){const a=null!=w&&w.config_entry?void 0:(await(0,t.VN)(n,{domain:o})).filter(e=>!e.disabled_by);if(!((0,g.x)(n.config,o)&&(null!=w&&w.config_entry||null!=a&&a.length)))return void(0,s.dk)(e,{title:n.localize("ui.panel.config.integrations.config_flow.missing_zwave_zigbee_title",{integration:"Matter"}),text:n.localize("ui.panel.config.integrations.config_flow.missing_matter",{integration:"Matter",brand:(null==w?void 0:w.brand)||(null==w?void 0:w.domain)||"Matter",supported_hardware_link:(0,i.qy)(m||(m=_`<a href="${0}" target="_blank" rel="noreferrer">${0}</a>`),(0,p.o)(n,"/integrations/matter"),n.localize("ui.panel.config.integrations.config_flow.supported_hardware"))}),confirmText:n.localize("ui.panel.config.integrations.config_flow.proceed"),confirm:()=>{(0,l.W)(e,{startFlowHandler:"matter"})}});(0,c.g)(e)}}},65829:function(e,n,o){o.a(e,async function(e,i){try{o.r(n),o.d(n,{HaSpinner:function(){return p}});var t=o(40445),a=o(55262),r=o(5124),l=o(67576),s=e([a]);a=(s.then?(await s)():s)[0];let c,d=e=>e;class p extends a.A{updated(e){if(super.updated(e),e.has("size"))switch(this.size){case"tiny":this.style.setProperty("--ha-spinner-size","16px");break;case"small":this.style.setProperty("--ha-spinner-size","28px");break;case"medium":this.style.setProperty("--ha-spinner-size","48px");break;case"large":this.style.setProperty("--ha-spinner-size","68px");break;case void 0:this.style.removeProperty("--ha-progress-ring-size")}}static get styles(){return[a.A.styles,(0,r.AH)(c||(c=d`:host{--indicator-color:var( --ha-spinner-indicator-color, var(--primary-color) );--track-color:var(--ha-spinner-divider-color, var(--divider-color));--track-width:4px;--speed:3.5s;font-size:var(--ha-spinner-size, 48px)}`))]}}(0,t.Cg)([(0,l.MZ)()],p.prototype,"size",void 0),p=(0,t.Cg)([(0,l.EM)("ha-spinner")],p),i()}catch(c){i(c)}})},26571:function(e,n,o){o.d(n,{Al:function(){return a},KY:function(){return t},PN:function(){return s},dG:function(){return d},jm:function(){return c},m7:function(){return h},sR:function(){return p},t1:function(){return l},t2:function(){return f},x:function(){return u},yu:function(){return g}});var i=o(95350);const t=["bluetooth","dhcp","discovery","esphome","hardware","hassio","homekit","integration_discovery","mqtt","ssdp","unignore","usb","zeroconf"],a=["reauth"],r={"HA-Frontend-Base":`${location.protocol}//${location.host}`},l=(e,n,o)=>e.callApi("POST","config/config_entries/flow",{handler:n,entry_id:o},r),s=(e,n)=>e.callApi("GET",`config/config_entries/flow/${n}`,void 0,r),c=(e,n,o)=>e.callApi("POST",`config/config_entries/flow/${n}`,o,r),d=(e,n,o)=>e.callWS({type:"config_entries/ignore_flow",flow_id:n,title:o}),p=(e,n)=>e.callApi("DELETE",`config/config_entries/flow/${n}`),g=(e,n)=>e.callApi("GET","config/config_entries/flow_handlers"+(n?`?type=${n}`:"")),f=e=>e.sendMessagePromise({type:"config_entries/flow/progress"}),u=(e,n)=>e.connection.subscribeMessage(e=>n(e),{type:"config_entries/flow/subscribe"}),h=(e,n)=>n.context.title_placeholders&&0!==Object.keys(n.context.title_placeholders).length?e(`component.${n.handler}.config.flow_title`,n.context.title_placeholders)||("name"in n.context.title_placeholders?n.context.title_placeholders.name:(0,i.p$)(e,n.handler)):(0,i.p$)(e,n.handler)},95093:function(e,n,o){o.d(n,{O:function(){return i},s:function(){return t}});o(62953);const i=e=>e.callWS({type:"integration/descriptions"}),t=(e,n)=>{if(e){if(n in e){const o=e[n];if("integration_type"in o)return o}for(const o of Object.values(e))if("integrations"in o&&o.integrations&&n in o.integrations)return o.integrations[n]}}},77763:function(e,n,o){o.d(n,{W:function(){return _}});o(89463),o(3362),o(62953);var i=o(5124),t=o(26571),a=o(95350),r=o(29094);let l,s,c,d,p,g,f,u,h,m=e=>e;const _=(e,n)=>(0,r.g)(e,n,{flowType:"config_flow",showDevices:!0,createFlow:async(e,o)=>{const[i]=await Promise.all([(0,t.t1)(e,o,n.entryId),e.loadFragmentTranslation("config"),e.loadBackendTranslation("config",o),e.loadBackendTranslation("selector",o),e.loadBackendTranslation("title",o)]);return i},fetchFlow:async(e,n)=>{const[o]=await Promise.all([(0,t.PN)(e,n),e.loadFragmentTranslation("config")]);return await Promise.all([e.loadBackendTranslation("config",o.handler),e.loadBackendTranslation("selector",o.handler),e.loadBackendTranslation("title",o.handler)]),o},handleFlowStep:t.jm,deleteFlow:t.sR,renderAbortDescription(e,n){const o=e.localize(`component.${n.translation_domain||n.handler}.config.abort.${n.reason}`,n.description_placeholders);return o?(0,i.qy)(l||(l=m` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),o):n.reason},renderShowFormStepHeader(e,n){return e.localize(`component.${n.translation_domain||n.handler}.config.step.${n.step_id}.title`,n.description_placeholders)||e.localize(`component.${n.handler}.title`)},renderShowFormStepDescription(e,n){const o=e.localize(`component.${n.translation_domain||n.handler}.config.step.${n.step_id}.description`,n.description_placeholders);return o?(0,i.qy)(s||(s=m` <ha-markdown .allowDataUrl="${0}" allow-svg breaks .content="${0}"></ha-markdown> `),"zwave_js"===n.handler,o):""},renderShowFormStepFieldLabel(e,n,o,i){var t;if("expandable"===o.type)return e.localize(`component.${n.handler}.config.step.${n.step_id}.sections.${o.name}.name`,n.description_placeholders)||o.name;const a=null!=i&&null!==(t=i.path)&&void 0!==t&&t[0]?`sections.${i.path[0]}.`:"";return e.localize(`component.${n.handler}.config.step.${n.step_id}.${a}data.${o.name}`,n.description_placeholders)||o.name},renderShowFormStepFieldHelper(e,n,o,t){var a;if("expandable"===o.type)return e.localize(`component.${n.translation_domain||n.handler}.config.step.${n.step_id}.sections.${o.name}.description`,n.description_placeholders);const r=null!=t&&null!==(a=t.path)&&void 0!==a&&a[0]?`sections.${t.path[0]}.`:"",l=e.localize(`component.${n.translation_domain||n.handler}.config.step.${n.step_id}.${r}data_description.${o.name}`,n.description_placeholders);return l?(0,i.qy)(c||(c=m`<ha-markdown breaks .content="${0}"></ha-markdown>`),l):""},renderShowFormStepFieldError(e,n,o){return e.localize(`component.${n.translation_domain||n.translation_domain||n.handler}.config.error.${o}`,n.description_placeholders)||o},renderShowFormStepFieldLocalizeValue(e,n,o){return e.localize(`component.${n.handler}.selector.${o}`)},renderShowFormStepSubmitButton(e,n){return e.localize(`component.${n.handler}.config.step.${n.step_id}.submit`)||e.localize("ui.panel.config.integrations.config_flow."+(!1===n.last_step?"next":"submit"))},renderExternalStepHeader(e,n){return e.localize(`component.${n.handler}.config.step.${n.step_id}.title`)||e.localize("ui.panel.config.integrations.config_flow.external_step.open_site")},renderExternalStepDescription(e,n){const o=e.localize(`component.${n.translation_domain||n.handler}.config.${n.step_id}.description`,n.description_placeholders);return(0,i.qy)(d||(d=m` <p> ${0} </p> ${0} `),e.localize("ui.panel.config.integrations.config_flow.external_step.description"),o?(0,i.qy)(p||(p=m` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),o):"")},renderCreateEntryDescription(e,n){const o=e.localize(`component.${n.translation_domain||n.handler}.config.create_entry.${n.description||"default"}`,n.description_placeholders);return(0,i.qy)(g||(g=m` ${0} `),o?(0,i.qy)(f||(f=m` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),o):i.s6)},renderShowFormProgressHeader(e,n){return e.localize(`component.${n.handler}.config.step.${n.step_id}.title`)||e.localize(`component.${n.handler}.title`)},renderShowFormProgressDescription(e,n){const o=e.localize(`component.${n.translation_domain||n.handler}.config.progress.${n.progress_action}`,n.description_placeholders);return o?(0,i.qy)(u||(u=m` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),o):""},renderMenuHeader(e,n){return e.localize(`component.${n.handler}.config.step.${n.step_id}.title`)||e.localize(`component.${n.handler}.title`)},renderMenuDescription(e,n){const o=e.localize(`component.${n.translation_domain||n.handler}.config.step.${n.step_id}.description`,n.description_placeholders);return o?(0,i.qy)(h||(h=m` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),o):""},renderMenuOption(e,n,o){return e.localize(`component.${n.translation_domain||n.handler}.config.step.${n.step_id}.menu_options.${o}`,n.description_placeholders)},renderMenuOptionDescription(e,n,o){return e.localize(`component.${n.translation_domain||n.handler}.config.step.${n.step_id}.menu_option_descriptions.${o}`,n.description_placeholders)},renderLoadingDescription(e,n,o,i){if("loading_flow"!==n&&"loading_step"!==n)return"";const t=(null==i?void 0:i.handler)||o;return e.localize(`ui.panel.config.integrations.config_flow.loading.${n}`,{integration:t?(0,a.p$)(e.localize,t):e.localize("ui.panel.config.integrations.config_flow.loading.fallback_title")})}})},29094:function(e,n,o){o.d(n,{g:function(){return a}});o(3362),o(62953);var i=o(1087);const t=()=>Promise.all([o.e(72850),o.e(39763),o.e(32450),o.e(46095),o.e(7305),o.e(92769),o.e(3283),o.e(80131),o.e(98470),o.e(54066),o.e(84038),o.e(62364),o.e(62574),o.e(26092),o.e(39005),o.e(28501),o.e(29792)]).then(o.bind(o,78314)),a=(e,n,o)=>{(0,i.r)(e,"show-dialog",{dialogTag:"dialog-data-entry-flow",dialogImport:t,dialogParams:Object.assign(Object.assign({},n),{},{flowConfig:o,dialogParentElement:e})})}},5317:function(e,n,o){o.a(e,async function(e,n){try{var i=o(40445),t=o(5124),a=o(67576),r=o(29823),l=(o(70947),o(26300)),s=e([r,l]);[r,l]=s.then?(await s)():s;let c,d,p=e=>e;const g="M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z";class f extends t.WF{render(){return(0,t.qy)(c||(c=p` <ha-dropdown> <ha-icon-button slot="trigger" .label="${0}" .path="${0}"></ha-icon-button> <a href="/config/application_credentials"> <ha-dropdown-item> ${0} </ha-dropdown-item> </a> </ha-dropdown> `),this.hass.localize("ui.common.menu"),g,this.hass.localize("ui.panel.config.application_credentials.caption"))}}f.styles=(0,t.AH)(d||(d=p`:host{display:flex}a{text-decoration:none}`)),(0,i.Cg)([(0,a.MZ)({attribute:!1})],f.prototype,"hass",void 0),f=(0,i.Cg)([(0,a.EM)("ha-integration-overflow-menu")],f),n()}catch(c){n(c)}})},90676:function(e,n,o){o.d(n,{g:function(){return a}});o(3362),o(62953);var i=o(1087);const t=()=>Promise.all([o.e(72850),o.e(39763),o.e(32450),o.e(46095),o.e(7305),o.e(92769),o.e(34995),o.e(3283),o.e(80131),o.e(35764),o.e(10653),o.e(62574),o.e(26092),o.e(39005),o.e(8851),o.e(12009),o.e(66201),o.e(86499),o.e(49207)]).then(o.bind(o,7664)),a=e=>{(0,i.r)(e,"show-dialog",{dialogTag:"dialog-matter-add-device",dialogImport:t,dialogParams:{}})}},44919:function(e,n,o){o.d(n,{X:function(){return a}});o(3362),o(62953);var i=o(1087);const t=()=>Promise.all([o.e(72850),o.e(39763),o.e(32450),o.e(46095),o.e(34995),o.e(58300),o.e(62574),o.e(83878)]).then(o.bind(o,54985)),a=(e,n)=>{(0,i.r)(e,"show-dialog",{dialogTag:"dialog-zwave_js-add-node",dialogImport:t,dialogParams:n})}},76559:function(e,n,o){o.d(n,{X:function(){return t},n:function(){return a}});o(3362),o(62953);var i=o(1087);const t=(e,n)=>{(0,i.r)(e,"show-dialog",{dialogTag:"dialog-add-integration",dialogImport:()=>Promise.all([o.e(92769),o.e(50672)]).then(o.bind(o,60051)),dialogParams:n})},a=(e,n)=>{(0,i.r)(e,"show-dialog",{dialogTag:"dialog-yaml-integration",dialogImport:()=>o.e(24096).then(o.bind(o,95683)),dialogParams:n})}}}]);