UNPKG

iobroker.lovelace

Version:

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

2 lines 32.1 kB
(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["71680"],{86431:function(e,t,i){"use strict";i.d(t,{jL:()=>n,wZ:()=>d});i(71695),i(81804),i(47021);var a=i(47194);const n=e=>{var t;return null===(t=e.name_by_user||e.name)||void 0===t?void 0:t.trim()},d=(e,t,i)=>n(e)||i&&o(t,i)||t.localize("ui.panel.config.devices.unnamed_device",{type:t.localize(`ui.panel.config.devices.type.${e.entry_type||"device"}`)}),o=(e,t)=>{for(const i of t||[]){const t="string"==typeof i?i:i.entity_id,n=e.states[t];if(n)return(0,a.C)(n)}}},98157:function(e,t,i){"use strict";i.a(e,(async function(e,t){try{var a=i(61701),n=(i(19083),i(71695),i(61893),i(9359),i(68107),i(56475),i(70104),i(52924),i(40251),i(61006),i(47021),i(57243)),d=i(50778),o=i(27486),r=i(36522),l=i(86431),s=i(73850),c=i(1416),u=i(24360),v=i(71857),h=i(94279),p=(i(7285),e([h]));h=(p.then?(await p)():p)[0];let f,m,y=e=>e;const b=e=>(0,n.dy)(f||(f=y`<ha-list-item .twoline="${0}"> <span>${0}</span> <span slot="secondary">${0}</span> </ha-list-item>`),!!e.area,e.name,e.area);(0,a.Z)([(0,d.Mo)("ha-device-picker")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,d.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,d.Cb)()],key:"label",value:void 0},{kind:"field",decorators:[(0,d.Cb)()],key:"value",value:void 0},{kind:"field",decorators:[(0,d.Cb)()],key:"helper",value:void 0},{kind:"field",decorators:[(0,d.Cb)({type:Array,attribute:"include-domains"})],key:"includeDomains",value:void 0},{kind:"field",decorators:[(0,d.Cb)({type:Array,attribute:"exclude-domains"})],key:"excludeDomains",value:void 0},{kind:"field",decorators:[(0,d.Cb)({type:Array,attribute:"include-device-classes"})],key:"includeDeviceClasses",value:void 0},{kind:"field",decorators:[(0,d.Cb)({type:Array,attribute:"exclude-devices"})],key:"excludeDevices",value:void 0},{kind:"field",decorators:[(0,d.Cb)({attribute:!1})],key:"deviceFilter",value:void 0},{kind:"field",decorators:[(0,d.Cb)({attribute:!1})],key:"entityFilter",value:void 0},{kind:"field",decorators:[(0,d.Cb)({type:Boolean})],key:"disabled",value(){return!1}},{kind:"field",decorators:[(0,d.Cb)({type:Boolean})],key:"required",value(){return!1}},{kind:"field",decorators:[(0,d.SB)()],key:"_opened",value:void 0},{kind:"field",decorators:[(0,d.IO)("ha-combo-box",!0)],key:"comboBox",value:void 0},{kind:"field",key:"_init",value(){return!1}},{kind:"field",key:"_getDevices",value(){return(0,o.Z)(((e,t,i,a,n,d,o,r,u)=>{if(!e.length)return[{id:"no_devices",area:"",name:this.hass.localize("ui.components.device-picker.no_devices"),strings:[]}];let h={};(a||n||d||r)&&(h=(0,v.R6)(i));let p=e.filter((e=>e.id===this.value||!e.disabled_by));a&&(p=p.filter((e=>{const t=h[e.id];return!(!t||!t.length)&&h[e.id].some((e=>a.includes((0,s.M)(e.entity_id))))}))),n&&(p=p.filter((e=>{const t=h[e.id];return!t||!t.length||i.every((e=>!n.includes((0,s.M)(e.entity_id))))}))),u&&(p=p.filter((e=>!u.includes(e.id)))),d&&(p=p.filter((e=>{const t=h[e.id];return!(!t||!t.length)&&h[e.id].some((e=>{const t=this.hass.states[e.entity_id];return!!t&&(t.attributes.device_class&&d.includes(t.attributes.device_class))}))}))),r&&(p=p.filter((e=>{const t=h[e.id];return!(!t||!t.length)&&t.some((e=>{const t=this.hass.states[e.entity_id];return!!t&&r(t)}))}))),o&&(p=p.filter((e=>e.id===this.value||o(e))));const f=p.map((e=>{const i=(0,l.wZ)(e,this.hass,h[e.id]);return{id:e.id,name:i||this.hass.localize("ui.components.device-picker.unnamed_device"),area:e.area_id&&t[e.area_id]?t[e.area_id].name:this.hass.localize("ui.components.device-picker.no_area"),strings:[i||""]}}));return f.length?1===f.length?f:f.sort(((e,t)=>(0,c.$K)(e.name||"",t.name||"",this.hass.locale.language))):[{id:"no_devices",area:"",name:this.hass.localize("ui.components.device-picker.no_match"),strings:[]}]}))}},{kind:"method",key:"open",value:async function(){var e;await this.updateComplete,await(null===(e=this.comboBox)||void 0===e?void 0:e.open())}},{kind:"method",key:"focus",value:async function(){var e;await this.updateComplete,await(null===(e=this.comboBox)||void 0===e?void 0:e.focus())}},{kind:"method",key:"updated",value:function(e){if(!this._init&&this.hass||this._init&&e.has("_opened")&&this._opened){this._init=!0;const e=this._getDevices(Object.values(this.hass.devices),this.hass.areas,Object.values(this.hass.entities),this.includeDomains,this.excludeDomains,this.includeDeviceClasses,this.deviceFilter,this.entityFilter,this.excludeDevices);this.comboBox.items=e,this.comboBox.filteredItems=e}}},{kind:"method",key:"render",value:function(){return(0,n.dy)(m||(m=y` <ha-combo-box .hass="${0}" .label="${0}" .value="${0}" .helper="${0}" .renderer="${0}" .disabled="${0}" .required="${0}" item-id-path="id" item-value-path="id" item-label-path="name" @opened-changed="${0}" @value-changed="${0}" @filter-changed="${0}"></ha-combo-box> `),this.hass,void 0===this.label&&this.hass?this.hass.localize("ui.components.device-picker.device"):this.label,this._value,this.helper,b,this.disabled,this.required,this._openedChanged,this._deviceChanged,this._filterChanged)}},{kind:"get",key:"_value",value:function(){return this.value||""}},{kind:"method",key:"_filterChanged",value:function(e){const t=e.target,i=e.detail.value.toLowerCase();t.filteredItems=i.length?(0,u.q)(i,t.items||[]):t.items}},{kind:"method",key:"_deviceChanged",value:function(e){e.stopPropagation();let t=e.detail.value;"no_devices"===t&&(t=""),t!==this._value&&this._setValue(t)}},{kind:"method",key:"_openedChanged",value:function(e){this._opened=e.detail.value}},{kind:"method",key:"_setValue",value:function(e){this.value=e,setTimeout((()=>{(0,r.B)(this,"value-changed",{value:e}),(0,r.B)(this,"change")}),0)}}]}}),n.oi);t()}catch(f){t(f)}}))},34253:function(e,t,i){"use strict";i.a(e,(async function(e,t){try{var a=i(61701),n=(i(19083),i(71695),i(9359),i(56475),i(70104),i(40251),i(61006),i(47021),i(57243)),d=i(50778),o=i(36522),r=i(98157),l=e([r]);r=(l.then?(await l)():l)[0];let s,c,u,v=e=>e;(0,a.Z)([(0,d.Mo)("ha-devices-picker")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,d.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,d.Cb)({type:Array})],key:"value",value:void 0},{kind:"field",decorators:[(0,d.Cb)()],key:"helper",value:void 0},{kind:"field",decorators:[(0,d.Cb)({type:Boolean})],key:"disabled",value(){return!1}},{kind:"field",decorators:[(0,d.Cb)({type:Boolean})],key:"required",value(){return!1}},{kind:"field",decorators:[(0,d.Cb)({type:Array,attribute:"include-domains"})],key:"includeDomains",value:void 0},{kind:"field",decorators:[(0,d.Cb)({type:Array,attribute:"exclude-domains"})],key:"excludeDomains",value:void 0},{kind:"field",decorators:[(0,d.Cb)({type:Array,attribute:"include-device-classes"})],key:"includeDeviceClasses",value:void 0},{kind:"field",decorators:[(0,d.Cb)({attribute:"picked-device-label"})],key:"pickedDeviceLabel",value:void 0},{kind:"field",decorators:[(0,d.Cb)({attribute:"pick-device-label"})],key:"pickDeviceLabel",value:void 0},{kind:"field",decorators:[(0,d.Cb)({attribute:!1})],key:"deviceFilter",value:void 0},{kind:"field",decorators:[(0,d.Cb)({attribute:!1})],key:"entityFilter",value:void 0},{kind:"method",key:"render",value:function(){if(!this.hass)return n.Ld;const e=this._currentDevices;return(0,n.dy)(s||(s=v` ${0} <div> <ha-device-picker allow-custom-entity .hass="${0}" .helper="${0}" .deviceFilter="${0}" .entityFilter="${0}" .includeDomains="${0}" .excludeDomains="${0}" .excludeDevices="${0}" .includeDeviceClasses="${0}" .label="${0}" .disabled="${0}" .required="${0}" @value-changed="${0}"></ha-device-picker> </div> `),e.map((e=>(0,n.dy)(c||(c=v` <div> <ha-device-picker allow-custom-entity .curValue="${0}" .hass="${0}" .deviceFilter="${0}" .entityFilter="${0}" .includeDomains="${0}" .excludeDomains="${0}" .includeDeviceClasses="${0}" .value="${0}" .label="${0}" .disabled="${0}" @value-changed="${0}"></ha-device-picker> </div> `),e,this.hass,this.deviceFilter,this.entityFilter,this.includeDomains,this.excludeDomains,this.includeDeviceClasses,e,this.pickedDeviceLabel,this.disabled,this._deviceChanged))),this.hass,this.helper,this.deviceFilter,this.entityFilter,this.includeDomains,this.excludeDomains,e,this.includeDeviceClasses,this.pickDeviceLabel,this.disabled,this.required&&!e.length,this._addDevice)}},{kind:"get",key:"_currentDevices",value:function(){return this.value||[]}},{kind:"method",key:"_updateDevices",value:async function(e){(0,o.B)(this,"value-changed",{value:e}),this.value=e}},{kind:"method",key:"_deviceChanged",value:function(e){e.stopPropagation();const t=e.currentTarget.curValue,i=e.detail.value;i!==t&&(void 0===i?this._updateDevices(this._currentDevices.filter((e=>e!==t))):this._updateDevices(this._currentDevices.map((e=>e===t?i:e))))}},{kind:"method",key:"_addDevice",value:async function(e){e.stopPropagation();const t=e.detail.value;if(e.currentTarget.value="",!t)return;const i=this._currentDevices;i.includes(t)||this._updateDevices([...i,t])}},{kind:"field",static:!0,key:"styles",value(){return(0,n.iv)(u||(u=v`div{margin-top:8px}`))}}]}}),n.oi);t()}catch(s){t(s)}}))},94279:function(e,t,i){"use strict";i.a(e,(async function(e,t){try{var a=i(61701),n=i(72621),d=(i(71695),i(9359),i(31526),i(40251),i(47021),i(2394)),o=i(28737),r=i(43631),l=i(57243),s=i(50778),c=i(20552),u=i(36522),v=(i(23334),i(7285),i(83166),e([o]));o=(v.then?(await v)():v)[0];let h,p,f,m,y,b,k=e=>e;const g="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",_="M7,10L12,15L17,10H7Z",x="M7,15L12,10L17,15H7Z";(0,r.hC)("vaadin-combo-box-item",(0,l.iv)(h||(h=k`:host{padding:0!important}:host([focused]:not([disabled])){background-color:rgba(var(--rgb-primary-text-color,0,0,0),.12)}:host([selected]:not([disabled])){background-color:transparent;color:var(--mdc-theme-primary);--mdc-ripple-color:var(--mdc-theme-primary);--mdc-theme-text-primary-on-background:var(--mdc-theme-primary)}:host([selected]:not([disabled])):before{background-color:var(--mdc-theme-primary);opacity:.12;content:"";position:absolute;top:0;left:0;width:100%;height:100%}:host([selected][focused]:not([disabled])):before{opacity:.24}:host(:hover:not([disabled])){background-color:transparent}[part=content]{width:100%}[part=checkmark]{display:none}`)));(0,a.Z)([(0,s.Mo)("ha-combo-box")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,s.Cb)()],key:"label",value:void 0},{kind:"field",decorators:[(0,s.Cb)()],key:"value",value:void 0},{kind:"field",decorators:[(0,s.Cb)()],key:"placeholder",value:void 0},{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"validationMessage",value:void 0},{kind:"field",decorators:[(0,s.Cb)()],key:"helper",value:void 0},{kind:"field",decorators:[(0,s.Cb)({attribute:"error-message"})],key:"errorMessage",value:void 0},{kind:"field",decorators:[(0,s.Cb)({type:Boolean})],key:"invalid",value(){return!1}},{kind:"field",decorators:[(0,s.Cb)({type:Boolean})],key:"icon",value(){return!1}},{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"items",value:void 0},{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"filteredItems",value:void 0},{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"dataProvider",value:void 0},{kind:"field",decorators:[(0,s.Cb)({attribute:"allow-custom-value",type:Boolean})],key:"allowCustomValue",value(){return!1}},{kind:"field",decorators:[(0,s.Cb)({attribute:"item-value-path"})],key:"itemValuePath",value(){return"value"}},{kind:"field",decorators:[(0,s.Cb)({attribute:"item-label-path"})],key:"itemLabelPath",value(){return"label"}},{kind:"field",decorators:[(0,s.Cb)({attribute:"item-id-path"})],key:"itemIdPath",value:void 0},{kind:"field",decorators:[(0,s.Cb)({attribute:!1})],key:"renderer",value:void 0},{kind:"field",decorators:[(0,s.Cb)({type:Boolean})],key:"disabled",value(){return!1}},{kind:"field",decorators:[(0,s.Cb)({type:Boolean})],key:"required",value(){return!1}},{kind:"field",decorators:[(0,s.Cb)({type:Boolean,reflect:!0})],key:"opened",value(){return!1}},{kind:"field",decorators:[(0,s.IO)("vaadin-combo-box-light",!0)],key:"_comboBox",value:void 0},{kind:"field",decorators:[(0,s.IO)("ha-textfield",!0)],key:"_inputElement",value:void 0},{kind:"field",key:"_overlayMutationObserver",value:void 0},{kind:"field",key:"_bodyMutationObserver",value:void 0},{kind:"method",key:"open",value:async function(){var e;await this.updateComplete,null===(e=this._comboBox)||void 0===e||e.open()}},{kind:"method",key:"focus",value:async function(){var e,t;await this.updateComplete,await(null===(e=this._inputElement)||void 0===e?void 0:e.updateComplete),null===(t=this._inputElement)||void 0===t||t.focus()}},{kind:"method",key:"disconnectedCallback",value:function(){(0,n.Z)(i,"disconnectedCallback",this,3)([]),this._overlayMutationObserver&&(this._overlayMutationObserver.disconnect(),this._overlayMutationObserver=void 0),this._bodyMutationObserver&&(this._bodyMutationObserver.disconnect(),this._bodyMutationObserver=void 0)}},{kind:"get",key:"selectedItem",value:function(){return this._comboBox.selectedItem}},{kind:"method",key:"setInputValue",value:function(e){this._comboBox.value=e}},{kind:"method",key:"render",value:function(){var e;return(0,l.dy)(p||(p=k` <vaadin-combo-box-light .itemValuePath="${0}" .itemIdPath="${0}" .itemLabelPath="${0}" .items="${0}" .value="${0}" .filteredItems="${0}" .dataProvider="${0}" .allowCustomValue="${0}" .disabled="${0}" .required="${0}" ${0} @opened-changed="${0}" @filter-changed="${0}" @value-changed="${0}" attr-for-value="value"> <ha-textfield label="${0}" placeholder="${0}" ?disabled="${0}" ?required="${0}" validationMessage="${0}" .errorMessage="${0}" class="input" autocapitalize="none" autocomplete="off" autocorrect="off" input-spellcheck="false" .suffix="${0}" .icon="${0}" .invalid="${0}" .helper="${0}" helperPersistent> <slot name="icon" slot="leadingIcon"></slot> </ha-textfield> ${0} <ha-svg-icon role="button" tabindex="-1" aria-label="${0}" aria-expanded="${0}" class="toggle-button" .path="${0}" @click="${0}"></ha-svg-icon> </vaadin-combo-box-light> `),this.itemValuePath,this.itemIdPath,this.itemLabelPath,this.items,this.value||"",this.filteredItems,this.dataProvider,this.allowCustomValue,this.disabled,this.required,(0,d.t)(this.renderer||this._defaultRowRenderer),this._openedChanged,this._filterChanged,this._valueChanged,(0,c.o)(this.label),(0,c.o)(this.placeholder),this.disabled,this.required,(0,c.o)(this.validationMessage),this.errorMessage,(0,l.dy)(f||(f=k`<div style="width:28px" role="none presentation"></div>`)),this.icon,this.invalid,this.helper,this.value?(0,l.dy)(m||(m=k`<ha-svg-icon role="button" tabindex="-1" aria-label="${0}" class="clear-button" .path="${0}" @click="${0}"></ha-svg-icon>`),(0,c.o)(null===(e=this.hass)||void 0===e?void 0:e.localize("ui.common.clear")),g,this._clearValue):"",(0,c.o)(this.label),this.opened?"true":"false",this.opened?x:_,this._toggleOpen)}},{kind:"field",key:"_defaultRowRenderer",value(){return e=>(0,l.dy)(y||(y=k`<ha-list-item> ${0} </ha-list-item>`),this.itemLabelPath?e[this.itemLabelPath]:e)}},{kind:"method",key:"_clearValue",value:function(e){e.stopPropagation(),(0,u.B)(this,"value-changed",{value:void 0})}},{kind:"method",key:"_toggleOpen",value:function(e){var t,i;this.opened?(null===(t=this._comboBox)||void 0===t||t.close(),e.stopPropagation()):null===(i=this._comboBox)||void 0===i||i.inputElement.focus()}},{kind:"method",key:"_openedChanged",value:function(e){e.stopPropagation();const t=e.detail.value;if(setTimeout((()=>{this.opened=t}),0),(0,u.B)(this,"opened-changed",{value:e.detail.value}),t){const e=document.querySelector("vaadin-combo-box-overlay");e&&this._removeInert(e),this._observeBody()}else{var i;null===(i=this._bodyMutationObserver)||void 0===i||i.disconnect(),this._bodyMutationObserver=void 0}}},{kind:"method",key:"_observeBody",value:function(){"MutationObserver"in window&&!this._bodyMutationObserver&&(this._bodyMutationObserver=new MutationObserver((e=>{e.forEach((e=>{e.addedNodes.forEach((e=>{"VAADIN-COMBO-BOX-OVERLAY"===e.nodeName&&this._removeInert(e)})),e.removedNodes.forEach((e=>{var t;"VAADIN-COMBO-BOX-OVERLAY"===e.nodeName&&(null===(t=this._overlayMutationObserver)||void 0===t||t.disconnect(),this._overlayMutationObserver=void 0)}))}))})),this._bodyMutationObserver.observe(document.body,{childList:!0}))}},{kind:"method",key:"_removeInert",value:function(e){var t;if(e.inert)return e.inert=!1,null===(t=this._overlayMutationObserver)||void 0===t||t.disconnect(),void(this._overlayMutationObserver=void 0);"MutationObserver"in window&&!this._overlayMutationObserver&&(this._overlayMutationObserver=new MutationObserver((e=>{e.forEach((e=>{if("inert"===e.attributeName){const i=e.target;var t;if(i.inert)null===(t=this._overlayMutationObserver)||void 0===t||t.disconnect(),this._overlayMutationObserver=void 0,i.inert=!1}}))})),this._overlayMutationObserver.observe(e,{attributes:!0}))}},{kind:"method",key:"_filterChanged",value:function(e){e.stopPropagation(),(0,u.B)(this,"filter-changed",{value:e.detail.value})}},{kind:"method",key:"_valueChanged",value:function(e){e.stopPropagation(),this.allowCustomValue||(this._comboBox._closeOnBlurIsPrevented=!0);const t=e.detail.value;t!==this.value&&(0,u.B)(this,"value-changed",{value:t||void 0})}},{kind:"field",static:!0,key:"styles",value(){return(0,l.iv)(b||(b=k`:host{display:block;width:100%}vaadin-combo-box-light{position:relative;--vaadin-combo-box-overlay-max-height:calc(45vh - 56px)}ha-textfield{width:100%}ha-textfield>ha-icon-button{--mdc-icon-button-size:24px;padding:2px;color:var(--secondary-text-color)}ha-svg-icon{color:var(--input-dropdown-icon-color);position:absolute;cursor:pointer}.toggle-button{right:12px;top:-10px;inset-inline-start:initial;inset-inline-end:12px;direction:var(--direction)}:host([opened]) .toggle-button{color:var(--primary-color)}.clear-button{--mdc-icon-size:20px;top:-7px;right:36px;inset-inline-start:initial;inset-inline-end:36px;direction:var(--direction)}`))}}]}}),l.oi);t()}catch(h){t(h)}}))},7285:function(e,t,i){"use strict";i.d(t,{M:()=>h});var a=i(61701),n=i(72621),d=(i(71695),i(47021),i(65703)),o=i(46289),r=i(57243),l=i(50778);let s,c,u,v=e=>e,h=(0,a.Z)([(0,l.Mo)("ha-list-item")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"method",key:"renderRipple",value:function(){return this.noninteractive?"":(0,n.Z)(i,"renderRipple",this,3)([])}},{kind:"get",static:!0,key:"styles",value:function(){return[o.W,(0,r.iv)(s||(s=v`: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,r.iv)(c||(c=v`span.material-icons:first-of-type,span.material-icons:last-of-type{direction:rtl!important;--direction:rtl}`)):(0,r.iv)(u||(u=v``))]}}]}}),d.K)},92793:function(e,t,i){"use strict";i.a(e,(async function(e,a){try{i.r(t),i.d(t,{HaDeviceSelector:()=>x});var n=i(61701),d=i(72621),o=(i(71695),i(9359),i(56475),i(52924),i(47021),i(57243)),r=i(50778),l=i(27486),s=i(95262),c=i(36522),u=i(71857),v=i(62992),h=i(75101),p=i(41063),f=i(98157),m=i(34253),y=e([f,m]);[f,m]=y.then?(await y)():y;let b,k,g,_=e=>e,x=(0,n.Z)([(0,r.Mo)("ha-selector-device")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"selector",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_entitySources",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_configEntries",value:void 0},{kind:"field",decorators:[(0,r.Cb)()],key:"value",value:void 0},{kind:"field",decorators:[(0,r.Cb)()],key:"label",value:void 0},{kind:"field",decorators:[(0,r.Cb)()],key:"helper",value:void 0},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"disabled",value(){return!1}},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"required",value(){return!0}},{kind:"field",key:"_deviceIntegrationLookup",value(){return(0,l.Z)(u.HP)}},{kind:"method",key:"_hasIntegration",value:function(e){var t,i;return(null===(t=e.device)||void 0===t?void 0:t.filter)&&(0,s.r)(e.device.filter).some((e=>e.integration))||(null===(i=e.device)||void 0===i?void 0:i.entity)&&(0,s.r)(e.device.entity).some((e=>e.integration))}},{kind:"method",key:"willUpdate",value:function(e){var t,i;e.has("selector")&&void 0!==this.value&&(null!==(t=this.selector.device)&&void 0!==t&&t.multiple&&!Array.isArray(this.value)?(this.value=[this.value],(0,c.B)(this,"value-changed",{value:this.value})):null!==(i=this.selector.device)&&void 0!==i&&i.multiple||!Array.isArray(this.value)||(this.value=this.value[0],(0,c.B)(this,"value-changed",{value:this.value})))}},{kind:"method",key:"updated",value:function(e){(0,d.Z)(i,"updated",this,3)([e]),e.has("selector")&&this._hasIntegration(this.selector)&&!this._entitySources&&(0,v.m)(this.hass).then((e=>{this._entitySources=e})),!this._configEntries&&this._hasIntegration(this.selector)&&(this._configEntries=[],(0,h.pB)(this.hass).then((e=>{this._configEntries=e})))}},{kind:"method",key:"render",value:function(){var e,t,i;return this._hasIntegration(this.selector)&&!this._entitySources?o.Ld:null!==(e=this.selector.device)&&void 0!==e&&e.multiple?(0,o.dy)(k||(k=_` ${0} <ha-devices-picker .hass="${0}" .value="${0}" .helper="${0}" .deviceFilter="${0}" .entityFilter="${0}" .disabled="${0}" .required="${0}"></ha-devices-picker> `),this.label?(0,o.dy)(g||(g=_`<label>${0}</label>`),this.label):"",this.hass,this.value,this.helper,this._filterDevices,null!==(t=this.selector.device)&&void 0!==t&&t.entity?this._filterEntities:void 0,this.disabled,this.required):(0,o.dy)(b||(b=_` <ha-device-picker .hass="${0}" .value="${0}" .label="${0}" .helper="${0}" .deviceFilter="${0}" .entityFilter="${0}" .disabled="${0}" .required="${0}" allow-custom-entity></ha-device-picker> `),this.hass,this.value,this.label,this.helper,this._filterDevices,null!==(i=this.selector.device)&&void 0!==i&&i.entity?this._filterEntities:void 0,this.disabled,this.required)}},{kind:"field",key:"_filterDevices",value(){return e=>{var t;if(null===(t=this.selector.device)||void 0===t||!t.filter)return!0;const i=this._entitySources?this._deviceIntegrationLookup(this._entitySources,Object.values(this.hass.entities),Object.values(this.hass.devices),this._configEntries):void 0;return(0,s.r)(this.selector.device.filter).some((t=>(0,p.lE)(t,e,i)))}}},{kind:"field",key:"_filterEntities",value(){return e=>(0,s.r)(this.selector.device.entity).some((t=>(0,p.lV)(t,e,this._entitySources)))}}]}}),o.oi);a()}catch(b){a(b)}}))},83166:function(e,t,i){"use strict";i.d(t,{f:()=>f});var a=i(61701),n=i(72621),d=(i(71695),i(47021),i(1105)),o=i(33990),r=i(57243),l=i(50778),s=i(5111);let c,u,v,h,p=e=>e,f=(0,a.Z)([(0,l.Mo)("ha-textfield")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,l.Cb)({type:Boolean})],key:"invalid",value:void 0},{kind:"field",decorators:[(0,l.Cb)({attribute:"error-message"})],key:"errorMessage",value:void 0},{kind:"field",decorators:[(0,l.Cb)({type:Boolean})],key:"icon",value(){return!1}},{kind:"field",decorators:[(0,l.Cb)({type:Boolean})],key:"iconTrailing",value(){return!1}},{kind:"field",decorators:[(0,l.Cb)()],key:"autocomplete",value:void 0},{kind:"field",decorators:[(0,l.Cb)()],key:"autocorrect",value:void 0},{kind:"field",decorators:[(0,l.Cb)({attribute:"input-spellcheck"})],key:"inputSpellcheck",value:void 0},{kind:"field",decorators:[(0,l.IO)("input")],key:"formElement",value:void 0},{kind:"method",key:"updated",value:function(e){(0,n.Z)(i,"updated",this,3)([e]),(e.has("invalid")||e.has("errorMessage"))&&(this.setCustomValidity(this.invalid?this.errorMessage||this.validationMessage||"Invalid":""),(this.invalid||this.validateOnInitialRender||e.has("invalid")&&void 0!==e.get("invalid"))&&this.reportValidity()),e.has("autocomplete")&&(this.autocomplete?this.formElement.setAttribute("autocomplete",this.autocomplete):this.formElement.removeAttribute("autocomplete")),e.has("autocorrect")&&(this.autocorrect?this.formElement.setAttribute("autocorrect",this.autocorrect):this.formElement.removeAttribute("autocorrect")),e.has("inputSpellcheck")&&(this.inputSpellcheck?this.formElement.setAttribute("spellcheck",this.inputSpellcheck):this.formElement.removeAttribute("spellcheck"))}},{kind:"method",key:"renderIcon",value:function(e,t=!1){const i=t?"trailing":"leading";return(0,r.dy)(c||(c=p` <span class="mdc-text-field__icon mdc-text-field__icon--${0}" tabindex="${0}"> <slot name="${0}Icon"></slot> </span> `),i,t?1:-1,i)}},{kind:"field",static:!0,key:"styles",value(){return[o.W,(0,r.iv)(u||(u=p`.mdc-text-field__input{width:var(--ha-textfield-input-width,100%)}.mdc-text-field:not(.mdc-text-field--with-leading-icon){padding:var(--text-field-padding,0px 16px)}.mdc-text-field__affix--suffix{padding-left:var(--text-field-suffix-padding-left,12px);padding-right:var(--text-field-suffix-padding-right,0px);padding-inline-start:var(--text-field-suffix-padding-left,12px);padding-inline-end:var(--text-field-suffix-padding-right,0px);direction:ltr}.mdc-text-field--with-leading-icon{padding-inline-start:var(--text-field-suffix-padding-left,0px);padding-inline-end:var(--text-field-suffix-padding-right,16px);direction:var(--direction)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:var(--text-field-suffix-padding-left,0px);padding-right:var(--text-field-suffix-padding-right,0px);padding-inline-start:var(--text-field-suffix-padding-left,0px);padding-inline-end:var(--text-field-suffix-padding-right,0px)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--suffix{color:var(--secondary-text-color)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon{color:var(--secondary-text-color)}.mdc-text-field__icon--leading{margin-inline-start:16px;margin-inline-end:8px;direction:var(--direction)}.mdc-text-field__icon--trailing{padding:var(--textfield-icon-trailing-padding,12px)}.mdc-floating-label:not(.mdc-floating-label--float-above){text-overflow:ellipsis;width:inherit;padding-right:30px;padding-inline-end:30px;padding-inline-start:initial;box-sizing:border-box;direction:var(--direction)}input{text-align:var(--text-field-text-align,start)}input[type=color]{height:20px}::-ms-reveal{display:none}:host([no-spinner]) input::-webkit-inner-spin-button,:host([no-spinner]) input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=color]::-webkit-color-swatch-wrapper{padding:0}:host([no-spinner]) input[type=number]{-moz-appearance:textfield}.mdc-text-field__ripple{overflow:hidden}.mdc-text-field{overflow:var(--text-field-overflow)}.mdc-floating-label{inset-inline-start:16px!important;inset-inline-end:initial!important;transform-origin:var(--float-start);direction:var(--direction);text-align:var(--float-start)}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 48px - var(--text-field-suffix-padding-left,0px));inset-inline-start:calc(48px + var(--text-field-suffix-padding-left,0px))!important;inset-inline-end:initial!important;direction:var(--direction)}.mdc-text-field__input[type=number]{direction:var(--direction)}.mdc-text-field__affix--prefix{padding-right:var(--text-field-prefix-padding-right,2px);padding-inline-end:var(--text-field-prefix-padding-right,2px);padding-inline-start:initial}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--prefix{color:var(--mdc-text-field-label-ink-color)}#helper-text ha-markdown{display:inline-block}`)),"rtl"===s.E.document.dir?(0,r.iv)(v||(v=p`.mdc-floating-label,.mdc-text-field--with-leading-icon,.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label,.mdc-text-field__icon--leading,.mdc-text-field__input[type=number]{direction:rtl;--direction:rtl}`)):(0,r.iv)(h||(h=p``))]}}]}}),d.P)},75101:function(e,t,i){"use strict";i.d(t,{$H:()=>a,DJ:()=>r,LZ:()=>d,Nn:()=>v,Ny:()=>h,Pk:()=>f,Q4:()=>o,RQ:()=>s,SO:()=>c,T0:()=>p,aR:()=>n,iJ:()=>u,pB:()=>l});i(71695),i(9359),i(56475),i(1331),i(19423),i(47021);const a=(e,t)=>e.callWS({type:"config_entries/subentries/list",entry_id:t}),n=(e,t,i)=>e.callWS({type:"config_entries/subentries/delete",entry_id:t,subentry_id:i}),d=99387==i.j?["migration_error","setup_error","setup_retry"]:null,o=99387==i.j?["not_loaded","loaded","setup_error","setup_retry"]:null,r=(e,t,i)=>{const a={type:"config_entries/subscribe"};return i&&i.type&&(a.type_filter=i.type),e.connection.subscribeMessage((e=>t(e)),a)},l=(e,t)=>{const i={};return t&&(t.type&&(i.type_filter=t.type),t.domain&&(i.domain=t.domain)),e.callWS(Object.assign({type:"config_entries/get"},i))},s=(e,t)=>e.callWS({type:"config_entries/get_single",entry_id:t}),c=(e,t,i)=>e.callWS(Object.assign({type:"config_entries/update",entry_id:t},i)),u=(e,t)=>e.callApi("DELETE",`config/config_entries/entry/${t}`),v=(e,t)=>e.callApi("POST",`config/config_entries/entry/${t}/reload`),h=(e,t)=>e.callWS({type:"config_entries/disable",entry_id:t,disabled_by:"user"}),p=(e,t)=>e.callWS({type:"config_entries/disable",entry_id:t,disabled_by:null}),f=(e,t)=>{if(!t)return e;const i=e.find((e=>e.entry_id===t));if(!i)return e;return[i,...e.filter((e=>e.entry_id!==t))]}},62992:function(e,t,i){"use strict";i.d(t,{m:()=>d});i(71695),i(40251),i(47021);const a=async(e,t,i,n,d,...o)=>{const r=d,l=r[e],s=l=>n&&n(d,l.result)!==l.cacheKey?(r[e]=void 0,a(e,t,i,n,d,...o)):l.result;if(l)return l instanceof Promise?l.then(s):s(l);const c=i(d,...o);return r[e]=c,c.then((i=>{r[e]={result:i,cacheKey:null==n?void 0:n(d,i)},setTimeout((()=>{r[e]=void 0}),t)}),(()=>{r[e]=void 0})),c},n=e=>e.callWS({type:"entity/source"}),d=e=>a("_entitySources",3e4,n,(e=>Object.keys(e.states).length),e)},22152:function(){Element.prototype.toggleAttribute||(Element.prototype.toggleAttribute=function(e,t){return void 0!==t&&(t=!!t),this.hasAttribute(e)?!!t||(this.removeAttribute(e),!1):!1!==t&&(this.setAttribute(e,""),!0)})},31948:function(e,t,i){"use strict";i.a(e,(async function(e,t){try{i(71695),i(40251),i(47021);"function"!=typeof window.ResizeObserver&&(window.ResizeObserver=(await i.e("73378").then(i.bind(i,88198))).default),t()}catch(a){t(a)}}),1)}}]); //# sourceMappingURL=71680.accdbba7bf5f3f4d.js.map