UNPKG

iobroker.lovelace

Version:

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

5 lines 13 kB
"use strict";(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["50959"],{4935:function(e,n,t){var o=t(61701),i=t(72621),a=(t(71695),t(47021),t(57243)),r=t(50778),l=t(7285);let s,d,c,p,h=e=>e;(0,o.Z)([(0,r.Mo)("ha-clickable-list-item")],(function(e,n){class t extends n{constructor(...n){super(...n),e(this)}}return{F:t,d:[{kind:"field",decorators:[(0,r.Cb)()],key:"href",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:"disable-href",type:Boolean})],key:"disableHref",value(){return!1}},{kind:"field",decorators:[(0,r.Cb)({attribute:"open-new-tab",type:Boolean,reflect:!0})],key:"openNewTab",value(){return!1}},{kind:"field",decorators:[(0,r.IO)("a")],key:"_anchor",value:void 0},{kind:"method",key:"render",value:function(){const e=(0,i.Z)(t,"render",this,3)([]),n=this.href||"";return(0,a.dy)(s||(s=h`${0}`),this.disableHref?(0,a.dy)(d||(d=h`<a href="#" class="disabled">${0}</a>`),e):(0,a.dy)(c||(c=h`<a target="${0}" href="${0}">${0}</a>`),this.openNewTab?"_blank":"",n,e))}},{kind:"method",key:"firstUpdated",value:function(){(0,i.Z)(t,"firstUpdated",this,3)([]),this.addEventListener("keydown",(e=>{"Enter"!==e.key&&" "!==e.key||this._anchor.click()}))}},{kind:"get",static:!0,key:"styles",value:function(){return[(0,i.Z)(t,"styles",this),(0,a.iv)(p||(p=h`a{width:100%;height:100%;display:flex;align-items:center;overflow:hidden}.disabled{pointer-events:none}`))]}}]}}),l.M)},17170:function(e,n,t){t.a(e,(async function(e,o){try{t.r(n),t.d(n,{HaSpinner:()=>f});var i=t(61701),a=t(72621),r=(t(71695),t(47021),t(97677)),l=t(43580),s=t(57243),d=t(50778),c=e([r]);r=(c.then?(await c)():c)[0];let p,h=e=>e,f=(0,i.Z)([(0,d.Mo)("ha-spinner")],(function(e,n){class t extends n{constructor(...n){super(...n),e(this)}}return{F:t,d:[{kind:"field",decorators:[(0,d.Cb)()],key:"size",value:void 0},{kind:"method",key:"updated",value:function(e){if((0,a.Z)(t,"updated",this,3)([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")}}},{kind:"field",static:!0,key:"styles",value(){return[l.Z,(0,s.iv)(p||(p=h`: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)}`))]}}]}}),r.Z);o()}catch(p){o(p)}}))},75101:function(e,n,t){t.d(n,{$H:()=>o,DJ:()=>l,LZ:()=>a,Nn:()=>h,Ny:()=>f,Pk:()=>u,Q4:()=>r,RQ:()=>d,SO:()=>c,T0:()=>g,aR:()=>i,iJ:()=>p,pB:()=>s});t(71695),t(9359),t(56475),t(1331),t(19423),t(47021);const o=(e,n)=>e.callWS({type:"config_entries/subentries/list",entry_id:n}),i=(e,n,t)=>e.callWS({type:"config_entries/subentries/delete",entry_id:n,subentry_id:t}),a=["migration_error","setup_error","setup_retry"],r=["not_loaded","loaded","setup_error","setup_retry"],l=(e,n,t)=>{const o={type:"config_entries/subscribe"};return t&&t.type&&(o.type_filter=t.type),e.connection.subscribeMessage((e=>n(e)),o)},s=(e,n)=>{const t={};return n&&(n.type&&(t.type_filter=n.type),n.domain&&(t.domain=n.domain)),e.callWS(Object.assign({type:"config_entries/get"},t))},d=(e,n)=>e.callWS({type:"config_entries/get_single",entry_id:n}),c=(e,n,t)=>e.callWS(Object.assign({type:"config_entries/update",entry_id:n},t)),p=(e,n)=>e.callApi("DELETE",`config/config_entries/entry/${n}`),h=(e,n)=>e.callApi("POST",`config/config_entries/entry/${n}/reload`),f=(e,n)=>e.callWS({type:"config_entries/disable",entry_id:n,disabled_by:"user"}),g=(e,n)=>e.callWS({type:"config_entries/disable",entry_id:n,disabled_by:null}),u=(e,n)=>{if(!n)return e;const t=e.find((e=>e.entry_id===n));if(!t)return e;return[t,...e.filter((e=>e.entry_id!==n))]}},15681:function(e,n,t){t.d(n,{D4:()=>c,D7:()=>u,Ky:()=>d,P3:()=>l,V3:()=>y,WW:()=>$,XO:()=>p,ZJ:()=>_,d4:()=>g,oi:()=>f,pV:()=>r,zO:()=>h});var o=t(62212),i=t(22381),a=t(57816);const r=["bluetooth","dhcp","discovery","hardware","hassio","homekit","integration_discovery","mqtt","ssdp","unignore","usb","zeroconf"],l=["reauth"],s={"HA-Frontend-Base":`${location.protocol}//${location.host}`},d=(e,n,t)=>{var o;return e.callApi("POST","config/config_entries/flow",{handler:n,show_advanced_options:Boolean(null===(o=e.userData)||void 0===o?void 0:o.showAdvanced),entry_id:t},s)},c=(e,n)=>e.callApi("GET",`config/config_entries/flow/${n}`,void 0,s),p=(e,n,t)=>e.callApi("POST",`config/config_entries/flow/${n}`,t,s),h=(e,n,t)=>e.callWS({type:"config_entries/ignore_flow",flow_id:n,title:t}),f=(e,n)=>e.callApi("DELETE",`config/config_entries/flow/${n}`),g=(e,n)=>e.callApi("GET","config/config_entries/flow_handlers"+(n?`?type=${n}`:"")),u=e=>e.sendMessagePromise({type:"config_entries/flow/progress"}),m=(e,n)=>e.subscribeEvents((0,i.D)((()=>u(e).then((e=>n.setState(e,!0)))),500,!0),"config_entry_discovered"),_=e=>(0,o._)(e,"_configFlowProgress",u,m),y=(e,n)=>_(e.connection).subscribe(n),$=(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,a.Lh)(e,n.handler)):(0,a.Lh)(e,n.handler)},38572:function(e,n,t){t.d(n,{t:()=>_});t(63721),t(71695),t(40251),t(47021);var o=t(57243),i=t(15681),a=t(57816),r=t(7956);let l,s,d,c,p,h,f,g,u,m=e=>e;const _=(e,n)=>(0,r.w)(e,n,{flowType:"config_flow",showDevices:!0,createFlow:async(e,t)=>{const[o]=await Promise.all([(0,i.Ky)(e,t,n.entryId),e.loadFragmentTranslation("config"),e.loadBackendTranslation("config",t),e.loadBackendTranslation("selector",t),e.loadBackendTranslation("title",t)]);return o},fetchFlow:async(e,n)=>{const t=await(0,i.D4)(e,n);return await e.loadFragmentTranslation("config"),await e.loadBackendTranslation("config",t.handler),await e.loadBackendTranslation("selector",t.handler),t},handleFlowStep:i.XO,deleteFlow:i.oi,renderAbortDescription(e,n){const t=e.localize(`component.${n.translation_domain||n.handler}.config.abort.${n.reason}`,n.description_placeholders);return t?(0,o.dy)(l||(l=m` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),t):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 t=e.localize(`component.${n.translation_domain||n.handler}.config.step.${n.step_id}.description`,n.description_placeholders);return t?(0,o.dy)(s||(s=m` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),t):""},renderShowFormStepFieldLabel(e,n,t,o){var i;if("expandable"===t.type)return e.localize(`component.${n.handler}.config.step.${n.step_id}.sections.${t.name}.name`);const a=null!=o&&null!==(i=o.path)&&void 0!==i&&i[0]?`sections.${o.path[0]}.`:"";return e.localize(`component.${n.handler}.config.step.${n.step_id}.${a}data.${t.name}`)||t.name},renderShowFormStepFieldHelper(e,n,t,i){var a;if("expandable"===t.type)return e.localize(`component.${n.translation_domain||n.handler}.config.step.${n.step_id}.sections.${t.name}.description`);const r=null!=i&&null!==(a=i.path)&&void 0!==a&&a[0]?`sections.${i.path[0]}.`:"",l=e.localize(`component.${n.translation_domain||n.handler}.config.step.${n.step_id}.${r}data_description.${t.name}`,n.description_placeholders);return l?(0,o.dy)(d||(d=m`<ha-markdown breaks .content="${0}"></ha-markdown>`),l):""},renderShowFormStepFieldError(e,n,t){return e.localize(`component.${n.translation_domain||n.translation_domain||n.handler}.config.error.${t}`,n.description_placeholders)||t},renderShowFormStepFieldLocalizeValue(e,n,t){return e.localize(`component.${n.handler}.selector.${t}`)},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 t=e.localize(`component.${n.translation_domain||n.handler}.config.${n.step_id}.description`,n.description_placeholders);return(0,o.dy)(c||(c=m` <p> ${0} </p> ${0} `),e.localize("ui.panel.config.integrations.config_flow.external_step.description"),t?(0,o.dy)(p||(p=m` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),t):"")},renderCreateEntryDescription(e,n){const t=e.localize(`component.${n.translation_domain||n.handler}.config.create_entry.${n.description||"default"}`,n.description_placeholders);return(0,o.dy)(h||(h=m` ${0} <p> ${0} </p> `),t?(0,o.dy)(f||(f=m` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),t):"",e.localize("ui.panel.config.integrations.config_flow.created_config",{name:n.title}))},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 t=e.localize(`component.${n.translation_domain||n.handler}.config.progress.${n.progress_action}`,n.description_placeholders);return t?(0,o.dy)(g||(g=m` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),t):""},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 t=e.localize(`component.${n.translation_domain||n.handler}.config.step.${n.step_id}.description`,n.description_placeholders);return t?(0,o.dy)(u||(u=m` <ha-markdown allow-svg breaks .content="${0}"></ha-markdown> `),t):""},renderMenuOption(e,n,t){return e.localize(`component.${n.translation_domain||n.handler}.config.step.${n.step_id}.menu_options.${t}`,n.description_placeholders)},renderLoadingDescription(e,n,t,o){if("loading_flow"!==n&&"loading_step"!==n)return"";const i=(null==o?void 0:o.handler)||t;return e.localize(`ui.panel.config.integrations.config_flow.loading.${n}`,{integration:i?(0,a.Lh)(e.localize,i):e.localize("ui.panel.config.integrations.config_flow.loading.fallback_title")})}})},7956:function(e,n,t){t.d(n,{w:()=>a});t(71695),t(19423),t(40251),t(47021);var o=t(36522);const i=()=>Promise.all([t.e("46379"),t.e("66031"),t.e("72206"),t.e("97983"),t.e("24199"),t.e("78943"),t.e("2142"),t.e("58640"),t.e("52430"),t.e("4697"),t.e("8871"),t.e("27090"),t.e("8949")]).then(t.bind(t,12656)),a=(e,n,t)=>{(0,o.B)(e,"show-dialog",{dialogTag:"dialog-data-entry-flow",dialogImport:i,dialogParams:Object.assign(Object.assign({},n),{},{flowConfig:t,dialogParentElement:e})})}},44536:function(e,n,t){var o=t(61701),i=(t(71695),t(47021),t(57243)),a=t(50778);t(34273),t(4935),t(23334);let r,l=e=>e;(0,o.Z)([(0,a.Mo)("ha-integration-overflow-menu")],(function(e,n){return{F:class extends n{constructor(...n){super(...n),e(this)}},d:[{kind:"field",decorators:[(0,a.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"method",key:"render",value:function(){return(0,i.dy)(r||(r=l` <ha-button-menu activatable> <ha-icon-button slot="trigger" .label="${0}" .path="${0}"></ha-icon-button> <ha-clickable-list-item href="/config/application_credentials"> ${0} </ha-clickable-list-item> </ha-button-menu> `),this.hass.localize("ui.common.menu"),"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",this.hass.localize("ui.panel.config.application_credentials.caption"))}}]}}),i.oi)},84361:function(e,n,t){t.d(n,{E:()=>i,u:()=>a});t(71695),t(40251),t(47021);var o=t(36522);const i=(e,n)=>{(0,o.B)(e,"show-dialog",{dialogTag:"dialog-add-integration",dialogImport:()=>Promise.all([t.e("97983"),t.e("82600"),t.e("46916")]).then(t.bind(t,24391)),dialogParams:n})},a=(e,n)=>{(0,o.B)(e,"show-dialog",{dialogTag:"dialog-yaml-integration",dialogImport:()=>Promise.all([t.e("97983"),t.e("54076")]).then(t.bind(t,20738)),dialogParams:n})}},88238:function(e,n,t){t.d(n,{RU:()=>i,X1:()=>o,u4:()=>a,zC:()=>r});t(88044);const o=e=>`https://brands.home-assistant.io/${e.brand?"brands/":""}${e.useFallback?"_/":""}${e.domain}/${e.darkOptimized?"dark_":""}${e.type}.png`,i=e=>`https://brands.home-assistant.io/hardware/${e.category}/${e.darkOptimized?"dark_":""}${e.manufacturer}${e.model?`_${e.model}`:""}.png`,a=e=>e.split("/")[4],r=e=>e.startsWith("https://brands.home-assistant.io/")},73192:function(e,n,t){t.d(n,{R:()=>o});const o=(e,n)=>`https://www.iobroker.net/#${e.language&&e.language.split("-")[0]||"en"}/adapters/adapterref/iobroker.lovelace/README.md#`}}]); //# sourceMappingURL=50959.d6c446be14d2fd64.js.map