UNPKG

iobroker.lovelace

Version:

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

25 lines 111 kB
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[31863],{90329:function(t,e,i){i.a(t,async function(t,e){try{var a=i(40445),s=i(67576),o=i(10139),r=i(17062),n=t([r]);r=(n.then?(await n)():n)[0];class l extends r.V{get NO_AUTOMATION_TEXT(){return this.hass.localize("ui.panel.config.devices.automation.triggers.no_triggers")}get UNKNOWN_AUTOMATION_TEXT(){return this.hass.localize("ui.panel.config.devices.automation.triggers.unknown_trigger")}constructor(){super(o.nx,o.o9,t=>({device_id:t||"",trigger:"device",domain:"",entity_id:""}))}}l=(0,a.Cg)([(0,s.EM)("ha-device-trigger-picker")],l),e()}catch(l){e(l)}})},89849:function(t,e,i){i.d(e,{x:function(){return a}});const a="__ANY_STATE_IGNORE_ATTRIBUTES__"},30716:function(t,e,i){i(3362),i(62953);var a=i(40445),s=i(72274),o=i(34875),r=i(7731),n=i(5124),l=i(67576),d=i(1087);const h=t=>t.preventDefault();var c=i(57237);i(9503);let g,u,p=t=>t;class v extends s.h{async onChange(t){t.stopPropagation(),super.onChange(t),(0,d.r)(this,t.type)}render(){const t=this.renderText(),e=this.graphic&&"control"!==this.graphic&&!this.left?this.renderGraphic():n.s6,i=this.hasMeta&&this.left?this.renderMeta():n.s6,a=this.renderRipple();return(0,n.qy)(g||(g=p` ${0} ${0} ${0} <ha-checkbox tabindex="${0}" .checked="${0}" .indeterminate="${0}" ?disabled="${0}" @change="${0}" @click="${0}" class="${0}"> </ha-checkbox> ${0} ${0}`),a,e,this.left?"":t,this.separateCheckboxClick?this.tabindex:-1,this.selected,this.indeterminate,this.disabled||this.checkboxDisabled,this.onChange,this.separateCheckboxClick?c.d:h,this.left?"left":"",this.left?t:"",i)}constructor(...t){super(...t),this.checkboxDisabled=!1,this.indeterminate=!1,this.separateCheckboxClick=!1}}v.styles=[r.R,o.R,(0,n.AH)(u||(u=p`:host{--mdc-theme-secondary:var(--primary-color)}:host([graphic=avatar]) .mdc-deprecated-list-item__graphic,:host([graphic=control]) .mdc-deprecated-list-item__graphic,:host([graphic=large]) .mdc-deprecated-list-item__graphic,:host([graphic=medium]) .mdc-deprecated-list-item__graphic{margin-inline-end:var(--mdc-list-item-graphic-margin,16px);margin-inline-start:0px;direction:var(--direction)}ha-checkbox{flex-shrink:0;direction:var(--direction);margin-inline-start:auto;margin-inline-end:0;height:100%;justify-content:center}ha-checkbox.left{margin-inline-start:0}.mdc-deprecated-list-item__graphic{margin-top:var(--check-list-item-graphic-margin-top)}:host([graphic=icon]) .mdc-deprecated-list-item__graphic{margin-inline-start:0;margin-inline-end:var(--mdc-list-item-graphic-margin,32px)}`))],(0,a.Cg)([(0,l.MZ)({type:Boolean,attribute:"checkbox-disabled"})],v.prototype,"checkboxDisabled",void 0),(0,a.Cg)([(0,l.MZ)({type:Boolean})],v.prototype,"indeterminate",void 0),(0,a.Cg)([(0,l.MZ)({type:Boolean,attribute:"separate-checkbox-click"})],v.prototype,"separateCheckboxClick",void 0),v=(0,a.Cg)([(0,l.EM)("ha-check-list-item")],v)},50043:function(t,e,i){i.d(e,{$:function(){return s}});i(89463),i(16280),i(18111),i(7588);const a=(t,e)=>{if("selector"in t&&"choose"in t.selector){const i=Object.keys(t.selector.choose.choices)[0];if(i)return{active_choice:i,[i]:e}}return e},s=t=>{const e={};return t.forEach(t=>{var i,o;if(void 0!==(null===(i=t.description)||void 0===i?void 0:i.suggested_value)&&null!==(null===(o=t.description)||void 0===o?void 0:o.suggested_value))e[t.name]=a(t,t.description.suggested_value);else if("default"in t)e[t.name]=a(t,t.default);else if("expandable"===t.type){const i=s(t.schema);(t.required||Object.keys(i).length)&&(e[t.name]=i)}else if(t.required){if("boolean"===t.type)e[t.name]=!1;else if("string"===t.type)e[t.name]="";else if("integer"===t.type)e[t.name]="valueMin"in t?t.valueMin:0;else if("constant"===t.type)e[t.name]=t.value;else if("float"===t.type)e[t.name]=0;else if("select"===t.type){if(t.options.length){const i=t.options[0];e[t.name]=Array.isArray(i)?i[0]:i}}else if("positive_time_period_dict"===t.type)e[t.name]={hours:0,minutes:0,seconds:0};else if("selector"in t){const i=t.selector;var r;if("device"in i)e[t.name]=null!==(r=i.device)&&void 0!==r&&r.multiple?[]:"";else if("entity"in i){var n;e[t.name]=null!==(n=i.entity)&&void 0!==n&&n.multiple?[]:""}else if("area"in i){var l;e[t.name]=null!==(l=i.area)&&void 0!==l&&l.multiple?[]:""}else if("label"in i){var d;e[t.name]=null!==(d=i.label)&&void 0!==d&&d.multiple?[]:""}else if("boolean"in i)e[t.name]=!1;else if("addon"in i||"attribute"in i||"file"in i||"icon"in i||"serial_port"in i||"template"in i||"text"in i||"theme"in i||"object"in i)e[t.name]="";else if("number"in i){var h,c;e[t.name]=null!==(h=null===(c=i.number)||void 0===c?void 0:c.min)&&void 0!==h?h:0}else if("select"in i){var g;if(null!==(g=i.select)&&void 0!==g&&g.options.length){const a=i.select.options[0],s="string"==typeof a?a:a.value;e[t.name]=i.select.multiple?[s]:s}}else if("country"in i){var u;null!==(u=i.country)&&void 0!==u&&null!==(u=u.countries)&&void 0!==u&&u.length&&(e[t.name]=i.country.countries[0])}else if("language"in i){var p;null!==(p=i.language)&&void 0!==p&&null!==(p=p.languages)&&void 0!==p&&p.length&&(e[t.name]=i.language.languages[0])}else if("duration"in i)e[t.name]={hours:0,minutes:0,seconds:0};else if("time"in i)e[t.name]="00:00:00";else if("date"in i||"datetime"in i){const i=(new Date).toISOString().slice(0,10);e[t.name]=`${i}T00:00:00`}else if("color_rgb"in i)e[t.name]=[0,0,0];else if("color_temp"in i){var v,m;e[t.name]=null!==(v=null===(m=i.color_temp)||void 0===m?void 0:m.min_mireds)&&void 0!==v?v:153}else if("action"in i||"trigger"in i||"condition"in i)e[t.name]=[];else if("media"in i||"target"in i)e[t.name]={};else if("state"in i){var _;e[t.name]=null!==(_=i.state)&&void 0!==_&&_.multiple?[]:""}else if("choose"in i){const a=Object.keys(i.choose.choices)[0];e[t.name]=a?{active_choice:a,[a]:s([{name:a,selector:i.choose.choices[a].selector}])[a]}:{}}else{if(!("numeric_threshold"in i))throw new Error(`Selector ${Object.keys(i)[0]} not supported in initial form data`);{var b,y,f,C;const a="changed"===(null!==(b=null===(y=i.numeric_threshold)||void 0===y?void 0:y.mode)&&void 0!==b?b:"crossed")?"any":"above";e[t.name]="any"===a?{type:a}:{type:a,value:{number:null!==(f=null===(C=i.numeric_threshold)||void 0===C||null===(C=C.number)||void 0===C?void 0:C.min)&&void 0!==f?f:0,active_choice:"number"}}}}}}else;}),e}},14404:function(t,e,i){i.a(t,async function(t,a){try{i.d(e,{S:function(){return x}});var s=i(40445),o=i(5124),r=i(67576),n=i(91450),l=i(71727),d=i(85694),h=i(53580),c=(i(47680),i(67094),t([d]));d=(c.then?(await c)():c)[0];let g,u,p,v,m=t=>t;const _="M11,17A1,1 0 0,0 12,18A1,1 0 0,0 13,17A1,1 0 0,0 12,16A1,1 0 0,0 11,17M11,3V7H13V5.08C16.39,5.57 19,8.47 19,12A7,7 0 0,1 12,19A7,7 0 0,1 5,12C5,10.32 5.59,8.78 6.58,7.58L12,13L13.41,11.59L6.61,4.79V4.81C4.42,6.45 3,9.05 3,12A9,9 0 0,0 12,21A9,9 0 0,0 21,12A9,9 0 0,0 12,3M18,12A1,1 0 0,0 17,11A1,1 0 0,0 16,12A1,1 0 0,0 17,13A1,1 0 0,0 18,12M6,12A1,1 0 0,0 7,13A1,1 0 0,0 8,12A1,1 0 0,0 7,11A1,1 0 0,0 6,12Z",b="M12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22C6.47,22 2,17.5 2,12A10,10 0 0,1 12,2M12.5,7V12.25L17,14.92L16.25,16.15L11,13V7H12.5Z",y="M8,3A2,2 0 0,0 6,5V9A2,2 0 0,1 4,11H3V13H4A2,2 0 0,1 6,15V19A2,2 0 0,0 8,21H10V19H8V14A2,2 0 0,0 6,12A2,2 0 0,0 8,10V5H10V3M16,3A2,2 0 0,1 18,5V9A2,2 0 0,0 20,11H21V13H20A2,2 0 0,0 18,15V19A2,2 0 0,1 16,21H14V19H16V14A2,2 0 0,1 18,12A2,2 0 0,1 16,10V5H14V3H16Z",f="M7,5H21V7H7V5M7,13V11H21V13H7M4,4.5A1.5,1.5 0 0,1 5.5,6A1.5,1.5 0 0,1 4,7.5A1.5,1.5 0 0,1 2.5,6A1.5,1.5 0 0,1 4,4.5M4,10.5A1.5,1.5 0 0,1 5.5,12A1.5,1.5 0 0,1 4,13.5A1.5,1.5 0 0,1 2.5,12A1.5,1.5 0 0,1 4,10.5M7,19V17H21V19H7M4,16.5A1.5,1.5 0 0,1 5.5,18A1.5,1.5 0 0,1 4,19.5A1.5,1.5 0 0,1 2.5,18A1.5,1.5 0 0,1 4,16.5Z",C="M12,2C15.31,2 18,4.66 18,7.95C18,12.41 12,19 12,19C12,19 6,12.41 6,7.95C6,4.66 8.69,2 12,2M12,6A2,2 0 0,0 10,8A2,2 0 0,0 12,10A2,2 0 0,0 14,8A2,2 0 0,0 12,6M20,19C20,21.21 16.42,23 12,23C7.58,23 4,21.21 4,19C4,17.71 5.22,16.56 7.11,15.83L7.75,16.74C6.67,17.19 6,17.81 6,18.5C6,19.88 8.69,21 12,21C15.31,21 18,19.88 18,18.5C18,17.81 17.33,17.19 16.25,16.74L16.89,15.83C18.78,16.56 20,17.71 20,19Z",$="M13 11H11V5H13M13 15H11V13H13M20 2H4C2.9 2 2 2.9 2 4V22L6 18H20C21.1 18 22 17.1 22 16V4C22 2.9 21.1 2 20 2Z",w="M8,7A2,2 0 0,1 10,9V14A2,2 0 0,1 8,16A2,2 0 0,1 6,14V9A2,2 0 0,1 8,7M14,14C14,16.97 11.84,19.44 9,19.92V22H7V19.92C4.16,19.44 2,16.97 2,14H4A4,4 0 0,0 8,18A4,4 0 0,0 12,14H14M21.41,9.41L17.17,13.66L18.18,10H14A2,2 0 0,1 12,8V4A2,2 0 0,1 14,2H20A2,2 0 0,1 22,4V8C22,8.55 21.78,9.05 21.41,9.41Z",M="M18,6H13A2,2 0 0,0 11,8V10.28C10.41,10.62 10,11.26 10,12A2,2 0 0,0 12,14C13.11,14 14,13.1 14,12C14,11.26 13.6,10.62 13,10.28V8H16V16H8V8H10V6H8L6,6V18H18M20,20H4V4H20M20,2H4A2,2 0 0,0 2,4V20A2,2 0 0,0 4,22H20C21.11,22 22,21.1 22,20V4C22,2.89 21.11,2 20,2Z",A="M4,17V9H2V7H6V17H4M22,15C22,16.11 21.1,17 20,17H16V15H20V13H18V11H20V9H16V7H20A2,2 0 0,1 22,9V10.5A1.5,1.5 0 0,1 20.5,12A1.5,1.5 0 0,1 22,13.5V15M14,15V17H8V13C8,11.89 8.9,11 10,11H12V9H8V7H12A2,2 0 0,1 14,9V11C14,12.11 13.1,13 12,13H10V15H14Z",k="M21,9L17,5V8H10V10H17V13M7,11L3,15L7,19V16H14V14H7V11Z",H="M12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,2L14.39,5.42C13.65,5.15 12.84,5 12,5C11.16,5 10.35,5.15 9.61,5.42L12,2M3.34,7L7.5,6.65C6.9,7.16 6.36,7.78 5.94,8.5C5.5,9.24 5.25,10 5.11,10.79L3.34,7M3.36,17L5.12,13.23C5.26,14 5.53,14.78 5.95,15.5C6.37,16.24 6.91,16.86 7.5,17.37L3.36,17M20.65,7L18.88,10.79C18.74,10 18.47,9.23 18.05,8.5C17.63,7.78 17.1,7.15 16.5,6.64L20.65,7M20.64,17L16.5,17.36C17.09,16.85 17.62,16.22 18.04,15.5C18.46,14.77 18.73,14 18.87,13.21L20.64,17M12,22L9.59,18.56C10.33,18.83 11.14,19 12,19C12.82,19 13.63,18.83 14.37,18.56L12,22Z",V="M10.46,19C9,21.07 6.15,21.59 4.09,20.15C2.04,18.71 1.56,15.84 3,13.75C3.87,12.5 5.21,11.83 6.58,11.77L6.63,13.2C5.72,13.27 4.84,13.74 4.27,14.56C3.27,16 3.58,17.94 4.95,18.91C6.33,19.87 8.26,19.5 9.26,18.07C9.57,17.62 9.75,17.13 9.82,16.63V15.62L15.4,15.58L15.47,15.47C16,14.55 17.15,14.23 18.05,14.75C18.95,15.27 19.26,16.43 18.73,17.35C18.2,18.26 17.04,18.58 16.14,18.06C15.73,17.83 15.44,17.46 15.31,17.04L11.24,17.06C11.13,17.73 10.87,18.38 10.46,19M17.74,11.86C20.27,12.17 22.07,14.44 21.76,16.93C21.45,19.43 19.15,21.2 16.62,20.89C15.13,20.71 13.9,19.86 13.19,18.68L14.43,17.96C14.92,18.73 15.75,19.28 16.75,19.41C18.5,19.62 20.05,18.43 20.26,16.76C20.47,15.09 19.23,13.56 17.5,13.35C16.96,13.29 16.44,13.36 15.97,13.53L15.12,13.97L12.54,9.2H12.32C11.26,9.16 10.44,8.29 10.47,7.25C10.5,6.21 11.4,5.4 12.45,5.44C13.5,5.5 14.33,6.35 14.3,7.39C14.28,7.83 14.11,8.23 13.84,8.54L15.74,12.05C16.36,11.85 17.04,11.78 17.74,11.86M8.25,9.14C7.25,6.79 8.31,4.1 10.62,3.12C12.94,2.14 15.62,3.25 16.62,5.6C17.21,6.97 17.09,8.47 16.42,9.67L15.18,8.95C15.6,8.14 15.67,7.15 15.27,6.22C14.59,4.62 12.78,3.85 11.23,4.5C9.67,5.16 8.97,7 9.65,8.6C9.93,9.26 10.4,9.77 10.97,10.11L11.36,10.32L8.29,15.31C8.32,15.36 8.36,15.42 8.39,15.5C8.88,16.41 8.54,17.56 7.62,18.05C6.71,18.54 5.56,18.18 5.06,17.24C4.57,16.31 4.91,15.16 5.83,14.67C6.22,14.46 6.65,14.41 7.06,14.5L9.37,10.73C8.9,10.3 8.5,9.76 8.25,9.14Z",x={calendar:"M19,19H5V8H19M16,1V3H8V1H6V3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3H18V1M17,12H12V17H17V12Z",device:"M3 6H21V4H3C1.9 4 1 4.9 1 6V18C1 19.1 1.9 20 3 20H7V18H3V6M13 12H9V13.78C8.39 14.33 8 15.11 8 16C8 16.89 8.39 17.67 9 18.22V20H13V18.22C13.61 17.67 14 16.88 14 16S13.61 14.33 13 13.78V12M11 17.5C10.17 17.5 9.5 16.83 9.5 16S10.17 14.5 11 14.5 12.5 15.17 12.5 16 11.83 17.5 11 17.5M22 8H16C15.5 8 15 8.5 15 9V19C15 19.5 15.5 20 16 20H22C22.5 20 23 19.5 23 19V9C23 8.5 22.5 8 22 8M21 18H17V10H21V18Z",event:"M10,9A1,1 0 0,1 11,8A1,1 0 0,1 12,9V13.47L13.21,13.6L18.15,15.79C18.68,16.03 19,16.56 19,17.14V21.5C18.97,22.32 18.32,22.97 17.5,23H11C10.62,23 10.26,22.85 10,22.57L5.1,18.37L5.84,17.6C6.03,17.39 6.3,17.28 6.58,17.28H6.8L10,19V9M11,5A4,4 0 0,1 15,9C15,10.5 14.2,11.77 13,12.46V11.24C13.61,10.69 14,9.89 14,9A3,3 0 0,0 11,6A3,3 0 0,0 8,9C8,9.89 8.39,10.69 9,11.24V12.46C7.8,11.77 7,10.5 7,9A4,4 0 0,1 11,5M11,3A6,6 0 0,1 17,9C17,10.7 16.29,12.23 15.16,13.33L14.16,12.88C15.28,11.96 16,10.56 16,9A5,5 0 0,0 11,4A5,5 0 0,0 6,9C6,11.05 7.23,12.81 9,13.58V14.66C6.67,13.83 5,11.61 5,9A6,6 0 0,1 11,3Z",state:"M6.27 17.05C6.72 17.58 7 18.25 7 19C7 20.66 5.66 22 4 22S1 20.66 1 19 2.34 16 4 16C4.18 16 4.36 16 4.53 16.05L7.6 10.69L5.86 9.7L9.95 8.58L11.07 12.67L9.33 11.68L6.27 17.05M20 16C18.7 16 17.6 16.84 17.18 18H11V16L8 19L11 22V20H17.18C17.6 21.16 18.7 22 20 22C21.66 22 23 20.66 23 19S21.66 16 20 16M12 8C12.18 8 12.36 8 12.53 7.95L15.6 13.31L13.86 14.3L17.95 15.42L19.07 11.33L17.33 12.32L14.27 6.95C14.72 6.42 15 5.75 15 5C15 3.34 13.66 2 12 2S9 3.34 9 5 10.34 8 12 8Z",geo_location:"M12,11.5A2.5,2.5 0 0,1 9.5,9A2.5,2.5 0 0,1 12,6.5A2.5,2.5 0 0,1 14.5,9A2.5,2.5 0 0,1 12,11.5M12,2A7,7 0 0,0 5,9C5,14.25 12,22 12,22C12,22 19,14.25 19,9A7,7 0 0,0 12,2Z",homeassistant:h.mdiHomeAssistant,mqtt:k,numeric_state:A,sun:H,conversation:w,tag:M,template:y,time:b,time_pattern:_,webhook:V,persistent_notification:$,zone:C,list:f};class L extends o.WF{render(){if(this.icon)return(0,o.qy)(g||(g=m`<ha-icon .icon="${0}"></ha-icon>`),this.icon);if(!this.trigger)return o.s6;if(!this.hass)return this._renderFallback();const t=(0,d.ab)(this.hass.connection,this.hass.config,this.trigger).then(t=>t?(0,o.qy)(u||(u=m`<ha-icon .icon="${0}"></ha-icon>`),t):this._renderFallback());return(0,o.qy)(p||(p=m`${0}`),(0,n.T)(t))}_renderFallback(){const t=(0,l.m)(this.trigger);return(0,o.qy)(v||(v=m` <ha-svg-icon .path="${0}"></ha-svg-icon> `),x[this.trigger]||d.l[t])}}(0,s.Cg)([(0,r.MZ)({attribute:!1})],L.prototype,"hass",void 0),(0,s.Cg)([(0,r.MZ)()],L.prototype,"trigger",void 0),(0,s.Cg)([(0,r.MZ)()],L.prototype,"icon",void 0),L=(0,s.Cg)([(0,r.EM)("ha-trigger-icon")],L),a()}catch(g){a(g)}})},64013:function(t,e,i){var a=i(40445),s=i(97086),o=i(5124),r=i(67576);let n,l=t=>t;class d extends s.A{static get styles(){return[s.A.styles,(0,o.AH)(n||(n=l`:host{--wa-form-control-required-content:var(
            --ha-radio-group-required-marker,
            var(--ha-input-required-marker, "*")
          );--wa-form-control-required-content-offset:var(
            --ha-radio-group-required-marker-offset,
            0.1rem
          )}`))]}constructor(){super(),this.radioTag="ha-radio-option"}}d=(0,a.Cg)([(0,r.EM)("ha-radio-group")],d)},92677:function(t,e,i){var a=i(40445),s=i(17010),o=i(5124),r=i(67576);let n,l=t=>t;class d extends s.A{static get styles(){return[s.A.styles,(0,o.AH)(n||(n=l`:host{--wa-form-control-activated-color:var(
            --ha-radio-option-active-color,
            var(--ha-color-fill-primary-loud-resting)
          );--wa-form-control-height:var(--ha-radio-option-height, 40px);--wa-form-control-toggle-size:var(
            --ha-radio-option-toggle-size,
            20px
          );--wa-form-control-border-width:var(
            --ha-radio-option-border-width,
            var(--ha-border-width-md)
          );--wa-form-control-border-color:var(
            --ha-radio-option-border-color,
            var(--ha-color-border-neutral-normal)
          );--wa-form-control-background-color:var(
            --ha-radio-option-background-color,
            var(--wa-form-control-background-color)
          );--checked-icon-color:var(
            --ha-radio-option-checked-icon-color,
            var(--wa-form-control-activated-color)
          );--checked-icon-scale:var(--ha-radio-option-checked-icon-scale, 0.7)}:host([appearance=default]) .control{margin:var(--ha-radio-option-control-margin,var(--ha-space-3) var(--ha-space-2) var(--ha-space-3) var(--ha-space-3))}:host(:not([aria-checked=true],[aria-disabled=true]):hover) .control{border-color:var(--ha-radio-option-border-color-hover,var(--ha-radio-option-border-color,var(--ha-color-border-neutral-loud)));background-color:var(--ha-radio-option-background-color-hover,var(--ha-color-fill-neutral-quiet-hover))}:host([aria-checked=true]) .control{background-color:var(--ha-radio-option-checked-background-color,var(--ha-color-fill-primary-normal-resting));color:var(--checked-icon-color);border-color:var(--checked-icon-color)}[part~=label]{display:inline-flex;align-items:center;cursor:pointer}:host([disabled]) [part~=label]{cursor:not-allowed}`))]}}d=(0,a.Cg)([(0,r.EM)("ha-radio-option")],d)},78673:function(t,e,i){i(62953);var a=i(40445),s=i(5124),o=i(67576),r=i(6412),n=i(89784),l=i(69093),d=i(28669);let h,c,g,u=t=>t;class p extends s.WF{willUpdate(t){if(super.willUpdate(t),t.has("user"))return void this._getPersonPicture();const e=t.get("hass");if(this._personEntityId&&e&&this.hass.states[this._personEntityId]!==e.states[this._personEntityId]){const t=this.hass.states[this._personEntityId];t?this._personPicture=t.attributes.entity_picture:this._getPersonPicture()}else!this._personEntityId&&e&&this._getPersonPicture()}render(){if(!this.hass||!this.user)return s.s6;const t=this._personPicture;if(t)return(0,s.qy)(h||(h=u`<div style="${0}" class="picture"></div>`),(0,n.W)({backgroundImage:`url(${this.hass.hassUrl(t)})`}));const e=(0,d._2)(this.user.name);return(0,s.qy)(c||(c=u`<div class="initials ${0}"> ${0} </div>`),(0,r.H)({long:e.length>2}),e)}_getPersonPicture(){if(this._personEntityId=void 0,this._personPicture=void 0,this.hass&&this.user)for(const t of Object.values(this.hass.states))if(t.attributes.user_id===this.user.id&&"person"===(0,l.t)(t)){this._personEntityId=t.entity_id,this._personPicture=t.attributes.entity_picture;break}}}p.styles=(0,s.AH)(g||(g=u`:host{display:block;width:40px;height:40px}.picture{width:100%;height:100%;background-size:cover;border-radius:var(--ha-border-radius-circle)}.initials{display:inline-flex;justify-content:center;align-items:center;box-sizing:border-box;width:100%;height:100%;border-radius:var(--ha-border-radius-circle);background-color:var(--light-primary-color);text-decoration:none;color:var(--text-light-primary-color,var(--primary-text-color));overflow:hidden}.initials.long{font-size:var(--ha-font-size-s)}`)),(0,a.Cg)([(0,o.MZ)({attribute:!1})],p.prototype,"hass",void 0),(0,a.Cg)([(0,o.MZ)({attribute:!1})],p.prototype,"user",void 0),(0,a.Cg)([(0,o.wk)()],p.prototype,"_personPicture",void 0),p=(0,a.Cg)([(0,o.EM)("ha-user-badge")],p)},81550:function(t,e,i){i.a(t,async function(t,e){try{i(18111),i(22489),i(61701),i(45367),i(92731),i(3362),i(62953);var a=i(40445),s=i(5124),o=i(67576),r=i(22786),n=i(1087),l=i(28669),d=(i(75064),i(38508)),h=(i(78673),t([d]));d=(h.then?(await h)():h)[0];let c,g,u,p,v,m,_,b,y,f=t=>t;const C=[{name:"primary",weight:10},{name:"search_labels.username",weight:6},{name:"id",weight:3}];class $ extends s.WF{firstUpdated(t){super.firstUpdated(t),this.users||this._fetchUsers()}async _fetchUsers(){this.users=await(0,l.hU)(this.hass)}render(){var t;const e=null!==(t=this.placeholder)&&void 0!==t?t:this.hass.localize("ui.components.user-picker.user");return(0,s.qy)(c||(c=f` <ha-generic-picker .hass="${0}" .autofocus="${0}" .label="${0}" .placeholder="${0}" .value="${0}" .notFoundLabel="${0}" .getItems="${0}" .valueRenderer="${0}" .rowRenderer="${0}" .searchKeys="${0}" .unknownItemText="${0}" @value-changed="${0}"> </ha-generic-picker> `),this.hass,this.autofocus,this.label,e,this.value,this._notFoundLabel,this._getItems,this._valueRenderer,this._rowRenderer,C,this.hass.localize("ui.components.user-picker.unknown"),this._valueChanged)}_valueChanged(t){const e=t.detail.value;this.value=e,(0,n.r)(this,"value-changed",{value:e}),(0,n.r)(this,"change")}constructor(...t){super(...t),this.value="",this.disabled=!1,this.usersMap=(0,r.A)(t=>t?new Map(t.map(t=>[t.id,t])):new Map),this._valueRenderer=t=>{const e=this.usersMap(this.users).get(t);return e?(0,s.qy)(u||(u=f` <ha-user-badge slot="start" .hass="${0}" .user="${0}"></ha-user-badge> <span slot="headline">${0}</span> `),this.hass,e,e.name):(0,s.qy)(g||(g=f` <span slot="headline">${0}</span> `),t)},this._rowRenderer=t=>t.user?(0,s.qy)(b||(b=f` <ha-combo-box-item type="button" compact="compact"> <ha-user-badge slot="start" .hass="${0}" .user="${0}"></ha-user-badge> <span slot="headline">${0}</span> </ha-combo-box-item> `),this.hass,t.user,t.primary):(0,s.qy)(p||(p=f`<ha-combo-box-item type="button" compact="compact"> ${0} <span slot="headline">${0}</span> ${0} </ha-combo-box-item>`),t.icon?(0,s.qy)(v||(v=f`<ha-icon slot="start" .icon="${0}"></ha-icon>`),t.icon):t.icon_path?(0,s.qy)(m||(m=f`<ha-svg-icon slot="start" .path="${0}"></ha-svg-icon>`),t.icon_path):s.s6,t.primary,t.secondary?(0,s.qy)(_||(_=f`<span slot="supporting-text">${0}</span>`),t.secondary):s.s6),this._getUsers=(0,r.A)(t=>t?t.filter(t=>!t.system_generated).map(t=>({id:t.id,primary:t.name,domain_name:t.name,search_labels:{username:t.username},sorting_label:t.name,user:t})):[]),this._getItems=()=>this._getUsers(this.users),this._notFoundLabel=t=>this.hass.localize("ui.components.user-picker.no_match",{term:(0,s.qy)(y||(y=f`<b>‘${0}’</b>`),t)})}}(0,a.Cg)([(0,o.MZ)({attribute:!1})],$.prototype,"hass",void 0),(0,a.Cg)([(0,o.MZ)()],$.prototype,"label",void 0),(0,a.Cg)([(0,o.MZ)()],$.prototype,"placeholder",void 0),(0,a.Cg)([(0,o.MZ)({attribute:!1})],$.prototype,"noUserLabel",void 0),(0,a.Cg)([(0,o.MZ)()],$.prototype,"value",void 0),(0,a.Cg)([(0,o.MZ)({attribute:!1})],$.prototype,"users",void 0),(0,a.Cg)([(0,o.MZ)({type:Boolean})],$.prototype,"disabled",void 0),$=(0,a.Cg)([(0,o.EM)("ha-user-picker")],$),e()}catch(c){e(c)}})},27353:function(t,e,i){i.a(t,async function(t,e){try{i(74423),i(18111),i(22489),i(20116),i(61701),i(3362),i(62953);var a=i(40445),s=i(5124),o=i(67576),r=i(88508),n=i(22786),l=i(1087),d=i(28669),h=i(26300),c=i(81550),g=t([h,c]);[h,c]=g.then?(await g)():g;let u,p,v,m,_=t=>t;class b extends s.WF{firstUpdated(t){super.firstUpdated(t),this.users||this._fetchUsers()}async _fetchUsers(){this.users=await(0,d.hU)(this.hass)}render(){if(!this.hass||!this.users)return s.s6;const t=this._notSelectedUsers(this.users,this.value);return(0,s.qy)(u||(u=_` ${0} ${0} <div> <ha-user-picker .placeholder="${0}" .hass="${0}" .users="${0}" .disabled="${0}" @value-changed="${0}"></ha-user-picker> </div> `),this.label?(0,s.qy)(p||(p=_`<label>${0}</label>`),this.label):s.s6,(0,r.a)([t],()=>{var e;return null===(e=this.value)||void 0===e?void 0:e.map((e,i)=>(0,s.qy)(v||(v=_` <div> <ha-user-picker .placeholder="${0}" .index="${0}" .hass="${0}" .value="${0}" .users="${0}" .disabled="${0}" @value-changed="${0}"></ha-user-picker> </div> `),this.pickedUserLabel,i,this.hass,e,this._notSelectedUsersAndSelected(e,this.users,t),this.disabled,this._userChanged))}),this.pickUserLabel||this.hass.localize("ui.components.user-picker.add_user"),this.hass,t,this.disabled||!(null!=t&&t.length),this._addUser)}get _currentUsers(){return this.value||[]}async _updateUsers(t){this.value=t,(0,l.r)(this,"value-changed",{value:t})}_userChanged(t){t.stopPropagation();const e=t.currentTarget.index,i=t.detail.value,a=[...this._currentUsers];i?a.splice(e,1,i):a.splice(e,1),this._updateUsers(a)}async _addUser(t){t.stopPropagation();const e=t.detail.value;if(t.currentTarget.value="",!e)return;const i=this._currentUsers;i.includes(e)||this._updateUsers([...i,e])}constructor(...t){super(...t),this.disabled=!1,this._notSelectedUsers=(0,n.A)((t,e)=>e?null==t?void 0:t.filter(t=>!t.system_generated&&!e.includes(t.id)):null==t?void 0:t.filter(t=>!t.system_generated)),this._notSelectedUsersAndSelected=(t,e,i)=>{const a=null==e?void 0:e.find(e=>e.id===t);return a?i?[...i,a]:[a]:i}}}b.styles=(0,s.AH)(m||(m=_`div{margin-top:8px}`)),(0,a.Cg)([(0,o.MZ)({attribute:!1})],b.prototype,"hass",void 0),(0,a.Cg)([(0,o.MZ)()],b.prototype,"label",void 0),(0,a.Cg)([(0,o.MZ)({attribute:!1})],b.prototype,"value",void 0),(0,a.Cg)([(0,o.MZ)({attribute:"picked-user-label"})],b.prototype,"pickedUserLabel",void 0),(0,a.Cg)([(0,o.MZ)({attribute:"pick-user-label"})],b.prototype,"pickUserLabel",void 0),(0,a.Cg)([(0,o.MZ)({attribute:!1})],b.prototype,"users",void 0),(0,a.Cg)([(0,o.MZ)({type:Boolean})],b.prototype,"disabled",void 0),b=(0,a.Cg)([(0,o.EM)("ha-users-picker")],b),e()}catch(u){e(u)}})},79276:function(t,e,i){i.d(e,{Gw:function(){return r},PC:function(){return a},VZ:function(){return o},_R:function(){return n},un:function(){return s}});i(3362);const a="tag_scanned",s=async t=>t.callWS({type:"tag/list"}),o=async(t,e,i)=>t.callWS(Object.assign({type:"tag/create",tag_id:i},e)),r=async(t,e,i)=>t.callWS(Object.assign(Object.assign({},i),{},{type:"tag/update",tag_id:e})),n=async(t,e)=>t.callWS({type:"tag/delete",tag_id:e})},28669:function(t,e,i){i.d(e,{TK:function(){return n},_2:function(){return d},eR:function(){return s},hG:function(){return l},hU:function(){return o},kg:function(){return r},wj:function(){return a},xg:function(){return p}});i(44114),i(18111),i(61701),i(3362),i(42762);const a="system-admin",s="system-users",o=async t=>t.callWS({type:"config/auth/list"}),r=async(t,e,i,a)=>t.callWS({type:"config/auth/create",name:e,group_ids:i,local_only:a}),n=async(t,e,i)=>t.callWS(Object.assign(Object.assign({},i),{},{type:"config/auth/update",user_id:e})),l=async(t,e)=>t.callWS({type:"config/auth/delete",user_id:e}),d=t=>t?t.trim().split(" ").slice(0,3).map(t=>t.substring(0,1)).join(""):"?",h=66649!=i.j?"M12 2C6.47 2 2 6.5 2 12C2 17.5 6.5 22 12 22S22 17.5 22 12 17.5 2 12 2M12 20C7.58 20 4 16.42 4 12C4 7.58 7.58 4 12 4S20 7.58 20 12C20 16.42 16.42 20 12 20M8 14L7 8L10 10L12 7L14 10L17 8L16 14H8M8.56 16C8.22 16 8 15.78 8 15.44V15H16V15.44C16 15.78 15.78 16 15.44 16H8.56Z":null,c=66649!=i.j?"M11,7H15V9H11V11H13A2,2 0 0,1 15,13V15A2,2 0 0,1 13,17H9V15H13V13H11A2,2 0 0,1 9,11V9A2,2 0 0,1 11,7M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4Z":null,g=66649!=i.j?"M12 20C7.6 20 4 16.4 4 12S7.6 4 12 4 20 7.6 20 12 16.4 20 12 20M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M11 14H13V17H16V12H18L12 7L6 12H8V17H11V14":null,u=66649!=i.j?"M12 2C17.5 2 22 6.5 22 12S17.5 22 12 22 2 17.5 2 12 6.5 2 12 2M12 4C10.1 4 8.4 4.6 7.1 5.7L18.3 16.9C19.3 15.5 20 13.8 20 12C20 7.6 16.4 4 12 4M16.9 18.3L5.7 7.1C4.6 8.4 4 10.1 4 12C4 16.4 7.6 20 12 20C13.9 20 15.6 19.4 16.9 18.3Z":null,p=(t,e,i)=>{const a=[],s=e=>t.localize(`ui.panel.config.users.${e}`);return e.is_owner&&a.push([h,s("is_owner")]),i&&e.system_generated&&a.push([c,s("is_system")]),e.local_only&&a.push([g,s("is_local")]),e.is_active||a.push([u,s("is_not_active")]),a}},11489:function(t,e,i){i.a(t,async function(t,e){try{i(89463),i(62953);var a=i(40445),s=i(5124),o=i(67576),r=i(6412),n=i(69558),l=i(1087),d=i(10763),h=i(91485),c=i(88249),g=i(3496),u=i(14503),p=i(15702),v=(i(38333),t([d,h,p]));[d,h,p]=v.then?(await v)():v;let m,_,b,y,f,C,$,w=t=>t;class M extends s.WF{render(){const t=(0,g.H4)(this.trigger)?"list":this.trigger.trigger,e=this.yamlMode||!this.uiSupported,i="id"in this.trigger||this.showId;return(0,s.qy)(m||(m=w` <div class="${0}"> ${0} </div> `),(0,r.H)({"card-content":!0,disabled:this.disabled||"enabled"in this.trigger&&!1===this.trigger.enabled&&!this.yamlMode,yaml:e,card:!this.inSidebar}),e?(0,s.qy)(_||(_=w` ${0} <ha-yaml-editor .defaultValue="${0}" .readOnly="${0}" @value-changed="${0}"></ha-yaml-editor> `),this.uiSupported?s.s6:(0,s.qy)(b||(b=w` <ha-automation-editor-warning .alertTitle="${0}" .localize="${0}"></ha-automation-editor-warning> `),this.hass.localize("ui.panel.config.automation.editor.triggers.unsupported_platform",{platform:t}),this.hass.localize),this.trigger,this.disabled,this._onYamlChange):(0,s.qy)(y||(y=w` ${0} <div @value-changed="${0}"> ${0} </div> `),i&&!(0,g.H4)(this.trigger)?(0,s.qy)(f||(f=w` <ha-input .label="${0}" .value="${0}" .disabled="${0}" @change="${0}"></ha-input> `),this.hass.localize("ui.panel.config.automation.editor.triggers.id"),this.trigger.id||"",this.disabled,this._idChanged):s.s6,this._onUiChanged,this.description?(0,s.qy)(C||(C=w`<ha-automation-trigger-platform .hass="${0}" .trigger="${0}" .description="${0}" .disabled="${0}"></ha-automation-trigger-platform>`),this.hass,this.trigger,this.description,this.disabled):(0,n._)(`ha-automation-trigger-${t}`,{hass:this.hass,trigger:this.trigger,disabled:this.disabled})))}_idChanged(t){var e;if((0,g.H4)(this.trigger))return;const i=t.target.value;if(i===(null!==(e=this.trigger.id)&&void 0!==e?e:""))return;const a=Object.assign({},this.trigger);i?a.id=i:delete a.id,(0,l.r)(this,"value-changed",{value:a})}_onYamlChange(t){t.stopPropagation(),t.detail.isValid&&(0,l.r)(this,this.inSidebar?"yaml-changed":"value-changed",{value:(0,c.vO)(t.detail.value)})}_onUiChanged(t){if((0,g.H4)(this.trigger))return;t.stopPropagation();const e=Object.assign(Object.assign(Object.assign({},this.trigger.alias?{alias:this.trigger.alias}:{}),this.trigger.note?{note:this.trigger.note}:{}),t.detail.value);(0,l.r)(this,"value-changed",{value:e})}static get styles(){return[u.RF,(0,s.AH)($||($=w`.disabled{pointer-events:none}.card-content.yaml{padding:0 1px;border-top:1px solid var(--divider-color);border-bottom:1px solid var(--divider-color)}ha-input{margin-bottom:var(--ha-space-3)}`))]}constructor(...t){super(...t),this.disabled=!1,this.yamlMode=!1,this.uiSupported=!1,this.inSidebar=!1,this.showId=!1}}(0,a.Cg)([(0,o.MZ)({attribute:!1})],M.prototype,"hass",void 0),(0,a.Cg)([(0,o.MZ)({attribute:!1})],M.prototype,"trigger",void 0),(0,a.Cg)([(0,o.MZ)({type:Boolean})],M.prototype,"disabled",void 0),(0,a.Cg)([(0,o.MZ)({type:Boolean,attribute:"yaml"})],M.prototype,"yamlMode",void 0),(0,a.Cg)([(0,o.MZ)({type:Boolean,attribute:"supported"})],M.prototype,"uiSupported",void 0),(0,a.Cg)([(0,o.MZ)({type:Boolean,attribute:"sidebar"})],M.prototype,"inSidebar",void 0),(0,a.Cg)([(0,o.MZ)({type:Boolean,attribute:"show-id"})],M.prototype,"showId",void 0),(0,a.Cg)([(0,o.MZ)({attribute:!1})],M.prototype,"description",void 0),(0,a.Cg)([(0,o.P)("ha-yaml-editor")],M.prototype,"yamlEditor",void 0),M=(0,a.Cg)([(0,o.EM)("ha-automation-trigger-editor")],M),e()}catch(m){e(m)}})},71562:function(t,e,i){i.a(t,async function(t,a){try{i.d(e,{P:function(){return Ft}});i(18111),i(13579),i(3362),i(42762),i(62953);var s=i(40445),o=(i(68825),i(35211)),r=i(53289),n=i(5124),l=i(67576),d=i(22786),h=i(44537),c=i(93905),g=i(1087),u=i(99124),p=i(57237),v=i(52943),m=i(53516),_=i(78978),b=i(63130),y=i(9899),f=i(56214),C=i(7822),$=i(38962),w=(i(76776),i(29823)),M=(i(70947),i(11382),i(26300)),A=(i(67094),i(14404)),k=i(88249),H=i(79800),V=i(12596),x=i(22792),L=i(3496),z=i(65063),O=i(41570),Z=i(49053),q=i(15702),j=i(57116),S=i(62711),T=i(11489),E=i(29016),I=i(39165),U=i(6243),P=i(30248),D=i(99339),F=i(76321),B=i(55186),W=i(62565),R=i(89981),N=(i(38333),i(22629)),Y=i(38650),K=i(5816),G=i(20616),Q=i(40995),X=i(20790),J=i(33461),tt=i(88656),et=t([f,C,$,w,M,q,S,T,E,I,U,P,D,F,B,W,R,N,Y,K,G,Q,X,J,tt,A,H]);[f,C,$,w,M,q,S,T,E,I,U,P,D,F,B,W,R,N,Y,K,G,Q,X,J,tt,A,H]=et.then?(await et)():et;let it,at,st,ot,rt,nt,lt,dt,ht,ct,gt,ut,pt,vt,mt,_t,bt,yt,ft,Ct,$t,wt,Mt,At,kt,Ht=t=>t;const Vt="M6,2A4,4 0 0,1 10,6V8H14V6A4,4 0 0,1 18,2A4,4 0 0,1 22,6A4,4 0 0,1 18,10H16V14H18A4,4 0 0,1 22,18A4,4 0 0,1 18,22A4,4 0 0,1 14,18V16H10V18A4,4 0 0,1 6,22A4,4 0 0,1 2,18A4,4 0 0,1 6,14H8V10H6A4,4 0 0,1 2,6A4,4 0 0,1 6,2M16,18A2,2 0 0,0 18,20A2,2 0 0,0 20,18A2,2 0 0,0 18,16H16V18M14,10H10V14H14V10M6,16A2,2 0 0,0 4,18A2,2 0 0,0 6,20A2,2 0 0,0 8,18V16H6M8,6A2,2 0 0,0 6,4A2,2 0 0,0 4,6A2,2 0 0,0 6,8H8V6M18,8A2,2 0 0,0 20,6A2,2 0 0,0 18,4A2,2 0 0,0 16,6V8H18Z",xt="M11,4H13V16L18.5,10.5L19.92,11.92L12,19.84L4.08,11.92L5.5,10.5L11,16V4Z",Lt="M13,20H11V8L5.5,13.5L4.08,12.08L12,4.16L19.92,12.08L18.5,13.5L13,8V20Z",zt="M9 22C8.45 22 8 21.55 8 21V18H4C2.9 18 2 17.11 2 16V4C2 2.89 2.9 2 4 2H20C21.11 2 22 2.9 22 4V16C22 17.11 21.11 18 20 18H13.9L10.2 21.71C10 21.9 9.75 22 9.5 22H9M10 16V19.08L13.08 16H20V4H4V16H10M15.84 8.2L14.83 9.21L12.76 7.18L13.77 6.16C13.97 5.95 14.31 5.94 14.55 6.16L15.84 7.41C16.05 7.62 16.06 7.96 15.84 8.2M8 11.91L12.17 7.72L14.24 9.8L10.08 14H8V11.91Z",Ot="M9,22A1,1 0 0,1 8,21V18H4A2,2 0 0,1 2,16V4C2,2.89 2.9,2 4,2H20A2,2 0 0,1 22,4V16A2,2 0 0,1 20,18H13.9L10.2,21.71C10,21.9 9.75,22 9.5,22V22H9M10,16V19.08L13.08,16H20V4H4V16H10M6,7H18V9H6V7M6,11H15V13H6V11Z",Zt="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z",qt="M19,3L13,9L15,11L22,4V3M12,12.5A0.5,0.5 0 0,1 11.5,12A0.5,0.5 0 0,1 12,11.5A0.5,0.5 0 0,1 12.5,12A0.5,0.5 0 0,1 12,12.5M6,20A2,2 0 0,1 4,18C4,16.89 4.9,16 6,16A2,2 0 0,1 8,18C8,19.11 7.1,20 6,20M6,8A2,2 0 0,1 4,6C4,4.89 4.9,4 6,4A2,2 0 0,1 8,6C8,7.11 7.1,8 6,8M9.64,7.64C9.87,7.14 10,6.59 10,6A4,4 0 0,0 6,2A4,4 0 0,0 2,6A4,4 0 0,0 6,10C6.59,10 7.14,9.87 7.64,9.64L10,12L7.64,14.36C7.14,14.13 6.59,14 6,14A4,4 0 0,0 2,18A4,4 0 0,0 6,22A4,4 0 0,0 10,18C10,17.41 9.87,16.86 9.64,16.36L12,14L19,21H22V20L9.64,7.64Z",jt="M19,20H5V4H7V7H17V4H19M12,2A1,1 0 0,1 13,3A1,1 0 0,1 12,4A1,1 0 0,1 11,3A1,1 0 0,1 12,2M19,2H14.82C14.4,0.84 13.3,0 12,0C10.7,0 9.6,0.84 9.18,2H5A2,2 0 0,0 3,4V20A2,2 0 0,0 5,22H19A2,2 0 0,0 21,20V4A2,2 0 0,0 19,2Z",St="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z",Tt="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",Et="M12,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,2M10,16.5L16,12L10,7.5V16.5Z",It="M3 6V8H14V6H3M3 10V12H14V10H3M20 10.1C19.9 10.1 19.7 10.2 19.6 10.3L18.6 11.3L20.7 13.4L21.7 12.4C21.9 12.2 21.9 11.8 21.7 11.6L20.4 10.3C20.3 10.2 20.2 10.1 20 10.1M18.1 11.9L12 17.9V20H14.1L20.2 13.9L18.1 11.9M3 14V16H10V14H3Z",Ut="M16,8H14V11H11V13H14V16H16V13H19V11H16M2,12C2,9.21 3.64,6.8 6,5.68V3.5C2.5,4.76 0,8.09 0,12C0,15.91 2.5,19.24 6,20.5V18.32C3.64,17.2 2,14.79 2,12M15,3C10.04,3 6,7.04 6,12C6,16.96 10.04,21 15,21C19.96,21 24,16.96 24,12C24,7.04 19.96,3 15,3M15,19C11.14,19 8,15.86 8,12C8,8.14 11.14,5 15,5C18.86,5 22,8.14 22,12C22,15.86 18.86,19 15,19Z",Pt="M18,17H10.5L12.5,15H18M6,17V14.5L13.88,6.65C14.07,6.45 14.39,6.45 14.59,6.65L16.35,8.41C16.55,8.61 16.55,8.92 16.35,9.12L8.47,17M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z",Dt="M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4M9,9V15H15V9",Ft=(t,e)=>{var i,a,s;e.stopPropagation();const o=null===(i=e.currentTarget)||void 0===i?void 0:i.name;if(!o)return;const r=(null===(a=e.detail)||void 0===a?void 0:a.value)||(null===(s=e.currentTarget)||void 0===s?void 0:s.value);if((t.trigger[o]||"")===r)return;let n;void 0===r||""===r?(n=Object.assign({},t.trigger),delete n[o]):n=Object.assign(Object.assign({},t.trigger),{},{[o]:r}),(0,g.r)(t,"value-changed",{value:n})};class Bt extends n.WF{get selected(){return this._selected}_renderOverflowLabel(t,e){return(0,n.qy)(it||(it=Ht` <div class="overflow-label"> ${0} ${0} </div> `),t,this.optionsInSidebar&&!this.narrow?e||(0,n.qy)(at||(at=Ht`<span class="shortcut-placeholder ${0}"></span>`),O.c?"mac":""):n.s6)}_renderRow(){var t,e,i;const a=this._getType(this.trigger,this.triggerDescriptions),s=this._uiSupported(a),o=this._yamlMode||!s,r="platform"===a&&"target"in this.triggerDescriptions[this.trigger.trigger],l=r?this.trigger.target:"device"===a&&this.trigger.device_id?{device_id:this.trigger.device_id}:void 0,d="platform"===a?null===(t=this.triggerDescriptions[this.trigger.trigger])||void 0===t?void 0:t.target:void 0,h=(0,m.C)("list"!==a&&(null===(e=this.trigger.note)||void 0===e?void 0:e.trim())||"",250);return(0,n.qy)(st||(st=Ht` ${0} <h3 slot="header"> ${0} ${0} ${0} </h3> <ha-automation-row-event-chip .show="${0}" slot="event" class="event-chip" interactive aria-live="polite" @click="${0}" @keydown="${0}"> ${0} </ha-automation-row-event-chip> <slot name="icons" slot="icons"></slot> <ha-dropdown slot="icons" @click="${0}" @keydown="${0}" @wa-select="${0}" placement="bottom-end"> <ha-icon-button slot="trigger" .label="${0}" .path="${0}"></ha-icon-button> <ha-dropdown-item value="rename" .disabled="${0}"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> ${0} </ha-dropdown-item> ${0} <wa-divider></wa-divider> <ha-dropdown-item value="duplicate" .disabled="${0}"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> ${0} </ha-dropdown-item> <ha-dropdown-item value="copy" .disabled="${0}"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> ${0} </ha-dropdown-item> <ha-dropdown-item value="cut" .disabled="${0}"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> ${0} </ha-dropdown-item> ${0} ${0} <ha-dropdown-item value="toggle_yaml_mode" .disabled="${0}"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> ${0} </ha-dropdown-item> <wa-divider></wa-divider> <ha-dropdown-item value="disable" .disabled="${0}"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> ${0} </ha-dropdown-item> <ha-dropdown-item value="delete" variant="danger" .disabled="${0}"> <ha-svg-icon class="warning" slot="icon" .path="${0}"></ha-svg-icon> ${0} </ha-dropdown-item> </ha-dropdown> ${0} `),"list"===a?(0,n.qy)(ot||(ot=Ht`<ha-svg-icon slot="leading-icon" class="trigger-icon" .path="${0}"></ha-svg-icon>`),A.S[a]):(0,n.qy)(rt||(rt=Ht`<ha-trigger-icon slot="leading-icon" .hass="${0}" .trigger="${0}"></ha-trigger-icon>`),this.hass,this.trigger.trigger),(0,H.g)(this.trigger,this.hass,this._entityReg),void 0!==l||r&&!this._isNew?this._renderTargets(l,r&&!this._isNew,d,"device"!==a):n.s6,"list"!==a&&null!==(i=this.trigger.note)&&void 0!==i&&i.trim()?(0,n.qy)(nt||(nt=Ht` <ha-svg-icon tabindex="0" id="note-icon" .path="${0}" .label="${0}" class="note-indicator"></ha-svg-icon> <ha-tooltip for="note-icon"><p>${0}</p></ha-tooltip> `),Ot,this.hass.localize("ui.panel.config.automation.editor.note.label"),h):n.s6,this._triggered,this._showTriggeredInfo,this._showTriggeredInfo,this.hass.localize("ui.panel.config.automation.editor.triggers.triggered"),u.C,p.d,this._handleDropdownSelect,this.hass.localize("ui.common.menu"),Tt,this.disabled||"list"===a,Pt,this._renderOverflowLabel(this.hass.localize("ui.panel.config.automation.editor.triggers.rename")),"list"!==a?(0,n.qy)(lt||(lt=Ht`<ha-dropdown-item value="edit_note"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> ${0} </ha-dropdown-item>`),zt,this._renderOverflowLabel(this.hass.localize("ui.panel.config.automation.editor.note."+(this.trigger.note?"edit":"add")))):n.s6,this.disabled,Ut,this._renderOverflowLabel(this.hass.localize("ui.panel.config.automation.editor.actions.duplicate")),this.disabled,Zt,this._renderOverflowLabel(this.hass.localize("ui.panel.config.automation.editor.triggers.copy"),(0,n.qy)(dt||(dt=Ht`<span class="shortcut"> <span>${0}</span> <span>+</span> <span>C</span> </span>`),O.c?(0,n.qy)(ht||(ht=Ht`<ha-svg-icon .path="${0}"></ha-svg-icon>`),Vt):this.hass.localize("ui.panel.config.automation.editor.ctrl"))),this.disabled,qt,this._renderOverflowLabel(this.hass.localize("ui.panel.config.automation.editor.triggers.cut"),(0,n.qy)(ct||(ct=Ht`<span class="shortcut"> <span>${0}</span> <span>+</span> <span>X</span> </span>`),O.c?(0,n.qy)(gt||(gt=Ht`<ha-svg-icon .path="${0}"></ha-svg-icon>`),Vt):this.hass.localize("ui.panel.config.automation.editor.ctrl"))),this._pasteAvailable()?(0,n.qy)(ut||(ut=Ht` <ha-dropdown-item value="paste"> <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon> ${0} </ha-dropdown-item> `),jt,this._renderOverflowLabel(this.hass.localize("ui.panel.config.automation.editor.actions.paste"),(0,n.qy)(pt||(pt=Ht`<span class="shortcut"> <span>${0}</span> <span>+</span> <span>V</span> </span>`),O.c?(0,n.qy)(vt||(vt=Ht`<ha-svg-icon .path="${0}"></ha-svg-icon>`),Vt):this.hass.localize("ui.panel.config.automation.editor.ctrl")))):n.s6,this.optionsInSidebar?n.s6:(0,n.qy)(mt||(mt=Ht` <ha-dropdown-item value="move_up" .disabled="${0}"> ${0} <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon></ha-dropdown-item> <ha-dropdown-item value="move_down" .disabled="${0}"> ${0} <ha-svg-icon slot="icon" .path="${0}"></ha-svg-icon></ha-dropdown-item> `),this.disabled||!!this.first,this.hass.localize("ui.panel.config.automation.editor.move_up"),Lt,this.disabled||!!this.last,this.hass.localize("ui.panel.config.automation.editor.move_down"),xt),!s||!!this._warnings,It,this._renderOverflowLabel(this.hass.localize("ui.panel.config.automation.editor.edit_"+(o?"ui":"yaml"))),this.disabled||"list"===a,"enabled"in this.trigger&&!1===this.trigger.enabled?Et:Dt,this._renderOverflowLabel(this.hass.localize("ui.panel.config.automation.editor.actions."+("enabled"in this.trigger&&!1===this.trigger.enabled?"enable":"disable"))),this.disabled,St,this._renderOverflowLabel(this.hass.localize("ui.panel.config.automation.editor.actions.delete"),(0,n.qy)(_t||(_t=Ht`<span class="shortcut"> <span>${0}</span> <span>+</span> <span>${0}</span> </span>`),O.c?(0,n.qy)(bt||(bt=Ht`<ha-svg-icon .path="${0}"></ha-svg-icon>`),Vt):this.hass.localize("ui.panel.config.automation.editor.ctrl"),this.hass.localize("ui.panel.config.automation.editor.del"))),this.optionsInSidebar?n.s6:(0,n.qy)(yt||(yt=Ht`${0} <ha-automation-trigger-editor .hass="${0}" .trigger="${0}" .description="${0}" .disabled="${0}" .yamlMode="${0}" .uiSupported="${0}" @ui-mode-not-available="${0}"></ha-automation-trigger-editor>`),this._warnings?(0,n.qy)(ft||(ft=Ht`<ha-automation-editor-warning .localize="${0}" .warnings="${0}"> </ha-automation-editor-warning>`),this.hass.localize,this._warnings):n.s6,this.hass,this.trigger,"trigger"in this.trigger?this.triggerDescriptions[this.trigger.trigger]:void 0,this.disabled,this._yamlMode,s,this._handleUiModeNotAvailable))}render(){return this.trigger?(0,n.qy)(Ct||(Ct=Ht` <ha-card outlined class="${0}"> ${0} ${0} </ha-card> `),this._selected?"selected":"","enabled"in this.trigger&&!1===this.trigger.enabled?(0,n.qy)($t||($t=Ht` <div class="disabled-bar"> ${0} </div> `),this.hass.localize("ui.panel.config.automation.editor.actions.disabled")):n.s6,this.optionsInSidebar?(0,n.qy)(wt||(wt=Ht`<ha-automation-row .disabled="${0}" .selected="${0}" .highlight="${0}" .sortSelected="${0}" .dim="${0}" @click="${0}">${0}${0}</ha-automation-row>`),"enabled"in this.trigger&&!1===this.trigger.enabled,this._selected,this.highlight,this.sortSelected,this._triggered,this._toggleSidebar,this._selected?"selected":n.s6,this._renderRow()):(0,n.qy)(Mt||(Mt=Ht` <ha-expansion-panel left-chevron @expanded-changed="${0}"> ${0} </ha-expansion-panel> `),this._expansionPanelChanged,this._renderRow())):n.s6}willUpdate(t){t.has("yamlMode")&&(this._warnings=void 0)}updated(t){super.updated(t),t.has("trigger")&&this._subscribeTrigger()}connectedCallback(){super.connectedCallback(),this.hasUpdated&&this.trigger&&this._subscribeTrigger()}disconnectedCallback(){super.disconnectedCallback(),this._triggerUnsub&&(this._triggerUnsub.then(t=>t()),this._triggerUnsub=void 0),this._doSubscribeTrigger.cancel()}_subscribeTrigger(){this._triggerUnsub&&(this._triggerUnsub.then(t=>t()),this._triggerUnsub=void 0),this._doSubscribeTrigger()}_handleUiModeNotAvailable(t){this._warnings=(0,_._)(this.hass,t.detail).warnings,this._yamlMode||(this._yamlMode=!0)}_toggleSidebar(t){null==t||t.stopPropagation(),this._selected?(0,g.r)(this,"request-close-sidebar"):this.openSidebar()}markAsNew(){this._isNew=!0}_expansionPanelChanged(t){t.detail.expanded||(this._isNew=!1)}openSidebar(t){t=t||this.trigger,(0,g.r)(this,"open-sidebar",{save:t=>{(0,g.r)(this,"value-changed",{value:t})},close:t=>{this._selected=!1,this._isNew=!1,(0,g.r)(this,"close-sidebar"),t&&this.focus()},rename:()=>{this._renameTrigger()},editNote:this._editNoteTrigger,toggleYamlMode:()=>{this._toggleYamlMode(),this.openSidebar()},disable:this._onDisable,delete:this._onDelete,copy:this._copyTrigger,duplicate:this._duplicateTrigger,cut:this._cutTrigger,paste:this._pasteTrigger,pasteAvailable:this._pasteAvailable,insertAfter:this._insertAfter,config:t,uiSupported:this._uiSupported(this._getType(t,this.triggerDescriptions)),description:"trigger"in t?this.triggerDescriptions[t.trigger]:void 0,yamlMode:this._yamlMode}),this._selected=!0,this.narrow&&window.setTimeout(()=>{this.scrollIntoView({block:"start",behavior:"smooth"})},180)}_setClipboard(){this._clipboard=Object.assign(Object.assign({},this._clipboard),{},{trigger:this.trigger}),(0,b.l)((0,r.dump)(this.trigger))}_switchUiMode(){this._yamlMode=!1}_switchYamlMode(){this._yamlMode=!0}_showTriggeredInfo(t){t instanceof KeyboardEvent&&"Enter"!==t.key&&" "!==t.key||(t.stopPropagation(),(0,z.showAlertDialog)(this,{title:this.hass.localize("ui.panel.config.automation.editor.triggers.triggering_event_detail"),text:(0,n.qy)(At||(At=Ht` <ha-yaml-editor read-only disable-fullscreen .defaultValue="${0}"></ha-yaml-editor> `),this._triggeredResult)}))}expand(){this.updateComplete.then(()=>{this.shadowRoot.querySelector("ha-expansion-panel").expanded=!0})}focus(){var t;null===(t=this._automationRowElement)||void 0===t||t.focus()}_handleDropdownSelect(t){var e;t.stopPropagation();const i=null===(e=t.detail)||void 0===e||null===(e=e.item)||void 0===e?void 0:e.value;if(i)switch(i){case"rename":this._renameTrigger();break;case"edit_note":this._editNoteTrigger();break;case"duplicate":this._duplicateTrigger();break;case"copy":this._copyTrigger();break;case"cut":this._cutTrigger();break;case"paste":this._pasteTrigger();break;case"move_up":this._moveUp();break;case"move_down":this._moveDown();break;case"toggle_yaml_mode":this._toggleYamlMode(t.target);break;case"disable":this._onDisable();break;case"delete":this._onDelete()}}static get styles(){return[j.bH,j.Lt]}constructor(...t){super(...t),this.disabled=!1,this.optionsInSidebar=!1,this.sortSelected=!1,this._yamlMode=!1,this._triggered=!1,this._selected=!1,this._isNew=!1,this.triggerDescriptions={},this.narrow=!1,this._entityReg=[],this._renderTargets=(0,d.A)((t,e=!1,i,a=!1)=>(0,n.qy)(kt||(kt=Ht`<ha-automation-row-targets .target="${0}" .targetRequired="${0}" .selector="${0}" .interactive="${0}"></ha-automation-row-targets>`),t,e,i?{target:i}:void 0,a)),this._doSubscribeTrigger=(0,y.s)(async()=>{let t;const e=this.trigger;this._triggerUnsub&&(this._triggerUnsub.then(t=>t()),this._triggerUnsub=void 0);if(!(await(0,V.$)(this.hass,{triggers:e})).triggers.valid||this.trigger!==e)return;const i=(0,k.Dp)(this.hass,e=>{var i;void 0!==t&&(clearTimeout(t),null===(i=this._eventChipElement)||void 0===i||i.highlight());this._triggered=!0,this._triggeredResult=e,t=window.setTimeout(()=>{this._triggered=!1,t=void 0},5e3)},e);i.catch(()=>{this._triggerUnsub===i&&(this._triggerUnsub=void 0)}),this._triggerUnsub=i},5e3),this._onDelete=()=>{(0,g.r)(this,"value-changed",{value:null}),this._selected&&(0,g.r)(this,"close-sidebar"),(0,Z.c)(this,{message:this.hass.localize("ui.common.successfully_deleted"),duration:4e3,action:{text:this.hass.localize("ui.common.undo"),action:()=>{(0,g.r)(window,"undo-change")}}})},this._onDisable=()=>{var t;if((0,L.H4)(this.trigger))return;const e=!(null===(t=this.trigger.enabled)||void 0===t||t),i=Object.assign(Object.assign({},this.trigger),{},{enabled:e});var a;((0,g.r)(this,"value-changed",{value:i}),this._selected&&this.optionsInSidebar&&this.openSidebar(i),this._yamlMode&&!this.optionsInSidebar)&&(null===(a=this.triggerEditor)||void 0===a||null===(a=a.yamlEditor)||void 0===a||a.setValue(i))},this._renameTrigger=async()=>{if((0,L.H4)(this.trigger))return;const t=await(0,z.an)(this,{title:this.hass.localize("ui.panel.config.automation.editor.triggers.change_alias"),inputLabel:this.hass.localize("ui.panel.config.automation.editor.triggers.alias"),inputType:"string",placeholder:(0,v.Z)((0,H.g)(this.trigger,this.hass,this._entityReg,!0)),defaultValue:this.trigger.alias,confirmText:this.hass.localize("ui.common.submit")});if(null!==t){const i=Object.assign({},this.trigger);if(""===t?delete i.alias:i.alias=t,(0,g.r)(this,"value-changed",{value:i}),this._selected&&this.optionsInSidebar)this.openSidebar(i);else if(this._yamlMode){var e;null===(e=this.triggerEditor)||void 0===e||null===(e=e.yamlEditor)||void 0===e||e.setValue(i)}}},this._editNoteTrigger=async()=>{if((0,L.H4)(this.trigger))return;const t=this.trigger,e=await(0,z.an)(this,{title:this.hass.localize("ui.panel.config.automation.editor.note."+(t.note?"edit":"add")),inputLabel:this.hass.localize("ui.panel.config.automation.editor.note.label"),inputType:"string",defaultValue:t.note,confirmText:this.hass.localize("ui.common.submit"),multiline:!0});if(null!==e){const a=Object.assign({},t);if(""===e?delete a.note:a.note=e,(0,g.r)(this,"value-changed",{value:a}),this._selected&&this.optionsInSidebar)this.openSidebar(a);else if(this._yamlMode){var i;null===(i=this.triggerEditor)||void 0===i||null===(i=i.yamlEditor)||void 0===i||i.setValue(a)}}},this._duplicateTrigger=()=>{(0,g.r)(this,"duplicate")},this._insertAfter=t=>!(0,h.e)(t).some(t=>!(0,k.fo)(t))&&((0,g.r)(this,"insert-after",{value:t}),!0),this._copyTrigger=()=>{this._setClipboard(),this._selected&&this.optionsInSidebar&&this.openSidebar(),(0,Z.c)(this,{message:this.hass.localize("ui.panel.config.automation.editor.triggers.copied_to_clipboard"),duration:2e3})},this._cutTrigger=()=>{this._setClipboard(),(0,g.r)(this,"value-changed",{value:null}),this._selected&&(0,g.r)(this,"close-sidebar"),(0,Z.c)(this,{message:this.hass.localize("ui.panel.config.automation.editor.triggers.cut_to_clipboard"),duration:2e3})},this._pasteTrigger=()=>{var t;const e=null===(t=this._clipboard)||void 0===t?void 0:t.trigger;e&&(0,g.r)(this,"paste",{item:e})},this._pasteAvailable=()=>{var t;return!(null===(t=this._clipboard)||void 0===t||!t.trigger)},this._moveUp=()=>{(0,g.r)(this,"move-up")},this._moveDown=()=>{(0,g.r)(this,"move-down")},this._toggleYamlMode=t=>{this._yamlMode?this._switchUiMode():this._switchYamlMode(),this.optionsInSidebar?t&&this.openSidebar():this.expand()},this._getType=(0,d.A)((t,e)=>(0,L.H4)(t)?"list":t.trigger in e?"platform":t.trigger),this._uiSupported=(0,d.A)(t=>void 0!==customElements.get(`ha-automation-trigger-${t}`))}}(0,s.Cg)([(0,l.MZ)({attribute:!1})],Bt.prototype,"hass",void 0),(0,s.Cg)([(0,l.MZ)({attribute:!1})],Bt.prototype,"trigger",void 0),(0,s.Cg)([(0,l.MZ)({type:Boolean})],Bt.prototype,"disabled",void 0),(0,s.Cg)([(0,l.MZ)({type:Boolean})],Bt.prototype,"first",void 0),(0,s.Cg)([(0,l.MZ)({type:Boolean})],Bt.prototype,"last",void 0),(0,s.Cg)([(0,l.MZ)({type:Boolean})],Bt.prototype,"highlight",void 0),(0,s.Cg)([(0,l.MZ)({type:Boolean,attribute:"sidebar"})],Bt.prototype,"optionsInSidebar",void 0),(0,s.Cg)([(0,l.MZ)({type:Boolean,attribute:"sort-selected"})],Bt.prototype,"sortSelected",void 0),(0,s.Cg)([(0,l.wk)()],Bt.prototype,"_yamlMode",void 0),(0,s.Cg)([(0,l.wk)()],Bt.prototype,"_triggered",void 0),(0,s.Cg)([(0,l.wk)()],Bt.prototype,"_selected",void 0),(0,s.Cg)([(0,l.wk)()],Bt.prototype,"_isNew",void 0),(0,s.Cg)([(0,l.wk)()],Bt.prototype,"_warnings",void 0),(0,s.Cg)([(0,l.MZ)({attribute:!1})],Bt.prototype,"triggerDescriptions",void 0),(0,s.Cg)([(0,l.MZ)({type:Boolean})],Bt.prototype,"narrow",void 0),(0,s.Cg)([(0,l.P)("ha-automation-trigger-editor")],Bt.prototype,"triggerEditor",void 0),(0,s.Cg)([(0,l.P)("ha-automation-row")],Bt.prototype,"_automationRowElement",void 0),(0,s.Cg)([(0,l.P)("ha-automation-row-event-chip")],Bt.prototype,"_eventChipElement",void 0),(0,s.Cg)([(0,c.I)({key:"automationClipboard",state:!1,subscribe:!0,storage:"sessionStorage"})],Bt.prototype,"_clipboard",void 0),(0,s.Cg)([(0,l.wk)(),(0,o.Fg)({context:x.ih,subscribe:!0})],Bt.prototype,"_entityReg",void 0),Bt=(0,s.Cg)([(0,l.EM)("ha-automation-trigger-row")],Bt),a()}catch(it){a(it)}})},53723:function(t,e,i){i.a(t,async function(t,e){try{i(74423),i(18111),i(7588),i(62953),i(122);var a=i(40445),s=i(34271),o=i(5124),r=i(67576),n=i(75751),l=i(1087),d=i(57237),h=i(18350),c=(i(85938),i(67094),i(88249)),g=i(93758),u=i(3496),p=i(54706),v=(i(49053),i(82405)),m=i(41175),_=i(57116),b=i(71562),y=t([h,b]);[h,b]=y.then?(await y)():y;let f,C,$,w=t=>t;const M="M21 11H3V9H21V11M21 13H3V15H21V13Z",A="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z";class k extends((0,m.j)((0,p.E)(o.WF))){get items(){return this.triggers}set items(t){this.triggers=t}setHighlightedItems(t){this.highlightedTriggers=t}disconnectedCallback(){super.disconnectedCallback(),this._unsubscribe()}hassSubscribe(){return[(0,g.CO)(this.hass.connection,"automation","new_triggers_conditions",t=>{this._newTriggersAndConditions=t.enabled})]}_subscribeDescriptions(){this._unsubscribe(),this._triggerDescriptions={},this._unsub=(0,u.Wv)(this.hass,t=>{this._triggerDescriptions=Object.assign(Object.assign({},this._triggerDescriptions),t)})}_unsubscribe(){this._unsub&&(this._unsub.then(t=>t()),this._unsub=void 0)}willUpdate(t){super.willUpdate(t),t.has("_newTriggersAndConditions")&&this._subscribeDescriptions()}firstUpdated(t){super.firstUpdated(t),this.hass.loadBackendTranslation("triggers")}render(){return(0,o.qy)(f||(f=w` <ha-sortable handle-selector=".handle" draggable-selector="ha-automation-trigger-row" .disabled="${0}" group="triggers" invert-swap @item-moved="${0}" @item-added="${0}" @item-removed="${0}"> <div class="rows ${0}"> ${0} <div class="buttons"> <ha-button .disabled="${0}" @click="${0}" .appearance="${0}" .size="${0}"> ${0} <ha-svg-icon .path="${0}" slot="start"></ha-svg-icon> </ha-button> </div> </div> </ha-sortable> `),this.disabled,this.itemMoved,this.itemAdded,this.itemRemoved,this.optionsInSidebar?"":"no-sidebar",(0,n.u)(this.triggers,t=>this.getKey(t),(t,e)=>{var i;return(0,o.qy)(C||(C=w` <ha-automation-trigger-row .sortableData="${0}" .index="${0}" .first="${0}" .last="${0}" .trigger="${0}" .triggerDescriptions="${0}" @duplicate="${0}" @paste="${0}" @insert-after="${0}" @move-down="${0}" @move-up="${0}" @value-changed="${0}" .hass="${0}" .disabled="${0}" .narrow="${0}" .highlight="${0}" .optionsInSidebar="${0}" .sortSelected="${0}" @stop-sort-selection="${0}"> ${0} </ha-automation-trigger-row> `),t,e,0===e,e===this.triggers.length-1,t,this._triggerDescriptions,this.duplicateItem,this.pasteItem,this.insertAfter,this.moveDown,this.moveUp,this.itemChanged,this.hass,this.disabled,this.narrow,null===(i=this.highlightedTriggers)||void 0===i?void 0:i.includes(t),this.optionsInSidebar,this.rowSortSelected===e,this.stopSortSelection,this.disabled?o.s6:(0,o.qy)($||($=w` <div tabindex="0" class="handle ${0}" slot="icons" @keydown="${0}" @click="${0}" .index="${0}"> <ha-svg-icon .path="${0}"></ha-svg-icon> </div> `),this.rowSortSelected===e?"active":"",this.handleDragKeydown,d.d,e,M))}),this.disabled,this._addTriggerDialog,this.root?"accent":"filled",this.root?"medium":"small",this.hass.localize("ui.panel.config.automation.editor.triggers.add"),A)}_addTriggerDialog(){var t,e;this.narrow&&(0,l.r)(this,"request-close-sidebar"),(0,v.gZ)(this,{type:"trigger",add:this._addTrigger,clipboardItem:null!==(t=this._clipboard)&&void 0!==t&&t.trigger?(0,u.H4)(this._clipboard.trigger)?"list":null===(e=this._clipboard)||void 0===e||null===(e=e.trigger)||void 0===e?void 0:e.trigger:void 0,clipboardPasteToastBottomOffset:this.editorDirty?60:void 0})}updated(t){if(super.updated(t),!this.hass)return;const e=(0,v.II)(this.hass.states,this.hass.devices,this.hass.areas,"trigger");if(t.has("triggers")&&e&&(this._openedAddDialogFromQuery=!1),!this._openedAddDialogFromQuery&&this.root&&!this.disabled&&0===this.triggers.length&&e?(this._openedAddDialogFromQuery=!0,queueMicrotask(()=>this._addTriggerDialog())):this._openedAddDialogFromQuery&&!e&&(this._openedAddDialogFromQuery=!1),t.has("triggers")&&(this.focusLastItemOnChange||void 0!==this.focusItemIndexOnChange)){const t=this.shadowRoot.querySelector("ha-automation-trigger-row:"+(this.focusLastItemOnChange?"last-of-type":`nth-of-type(${this.focusItemIndexOnChange+1})`));this.focusLastItemOnChange=!1,this.focusItemIndexOnChange=void 0,t.updateComplete.then(()=>{this.optionsInSidebar?(t.openSidebar(),this.narrow&&t.scrollIntoView({block:"start",behavior:"smooth"})):(t.expand(),t.focus()),t.markAsNew()})}}expandAll(){this.shadowRoot.querySelectorAll("ha-automation-trigger-row").forEach(t=>{t.expand()})}constructor(...t){super(...t),this.root=!1,this.editorDirty=!1,this._triggerDescriptions={},this._newTriggersAndConditions=!1,this._openedAddDialogFromQuery=!1,this._addTrigger=(t,e)=>{let i;if(t===v.uV)i=this.triggers.concat((0,s.A)(this._clipboard.trigger));else if((0,c.Q)(t))i=this.triggers.concat({trigger:(0,c.Dt)(t),target:e});else{const a=t,s=customElements.get(`ha-automation-trigger-${a}`);i=this.triggers.concat(Object.assign(Object.assign({},s.defaultConfig),null!=e&&e.entity_id?{entity_id:e.entity_id}:{}))}this.focusLastItemOnChange=!0,(0,l.r)(this,"value-changed",{value:i})}}}k.styles=_.Ju,(0,a.Cg)([(0,r.MZ)({attribute:!1})],k.prototype,"triggers",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],k.prototype,"highlightedTriggers",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean})],k.prototype,"root",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean,attribute:!1})],k.prototype,"editorDirty",void 0),(0,a.Cg)([(0,r.wk)()],k.prototype,"_triggerDescriptions",void 0),(0,a.Cg)([(0,r.wk)()],k.prototype,"_newTriggersAndConditions",void 0),k=(0,a.Cg)([(0,r.EM)("ha-automation-trigger")],k),e()}catch(f){e(f)}})},29016:function(t,e,i){i.a(t,async function(t,e){try{i(62953);var a=i(40445),s=i(5124),o=i(67576),r=i(22786),n=i(1087),l=i(52763),d=i(57673),h=t([l]);l=(h.then?(await h)():h)[0];let c,g=t=>t;class u extends s.WF{static get defaultConfig(){return{trigger:"calendar",entity_id:"",event:"start",offset:"0"}}render(){const t=this._schema(this.hass.localize),e=this.trigger.offset,i=(0,d.z)(e);let a="after";("object"==typeof e&&i.hours<0||"string"==typeof e&&e.startsWith("-"))&&(i.hours=Math.abs(i.hours),a="before");const o=Object.assign(Object.assign({},this.trigger),{},{offset:i,offset_type:a});return(0,s.qy)(c||(c=g` <ha-form .schema="${0}" .data="${0}" .hass="${0}" .disabled="${0}" .computeLabel="${0}" @value-changed="${0}"></ha-form> `),t,o,this.hass,this.disabled,this._computeLabelCallback,this._valueChanged)}_valueChanged(t){var e,i,a;t.stopPropagation();const s=t.detail.value.offset,o="before"===t.detail.value.offset_type?"-":"",r=Object.assign(Object.assign({},t.detail.value),{},{offset:`${o}${null!==(e=s.hours)&&void 0!==e?e:0}:${null!==(i=s.minutes)&&void 0!==i?i:0}:${null!==(a=s.seconds)&&void 0!==a?a:0}`});delete r.offset_type,(0,n.r)(this,"value-changed",{value:r})}constructor(...t){super(...t),this.disabled=!1,this._schema=(0,r.A)(t=>[{name:"entity_id",required:!0,selector:{entity:{domain:"calendar"}}},{name:"event",type:"select",required:!0,options:[["start",t("ui.panel.config.automation.editor.triggers.type.calendar.start")],["end",t("ui.panel.config.automation.editor.triggers.type.calendar.end")]]},{name:"offset",required:!0,selector:{duration:{}}},{name:"offset_type",type:"select",required:!0,options:[["before",t("ui.panel.config.automation.editor.triggers.type.calendar.before")],["after",t("ui.panel.config.automation.editor.triggers.type.calendar.after")]]}]),this._computeLabelCallback=t=>{switch(t.name){case"entity_id":return this.hass.localize("ui.components.entity.entity-picker.entity");case"event":return this.hass.localize("ui.panel.config.automation.editor.triggers.type.calendar.event")}return""}}}(0,a.Cg)([(0,o.MZ)({attribute:!1})],u.prototype,"hass",void 0),(0,a.Cg)([(0,o.MZ)({attribute:!1})],u.prototype,"trigger",void 0),(0,a.Cg)([(0,o.MZ)({type:Boolean})],u.prototype,"disabled",void 0),u=(0,a.Cg)([(0,o.EM)("ha-automation-trigger-calendar")],u),e()}catch(c){e(c)}})},39165:function(t,e,i){i.a(t,async function(t,e){try{i(18111),i(61701),i(3362),i(62953);var a=i(40445),s=(i(68825),i(5124)),o=i(67576),r=i(44537),n=i(1087),l=i(26300),d=i(91485),h=i(65063),c=t([l,d]);[l,d]=c.then?(await c)():c;let g,u,p,v,m=t=>t;const _="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",b="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z",y="^[^.。,,?¿?؟!!;;::]+$";class f extends s.WF{static get defaultConfig(){return{trigger:"conversation",command:""}}render(){const{command:t}=this.trigger,e=t?(0,r.e)(t):[];return(0,s.qy)(g||(g=m`${0} <ha-input class="flex-auto" id="option_input" .label="${0}" .validationMessage="${0}" auto-validate pattern="${0}" @keydown="${0}" @change="${0}"> <ha-icon-button @click="${0}" slot="end" .path="${0}"></ha-icon-button> </ha-input>`),e.length?(0,s.qy)(u||(u=m`${0} <wa-divider></wa-divider>`),e.map((t,e)=>(0,s.qy)(p||(p=m` <ha-input class="option" iconTrailing .index="${0}" .value="${0}" .validationMessage="${0}" auto-validate validateOnInitialRender pattern="${0}" @change="${0}"> <ha-icon-button @click="${0}" slot="end" .path="${0}"></ha-icon-button> </ha-input> `),e,t,this.hass.localize("ui.panel.config.automation.editor.triggers.type.conversation.no_punctuation"),y,this._updateOption,this._removeOption,_))):s.s6,this.hass.localize("ui.panel.config.automation.editor.triggers.type.conversation.add_sentence"),this.hass.localize("ui.panel.config.automation.editor.triggers.type.conversation.no_punctuation"),y,this._handleKeyAdd,this._addOption,this._addOption,b)}_handleKeyAdd(t){t.stopPropagation(),"Enter"===t.key&&this._addOption()}_addOption(){const t=this._optionInput;null!=t&&t.value&&((0,n.r)(this,"value-changed",{value:Object.assign(Object.assign({},this.trigger),{},{command:this.trigger.command.length?[...Array.isArray(this.trigger.command)?this.trigger.command:[this.trigger.command],t.value]:t.value})}),t.value="")}async _updateOption(t){var e;const i=t.target.index,a=[...Array.isArray(this.trigger.command)?this.trigger.command:[this.trigger.command]];a.splice(i,1,null!==(e=t.target.value)&&void 0!==e?e:""),(0,n.r)(this,"value-changed",{value:Object.assign(Object.assign({},this.trigger),{},{command:a})})}async _removeOption(t){const e=t.target.parentElement.index;if(!(await(0,h.dk)(this,{title:this.hass.localize("ui.panel.config.automation.editor.triggers.type.conversation.delete"),text:this.hass.localize("ui.panel.config.automation.editor.triggers.type.conversation.confirm_delete"),destructive:!0})))return;let i;Array.isArray(this.trigger.command)?(i=[...this.trigger.command],i.splice(e,1)):i="",(0,n.r)(this,"value-changed",{value:Object.assign(Object.assign({},this.trigger),{},{command:i})})}constructor(...t){super(...t),this.disabled=!1}}f.styles=(0,s.AH)(v||(v=m`.layout{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:flex-start}.option{margin-top:4px}ha-input{margin-bottom:var(--ha-space-1)}#option_input{margin-top:8px}.header{margin-top:8px;margin-bottom:8px}wa-divider{margin-top:var(--ha-space-2);margin-bottom:var(--ha-space-3)}`)),(0,a.Cg)([(0,o.MZ)({attribute:!1})],f.prototype,"hass",void 0),(0,a.Cg)([(0,o.MZ)({attribute:!1})],f.prototype,"trigger",void 0),(0,a.Cg)([(0,o.MZ)({type:Boolean})],f.prototype,"disabled",void 0),(0,a.Cg)([(0,o.P)("#option_input",!0)],f.prototype,"_optionInput",void 0),f=(0,a.Cg)([(0,o.EM)("ha-automation-trigger-conversation")],f),e()}catch(g){e(g)}})},6243:function(t,e,i){i.a(t,async function(t,e){try{i(16280),i(18111),i(7588),i(3362),i(62953);var a=i(40445),s=i(35211),o=i(5124),r=i(67576),n=i(22786),l=i(1087),d=i(19459),h=i(1798),c=i(90329),g=i(50043),u=i(52763),p=i(22792),v=i(10139),m=t([h,c,u]);[h,c,u]=m.then?(await m)():m;let _,b,y,f=t=>t;class C extends o.WF{static get defaultConfig(){return{trigger:"device",device_id:"",domain:"",entity_id:""}}shouldUpdate(t){return!t.has("trigger")||(!this.trigger.device_id||this.trigger.device_id in this.hass.devices||((0,l.r)(this,"ui-mode-not-available",Error(this.hass.localize("ui.panel.config.automation.editor.edit_unknown_device"))),!1))}render(){var t;const e=this._deviceId||this.trigger.device_id;return(0,o.qy)(_||(_=f` <ha-device-picker .value="${0}" @value-changed="${0}" .hass="${0}" .disabled="${0}" .label="${0}"></ha-device-picker> <ha-device-trigger-picker .value="${0}" .deviceId="${0}" @value-changed="${0}" .hass="${0}" .disabled="${0}" .label="${0}"></ha-device-trigger-picker> ${0} `),e,this._devicePicked,this.hass,this.disabled,this.hass.localize("ui.panel.config.automation.editor.triggers.type.device.label"),this.trigger,e,this._deviceTriggerPicked,this.hass,this.disabled,this.hass.localize("ui.panel.config.automation.editor.triggers.type.device.trigger"),null!==(t=this._capabilities)&&void 0!==t&&t.extra_fields?(0,o.qy)(b||(b=f` <ha-form .hass="${0}" .data="${0}" .schema="${0}" .disabled="${0}" .computeLabel="${0}" .computeHelper="${0}" @value-changed="${0}"></ha-form> `),this.hass,this._extraFieldsData(this.trigger,this._capabilities),this._capabilities.extra_fields,this.disabled,(0,v.T_)(this.hass.localize,this.trigger),(0,v.TH)(this.hass.localize,this.trigger),this._extraFieldsChanged):"")}firstUpdated(){this.hass.loadBackendTranslation("device_automation"),this._capabilities||this._getCapabilities(),this.trigger&&(this._origTrigger=this.trigger)}updated(t){if(!t.has("trigger"))return;const e=t.get("trigger");e&&!(0,v.Po)(this._entityReg,e,this.trigger)&&this._getCapabilities()}async _getCapabilities(){const t=this.trigger;if(this._capabilities=t.domain?await(0,v.TB)(this.hass.callWS,t):void 0,this._capabilities){const t=Object.assign(Object.assign({},this.trigger),this._extraFieldsData(this.trigger,this._capabilities));(0,d.b)(this.trigger,t)||(0,l.r)(this,"value-changed",{value:t})}}_devicePicked(t){t.stopPropagation(),this._deviceId=t.target.value,void 0===this._deviceId&&(0,l.r)(this,"value-changed",{value:Object.assign(Object.assign({},C.defaultConfig),{},{trigger:"device"})})}_deviceTriggerPicked(t){t.stopPropagation();let e=t.detail.value;this._origTrigger&&(0,v.Po)(this._entityReg,this._origTrigger,e)&&(e=this._origTrigger),this.trigger.id&&(e.id=this.trigger.id),(0,l.r)(this,"value-changed",{value:e})}_extraFieldsChanged(t){t.stopPropagation(),(0,l.r)(this,"value-changed",{value:Object.assign(Object.assign({},this.trigger),t.detail.value)})}constructor(...t){super(...t),this.disabled=!1,this._entityReg=[],this._extraFieldsData=(0,n.A)((t,e)=>{const i=(0,g.$)(e.extra_fields);return e.extra_fields.forEach(e=>{void 0!==t[e.name]&&(i[e.name]=t[e.name])}),i})}}C.styles=(0,o.AH)(y||(y=f`:host{display:block;margin-bottom:var(--ha-space-3)}ha-device-picker{display:block;margin-bottom:24px}ha-form{display:block;margin-top:24px}`)),(0,a.Cg)([(0,r.MZ)({attribute:!1})],C.prototype,"hass",void 0),(0,a.Cg)([(0,r.MZ)({type:Object})],C.prototype,"trigger",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean})],C.prototype,"disabled",void 0),(0,a.Cg)([(0,r.wk)()],C.prototype,"_deviceId",void 0),(0,a.Cg)([(0,r.wk)()],C.prototype,"_capabilities",void 0),(0,a.Cg)([(0,r.wk)(),(0,s.Fg)({context:p.ih,subscribe:!0})],C.prototype,"_entityReg",void 0),C=(0,a.Cg)([(0,r.EM)("ha-automation-trigger-device")],C),e()}catch(_){e(_)}})},30248:function(t,e,i){i.a(t,async function(t,e){try{i(62953);var a=i(40445),s=i(5124),o=i(67576),r=i(1087),n=i(10763),l=i(91485),d=i(27353),h=i(71562),c=t([n,l,d,h]);[n,l,d,h]=c.then?(await c)():c;let g,u=t=>t;class p extends s.WF{static get defaultConfig(){return{trigger:"event",event_type:""}}render(){const{event_type:t,event_data:e,context:i}=this.trigger;return(0,s.qy)(g||(g=u` <ha-input .label="${0}" name="event_type" .value="${0}" .disabled="${0}" @change="${0}"></ha-input> <ha-yaml-editor .label="${0}" .name="${0}" .readOnly="${0}" .defaultValue="${0}" @value-changed="${0}"></ha-yaml-editor> <br> ${0} <ha-users-picker .hass="${0}" .disabled="${0}" .value="${0}" @value-changed="${0}"></ha-users-picker> `),this.hass.localize("ui.panel.config.automation.editor.triggers.type.event.event_type"),t,this.disabled,this._valueChanged,this.hass.localize("ui.panel.config.automation.editor.triggers.type.event.event_data"),"event_data",this.disabled,e,this._dataChanged,this.hass.localize("ui.panel.config.automation.editor.triggers.type.event.context_users"),this.hass,this.disabled,this._wrapUsersInArray(null==i?void 0:i.user_id),this._usersChanged)}_wrapUsersInArray(t){return t?"string"==typeof t?[t]:t:[]}_valueChanged(t){t.stopPropagation(),(0,h.P)(this,t)}_dataChanged(t){t.stopPropagation(),t.detail.isValid&&(0,h.P)(this,t)}_usersChanged(t){t.stopPropagation();const e=Object.assign({},this.trigger);!t.detail.value.length&&e.context?delete e.context.user_id:(e.context||(e.context={}),e.context.user_id=t.detail.value),(0,r.r)(this,"value-changed",{value:e})}constructor(...t){super(...t),this.disabled=!1}}(0,a.Cg)([(0,o.MZ)({attribute:!1})],p.prototype,"hass",void 0),(0,a.Cg)([(0,o.MZ)({attribute:!1})],p.prototype,"trigger",void 0),(0,a.Cg)([(0,o.MZ)({type:Boolean})],p.prototype,"disabled",void 0),p=(0,a.Cg)([(0,o.EM)("ha-automation-trigger-event")],p),e()}catch(g){e(g)}})},99339:function(t,e,i){i.a(t,async function(t,e){try{i(62953);var a=i(40445),s=i(52763),o=i(5124),r=i(67576),n=i(22786),l=i(1087),d=t([s]);s=(d.then?(await d)():d)[0];let h,c=t=>t;class g extends o.WF{static get defaultConfig(){return{trigger:"geo_location",source:"",zone:"",event:"enter"}}render(){return(0,o.qy)(h||(h=c` <ha-form .schema="${0}" .data="${0}" .hass="${0}" .disabled="${0}" .computeLabel="${0}" @value-changed="${0}"></ha-form> `),this._schema(this.hass.localize),this.trigger,this.hass,this.disabled,this._computeLabelCallback,this._valueChanged)}_valueChanged(t){t.stopPropagation();const e=t.detail.value;(0,l.r)(this,"value-changed",{value:e})}constructor(...t){super(...t),this.disabled=!1,this._schema=(0,n.A)(t=>[{name:"source",selector:{text:{}}},{name:"zone",selector:{entity:{domain:"zone"}}},{name:"event",type:"select",required:!0,options:[["enter",t("ui.panel.config.automation.editor.triggers.type.geo_location.enter")],["leave",t("ui.panel.config.automation.editor.triggers.type.geo_location.leave")]]}]),this._computeLabelCallback=t=>this.hass.localize(`ui.panel.config.automation.editor.triggers.type.geo_location.${t.name}`)}}(0,a.Cg)([(0,r.MZ)({attribute:!1})],g.prototype,"hass",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],g.prototype,"trigger",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean})],g.prototype,"disabled",void 0),g=(0,a.Cg)([(0,r.EM)("ha-automation-trigger-geo_location")],g),e()}catch(h){e(h)}})},76321:function(t,e,i){i.a(t,async function(t,e){try{i(62953);var a=i(40445),s=i(52763),o=i(5124),r=i(67576),n=i(22786),l=i(1087),d=t([s]);s=(d.then?(await d)():d)[0];let h,c,g=t=>t;class u extends o.WF{static get defaultConfig(){return{trigger:"homeassistant",event:"start"}}render(){return(0,o.qy)(h||(h=g` <ha-form .schema="${0}" .data="${0}" .hass="${0}" .disabled="${0}" .computeLabel="${0}" @value-changed="${0}"></ha-form> `),this._schema(this.hass.localize),this.trigger,this.hass,this.disabled,this._computeLabelCallback,this._valueChanged)}_valueChanged(t){t.stopPropagation();const e=t.detail.value;(0,l.r)(this,"value-changed",{value:e})}constructor(...t){super(...t),this.disabled=!1,this._schema=(0,n.A)(t=>[{name:"event",type:"select",required:!0,options:[["start",t("ui.panel.config.automation.editor.triggers.type.homeassistant.start")],["shutdown",t("ui.panel.config.automation.editor.triggers.type.homeassistant.shutdown")]]}]),this._computeLabelCallback=t=>this.hass.localize(`ui.panel.config.automation.editor.triggers.type.homeassistant.${t.name}`)}}u.styles=(0,o.AH)(c||(c=g`label{display:flex;align-items:center}`)),(0,a.Cg)([(0,r.MZ)({attribute:!1})],u.prototype,"hass",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],u.prototype,"trigger",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean})],u.prototype,"disabled",void 0),u=(0,a.Cg)([(0,r.EM)("ha-automation-trigger-homeassistant")],u),e()}catch(h){e(h)}})},55186:function(t,e,i){i.a(t,async function(t,e){try{i(62953);var a=i(40445),s=i(5124),o=i(67576),r=i(44537),n=i(53723),l=i(71562),d=t([n,l]);[n,l]=d.then?(await d)():d;let h,c,g=t=>t;class u extends s.WF{static get defaultConfig(){return{triggers:[]}}render(){const t=(0,r.e)(this.trigger.triggers);return(0,s.qy)(h||(h=g` <ha-automation-trigger .triggers="${0}" .hass="${0}" .disabled="${0}" .name="${0}" @value-changed="${0}"></ha-automation-trigger> `),t,this.hass,this.disabled,"triggers",this._valueChanged)}_valueChanged(t){(0,l.P)(this,t)}constructor(...t){super(...t),this.disabled=!1}}u.styles=(0,s.AH)(c||(c=g``)),(0,a.Cg)([(0,o.MZ)({attribute:!1})],u.prototype,"hass",void 0),(0,a.Cg)([(0,o.MZ)({attribute:!1})],u.prototype,"trigger",void 0),(0,a.Cg)([(0,o.MZ)({type:Boolean})],u.prototype,"disabled",void 0),u=(0,a.Cg)([(0,o.EM)("ha-automation-trigger-list")],u),e()}catch(h){e(h)}})},62565:function(t,e,i){i.a(t,async function(t,e){try{i(16280),i(62953);var a=i(40445),s=i(5124),o=i(67576),r=i(22786),n=i(44537),l=i(57673),d=i(1087),h=i(24790),c=i(52763),g=t([c]);c=(g.then?(await g)():g)[0];let u,p,v=t=>t;class m extends s.WF{willUpdate(t){var e,i;this._inputAboveIsEntity=null!==(e=this._inputAboveIsEntity)&&void 0!==e?e:"string"==typeof this.trigger.above&&(this.trigger.above.startsWith("input_number.")||this.trigger.above.startsWith("number.")||this.trigger.above.startsWith("sensor.")),this._inputBelowIsEntity=null!==(i=this._inputBelowIsEntity)&&void 0!==i?i:"string"==typeof this.trigger.below&&(this.trigger.below.startsWith("input_number.")||this.trigger.below.startsWith("number.")||this.trigger.below.startsWith("sensor.")),t.has("trigger")&&this.trigger&&(0,h.r)(this.trigger.for)&&(0,d.r)(this,"ui-mode-not-available",Error(this.hass.localize("ui.errors.config.no_template_editor_support")))}static get defaultConfig(){return{trigger:"numeric_state",entity_id:[]}}render(){const t=this._schema(this.hass.localize,this._inputAboveIsEntity,this._inputBelowIsEntity),e=this._data(this._inputAboveIsEntity,this._inputBelowIsEntity,this.trigger);return(0,s.qy)(u||(u=v` <ha-form .hass="${0}" .data="${0}" .schema="${0}" .disabled="${0}" @value-changed="${0}" .computeLabel="${0}"></ha-form> `),this.hass,e,t,this.disabled,this._valueChanged,this._computeLabelCallback)}_valueChanged(t){t.stopPropagation();const e=Object.assign({},t.detail.value);this._inputAboveIsEntity="input"===e.lower_limit,this._inputBelowIsEntity="input"===e.upper_limit,delete e.lower_limit,delete e.upper_limit,""===e.value_template&&delete e.value_template,(0,d.r)(this,"value-changed",{value:e})}constructor(...t){super(...t),this.disabled=!1,this._schema=(0,r.A)((t,e,i)=>[{name:"entity_id",required:!0,selector:{entity:{multiple:!0}}},{name:"attribute",context:{filter_entity:"entity_id"},selector:{attribute:{hide_attributes:["access_token","auto_update","available_modes","away_mode","changed_by","code_arm_required","code_format","color_mode","color_modes","current_activity","device_class","editable","effect_list","effect","entity_id","entity_picture","event_type","event_types","fan_mode","fan_modes","fan_speed_list","forecast","friendly_name","frontend_stream_type","has_date","has_time","hs_color","hvac_mode","hvac_modes","icon","id","latest_version","max_color_temp_kelvin","max_mireds","max_temp","media_album_name","media_artist","media_content_type","media_position_updated_at","media_title","min_color_temp_kelvin","min_mireds","min_temp","mode","next_dawn","next_dusk","next_midnight","next_noon","next_rising","next_setting","operation_list","operation_mode","options","percentage_step","precipitation_unit","preset_mode","preset_modes","pressure_unit","release_notes","release_summary","release_url","restored","rgb_color","rgbw_color","shuffle","skipped_version","sound_mode_list","sound_mode","source_list","source_type","source","state_class","step","supported_color_modes","supported_features","swing_mode","swing_modes","target_temp_step","temperature_unit","title","token","unit_of_measurement","user_id","uuid","visibility_unit","wind_speed_unit","xy_color"]}}},{name:"lower_limit",type:"select",required:!0,options:[["value",t("ui.panel.config.automation.editor.triggers.type.numeric_state.type_value")],["input",t("ui.panel.config.automation.editor.triggers.type.numeric_state.type_input")]]},...e?[{name:"above",selector:{entity:{domain:["input_number","number","sensor"]}}}]:[{name:"above",selector:{number:{mode:"box",min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,step:.1}}}],{name:"upper_limit",type:"select",required:!0,options:[["value",t("ui.panel.config.automation.editor.triggers.type.numeric_state.type_value")],["input",t("ui.panel.config.automation.editor.triggers.type.numeric_state.type_input")]]},...i?[{name:"below",selector:{entity:{domain:["input_number","number","sensor"]}}}]:[{name:"below",selector:{number:{mode:"box",min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,step:.1}}}],{name:"value_template",selector:{template:{}}},{name:"for",selector:{duration:{}}}]),this._data=(0,r.A)((t,e,i)=>Object.assign(Object.assign({lower_limit:t?"input":"value",upper_limit:e?"input":"value"},i),{},{entity_id:(0,n.e)(i.entity_id),for:(0,l.z)(i.for)})),this._computeLabelCallback=t=>{switch(t.name){case"entity_id":return this.hass.localize("ui.components.entity.entity-picker.entity");case"attribute":return this.hass.localize("ui.components.entity.entity-attribute-picker.attribute");case"for":return this.hass.localize("ui.panel.config.automation.editor.triggers.type.state.for");default:return this.hass.localize(`ui.panel.config.automation.editor.triggers.type.numeric_state.${t.name}`)}}}}m.styles=(0,s.AH)(p||(p=v`:host{display:block;margin-bottom:var(--ha-space-3)}`)),(0,a.Cg)([(0,o.MZ)({attribute:!1})],m.prototype,"hass",void 0),(0,a.Cg)([(0,o.MZ)({attribute:!1})],m.prototype,"trigger",void 0),(0,a.Cg)([(0,o.MZ)({type:Boolean})],m.prototype,"disabled",void 0),(0,a.Cg)([(0,o.wk)()],m.prototype,"_inputAboveIsEntity",void 0),(0,a.Cg)([(0,o.wk)()],m.prototype,"_inputBelowIsEntity",void 0),m=(0,a.Cg)([(0,o.EM)("ha-automation-trigger-numeric_state")],m),e()}catch(u){e(u)}})},89981:function(t,e,i){i.a(t,async function(t,e){try{i(62953);var a=i(40445),s=i(22786),o=i(5124),r=i(67576),n=i(1087),l=(i(30716),i(52763)),d=i(26300),h=t([l,d]);[l,d]=h.then?(await h)():h;let c,g=t=>t;const u=["added","removed"],p="";class v extends o.WF{static get defaultConfig(){return{trigger:"persistent_notification",update_type:[...u],notification_id:p}}render(){const t=this._schema(this.hass.localize);return(0,o.qy)(c||(c=g` <ha-form .schema="${0}" .data="${0}" .hass="${0}" .disabled="${0}" .computeLabel="${0}" @value-changed="${0}"></ha-form> `),t,this.trigger,this.hass,this.disabled,this._computeLabelCallback,this._valueChanged)}_valueChanged(t){t.stopPropagation();const e=t.detail.value;(0,n.r)(this,"value-changed",{value:e})}constructor(...t){super(...t),this.disabled=!1,this._schema=(0,s.A)(t=>[{name:"notification_id",required:!1,selector:{text:{}}},{name:"update_type",type:"multi_select",required:!1,options:[["added",t("ui.panel.config.automation.editor.triggers.type.persistent_notification.update_types.added")],["removed",t("ui.panel.config.automation.editor.triggers.type.persistent_notification.update_types.removed")],["current",t("ui.panel.config.automation.editor.triggers.type.persistent_notification.update_types.current")],["updated",t("ui.panel.config.automation.editor.triggers.type.persistent_notification.update_types.updated")]]}]),this._computeLabelCallback=t=>this.hass.localize(`ui.panel.config.automation.editor.triggers.type.persistent_notification.${t.name}`)}}(0,a.Cg)([(0,r.MZ)({attribute:!1})],v.prototype,"hass",void 0),(0,a.Cg)([(0,r.MZ)({attribute:!1})],v.prototype,"trigger",void 0),(0,a.Cg)([(0,r.MZ)({type:Boolean})],v.prototype,"disabled",void 0),v=(0,a.Cg)([(0,r.EM)("ha-automation-trigger-persistent_notification")],v),e()}catch(c){e(c)}})},38333:function(t,e,i){i(89463),i(74423),i(18111),i(20116),i(7588),i(61701),i(13579),i(3362),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698),i(62953);var a=i(40445),s=i(5124),o=i(67576),r=i(22786),n=i(1087),l=(i(9503),i(11399),i(8034),i(95350)),d=i(88555),h=i(3496),c=i(36918);let g,u,p,v,m,_,b,y,f,C,$=t=>t;const w=t=>t.selector&&!t.required&&!("boolean"in t.selector&&t.default),M=["trigger","target","alias","note","id","variables","enabled","options"];class A extends s.WF{static get defaultConfig(){return{trigger:""}}willUpdate(t){var e,i,a;if(super.willUpdate(t),this.hasUpdated||(this.hass.loadBackendTranslation("triggers"),this.hass.loadBackendTranslation("selector")),!t.has("trigger"))return;let s;for(const n in this.trigger)M.includes(n)||(void 0===s?s=Object.assign(Object.assign({},this.trigger),{},{options:{[n]:this.trigger[n]}}):s.options[n]=this.trigger[n],delete s[n]);void 0!==s&&((0,n.r)(this,"value-changed",{value:s}),this.trigger=s);const o=t.get("trigger");if(null!==(e=this.trigger)&&void 0!==e&&e.trigger){const t=(0,h.zz)(this.trigger.trigger);t!==(0,h.zz)((null==o?void 0:o.trigger)||"")&&this._fetchManifest(t)}else this._manifest=void 0;if(this.trigger&&(null==o?void 0:o.trigger)!==this.trigger.trigger&&null!==(i=this.description)&&void 0!==i&&i.fields){const t="options"in this.trigger,e=this.trigger.options?Object.assign({},this.trigger.options):{},i=!t;let a=!1;Object.entries(this.description.fields).forEach(([t,s])=>{var o,r;s.selector&&s.required&&void 0===s.default&&"boolean"in s.selector&&void 0===e[t]?(a=!0,e[t]=!1):i&&s.selector&&void 0!==s.default&&void 0===e[t]&&(!(s.selector&&"automation_behavior"in s.selector&&null!==(o=this.description)&&void 0!==o&&o.target)||null!==(r=this.trigger)&&void 0!==r&&r.target)&&(a=!0,e[t]=s.default)}),t&&!a||(0,n.r)(this,"value-changed",{value:Object.assign(Object.assign({},this.trigger),{},{options:e})})}var r;(null==o?void 0:o.target)!==(null===(a=this.trigger)||void 0===a?void 0:a.target)&&this._updateResolvedTargetEntityCount(null===(r=this.trigger)||void 0===r?void 0:r.target)}render(){var t,e;const i=(0,h.zz)(this.trigger.trigger),a=(0,h.hN)(this.trigger.trigger),o=this.hass.localize(`component.${i}.triggers.${a}.description`),r=this.description,n=!(null!=r&&r.fields),l=Boolean((null==r?void 0:r.fields)&&Object.values(r.fields).some(t=>w(t)));return(0,s.qy)(g||(g=$` <div class="description"> ${0} ${0} </div> ${0} ${0} `),o?(0,s.qy)(u||(u=$`<p>${0}</p>`),o):s.s6,this._manifest?(0,s.qy)(p||(p=$`<a href="${0}" title="${0}" target="_blank" rel="noreferrer"> <ha-icon-button .path="${0}" class="help-icon"></ha-icon-button> </a>`),this._manifest.is_built_in?(0,c.o)(this.hass,`/integrations/${this._manifest.domain}`):this._manifest.documentation,this.hass.localize("ui.components.service-control.integration_doc"),"M11,18H13V16H11V18M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,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,6A4,4 0 0,0 8,10H10A2,2 0 0,1 12,8A2,2 0 0,1 14,10C14,12 11,11.75 11,15H13C13,12.75 16,12.5 16,10A4,4 0 0,0 12,6Z"):s.s6,r&&"target"in r?(0,s.qy)(v||(v=$`<ha-settings-row narrow> <span slot="heading">${0}</span><ha-selector .hass="${0}" .selector="${0}" .disabled="${0}" @value-changed="${0}" .value="${0}"></ha-selector></ha-settings-row>`),this.hass.localize("ui.components.service-control.target"),this.hass,this._targetSelector(r.target),this.disabled,this._targetChanged,null===(t=this.trigger)||void 0===t?void 0:t.target):s.s6,n?(0,s.qy)(m||(m=$`<ha-yaml-editor .label="${0}" .name="${0}" .readOnly="${0}" .defaultValue="${0}" @value-changed="${0}"></ha-yaml-editor>`),this.hass.localize("ui.components.service-control.action_data"),"data",this.disabled,null===(e=this.trigger)||void 0===e?void 0:e.options,this._dataChanged):Object.entries(r.fields).map(([t,e])=>this._renderField(t,e,l,i,a)))}_generateContext(t){if(!t.context)return;const e={};for(const[s,o]of Object.entries(t.context)){var i,a;"target"===o&&null!==(i=this.description)&&void 0!==i&&i.target&&(e.target_selector=this._targetSelector(this.description.target)),e[s]="target"===o?this.trigger.target:null===(a=this.trigger.options)||void 0===a?void 0:a[o]}return e}_dataChanged(t){var e,i,a;if(t.stopPropagation(),!1===t.detail.isValid)return;const s=t.currentTarget.key,o=t.detail.value;if(!((null===(e=this.trigger)||void 0===e||null===(e=e.options)||void 0===e?void 0:e[s])!==o&&(null!==(i=this.trigger)&&void 0!==i&&i.options&&s in this.trigger.options||""!==o&&void 0!==o)))return;const r=Object.assign(Object.assign({},null===(a=this.trigger)||void 0===a?void 0:a.options),{},{[s]:o});(""===o||void 0===o||"object"==typeof o&&!Object.keys(o).length)&&delete r[s],(0,n.r)(this,"value-changed",{value:Object.assign(Object.assign({},this.trigger),{},{options:r})})}_targetChanged(t){t.stopPropagation(),(0,n.r)(this,"value-changed",{value:Object.assign(Object.assign({},this.trigger),{},{target:t.detail.value})})}_toggleCheckbox(t){var e;const i=null===(e=t.currentTarget)||void 0===e||null===(e=e.parentElement)||void 0===e?void 0:e.querySelector("ha-checkbox");null==i||i.click()}_checkboxChanged(t){const e=t.currentTarget.checked,i=t.currentTarget.key;let a;if(e){var s;this._checkedKeys.add(i);const t=this.description&&(null===(s=Object.entries(this.description).find(([t,e])=>t===i))||void 0===s?void 0:s[1]);let e=null==t?void 0:t.default;var o,r;if(null==e&&null!=t&&t.selector&&"constant"in t.selector)e=null===(o=t.selector.constant)||void 0===o?void 0:o.value;if(null==e&&null!=t&&t.selector&&"boolean"in t.selector&&(e=!1),null!=e)a=Object.assign(Object.assign({},null===(r=this.trigger)||void 0===r?void 0:r.options),{},{[i]:e})}else{var l;this._checkedKeys.delete(i),a=Object.assign({},null===(l=this.trigger)||void 0===l?void 0:l.options),delete a[i]}a&&(0,n.r)(this,"value-changed",{value:Object.assign(Object.assign({},this.trigger),{},{options:a})}),this.requestUpdate("_checkedKeys")}async _fetchManifest(t){this._manifest=void 0;try{this._manifest=await(0,l.QC)(this.hass,t)}catch(e){console.log(`Unable to fetch integration manifest for ${t}`)}}_updateResolvedTargetEntityCount(t){var e,i,a;this._resolvedTargetEntityCount=(0,d.aW)(t);const s=Object.entries(null!==(e=null===(i=this.description)||void 0===i?void 0:i.fields)&&void 0!==e?e:{}).find(([,t])=>t.selector&&"automation_behavior"in t.selector);if(!s)return;const[o,r]=s;if(t&&this._resolvedTargetEntityCount>1&&void 0===(null===(a=this.trigger.options)||void 0===a?void 0:a[o])){const t=r.default;void 0!==t&&(0,n.r)(this,"value-changed",{value:Object.assign(Object.assign({},this.trigger),{},{options:Object.assign(Object.assign({},this.trigger.options),{},{[o]:t})})})}}constructor(...t){super(...t),this.disabled=!1,this._checkedKeys=new Set,this._targetSelector=(0,r.A)(t=>t?{target:Object.assign({},t)}:{target:{}}),this._renderField=(t,e,i,a,o)=>{var r,n,l,d,h,c;const g=null!==(r=null==e?void 0:e.selector)&&void 0!==r?r:{text:null},u=w(e);if(!e.selector)return s.s6;if("automation_behavior"in g&&null!==(n=this.description)&&void 0!==n&&n.target&&(null===(l=this.trigger)||void 0===l||!l.target||void 0!==this._resolvedTargetEntityCount&&this._resolvedTargetEntityCount<=1))return s.s6;const p=this.hass.localize(`component.${a}.triggers.${o}.fields.${t}.description`);return(0,s.qy)(_||(_=$`<ha-settings-row narrow> ${0} <span slot="heading" class="${0}" @click="${0}">${0}</span> ${0} <ha-selector .disabled="${0}" .hass="${0}" .selector="${0}" .context="${0}" .key="${0}" @value-changed="${0}" .value="${0}" .placeholder="${0}" .localizeValue="${0}" .required="${0}"></ha-selector> </ha-settings-row>`),u?(0,s.qy)(y||(y=$`<ha-checkbox .key="${0}" .checked="${0}" .disabled="${0}" @change="${0}" slot="prefix"></ha-checkbox>`),t,this._checkedKeys.has(t)||(null===(d=this.trigger)||void 0===d?void 0:d.options)&&void 0!==this.trigger.options[t],this.disabled,this._checkboxChanged):i?(0,s.qy)(b||(b=$`<div slot="prefix" class="checkbox-spacer"></div>`)):s.s6,u?"clickable":"",u?this._toggleCheckbox:void 0,this.hass.localize(`component.${a}.triggers.${o}.fields.${t}.name`)||t,p?(0,s.qy)(f||(f=$`<span class="${0}" @click="${0}" slot="description">${0}</span>`),u?"clickable":"",u?this._toggleCheckbox:void 0,p):s.s6,this.disabled||u&&!this._checkedKeys.has(t)&&(!(null!==(h=this.trigger)&&void 0!==h&&h.options)||void 0===this.trigger.options[t]),this.hass,g,this._generateContext(e),t,this._dataChanged,null!==(c=this.trigger)&&void 0!==c&&c.options?this.trigger.options[t]:void 0,e.default,this._localizeValueCallback,e.required)},this._localizeValueCallback=t=>{var e;return null!==(e=this.trigger)&&void 0!==e&&e.trigger?this.hass.localize(`component.${(0,h.zz)(this.trigger.trigger)}.selector.${t}`):""}}}A.styles=(0,s.AH)(C||(C=$`:host{display:block;margin:0px calc(-1 * var(--ha-space-4))}ha-settings-row{padding:0 var(--ha-space-4)}ha-settings-row[narrow]{padding-bottom:var(--ha-space-2)}ha-settings-row{--settings-row-content-width:100%;--settings-row-prefix-display:contents;border-top:var(--service-control-items-border-top,1px solid var(--divider-color))}ha-entity-picker,ha-service-picker,ha-yaml-editor{display:block;margin:0 var(--ha-space-4)}ha-yaml-editor{padding:var(--ha-space-4) 0}p{margin:0 var(--ha-space-4);padding:var(--ha-space-4) 0}:host([hide-picker]) p{padding-top:0}.checkbox-spacer{width:32px}.help-icon{color:var(--secondary-text-color)}.description{justify-content:space-between;display:flex;align-items:center;padding-right:2px;padding-inline-end:2px;padding-inline-start:initial}.description p{direction:ltr}.clickable{cursor:pointer}`)),(0,a.Cg)([(0,o.MZ)({attribute:!1})],A.prototype,"hass",void 0),(0,a.Cg)([(0,o.MZ)({attribute:!1})],A.prototype,"trigger",void 0),(0,a.Cg)([(0,o.MZ)({attribute:!1})],A.prototype,"description",void 0),(0,a.Cg)([(0,o.MZ)({type:Boolean})],A.prototype,"disabled",void 0),(0,a.Cg)([(0,o.wk)()],A.prototype,"_checkedKeys",void 0),(0,a.Cg)([(0,o.wk)()],A.prototype,"_manifest",void 0),(0,a.Cg)([(0,o.wk)()],A.prototype,"_resolvedTargetEntityCount",void 0),A=(0,a.Cg)([(0,o.EM)("ha-automation-trigger-platform")],A)},22629:function(t,e,i){i.a(t,async function(t,e){try{i(16280),i(74423),i(18111),i(7588),i(62953);var a=i(40445),s=i(5124),o=i(67576),r=i(22786),n=i(63533),l=i(44537),d=i(57673),h=i(1087),c=i(24790),g=i(89849),u=i(52763),p=i(67442),v=t([u]);u=(v.then?(await v)():v)[0];let m,_,b=t=>t;const y=(0,n.kp)(p.V,(0,n.Ik)({alias:(0,n.lq)((0,n.Yj)()),trigger:(0,n.eu)("state"),entity_id:(0,n.lq)((0,n.KC)([(0,n.Yj)(),(0,n.YO)((0,n.Yj)())])),attribute:(0,n.lq)((0,n.Yj)()),from:(0,n.lq)((0,n.KC)([(0,n.me)((0,n.Yj)()),(0,n.YO)((0,n.Yj)())])),to:(0,n.lq)((0,n.KC)([(0,n.me)((0,n.Yj)()),(0,n.YO)((0,n.Yj)())])),for:(0,n.lq)((0,n.KC)([(0,n.ai)(),(0,n.Yj)(),p.b]))}));class f extends s.WF{static get defaultConfig(){return{trigger:"state",entity_id:[]}}shouldUpdate(t){if(!t.has("trigger"))return!0;if(this.trigger.for&&"object"==typeof this.trigger.for&&0===this.trigger.for.milliseconds&&delete this.trigger.for.milliseconds,this.trigger&&(0,c.r)(this.trigger))return(0,h.r)(this,"ui-mode-not-available",Error(this.hass.localize("ui.errors.config.no_template_editor_support"))),!1;try{(0,n.vA)(this.trigger,y)}catch(e){return(0,h.r)(this,"ui-mode-not-available",e),!1}return!0}render(){const t=(0,d.z)(this.trigger.for),e=Object.assign(Object.assign({},this.trigger),{},{entity_id:(0,l.e)(this.trigger.entity_id),for:t});e.to=this._normalizeStates(this.trigger.to,e.attribute),e.from=this._normalizeStates(this.trigger.from,e.attribute);const i=this._schema(this.hass.localize,this.trigger.attribute,e.to,e.from);return(0,s.qy)(m||(m=b` <ha-form .hass="${0}" .data="${0}" .schema="${0}" @value-changed="${0}" .computeLabel="${0}" .disabled="${0}"></ha-form> `),this.hass,e,i,this._valueChanged,this._computeLabelCallback,this.disabled)}_valueChanged(t){t.stopPropagation();const e=t.detail.value;e.to=this._applyAnyStateExclusive(e.to,e.attribute),Array.isArray(e.to)&&0===e.to.length&&delete e.to,e.from=this._applyAnyStateExclusive(e.from,e.attribute),Array.isArray(e.from)&&0===e.from.length&&delete e.from,Object.keys(e).forEach(t=>{const i=e[t];void 0!==i&&""!==i||delete e[t]}),(0,h.r)(this,"value-changed",{value:e})}_applyAnyStateExclusive(t,e){return(Array.isArray(t)?t.includes(g.x):t===g.x)?e?void 0:null:t}_normalizeStates(t,e){return e||null!==t?null==t?[]:(0,l.e)(t):[g.x]}constructor(...t){super(...t),this.disabled=!1,this._schema=(0,r.A)((t,e,i,a)=>[{name:"entity_id",required:!0,selector:{entity:{multiple:!0}}},{name:"attribute",context:{filter_entity:"entity_id"},selector:{attribute:{hide_attributes:["access_token","available_modes","code_arm_required","code_format","color_modes","device_class","editable","effect_list","entity_id","entity_picture","event_types","fan_modes","fan_speed_list","friendly_name","frontend_stream_type","has_date","has_time","hvac_modes","icon","id","max_color_temp_kelvin","max_mireds","max_temp","max","min_color_temp_kelvin","min_mireds","min_temp","min","mode","operation_list","options","percentage_step","precipitation_unit","preset_modes","pressure_unit","sound_mode_list","source_list","state_class","step","supported_color_modes","supported_features","swing_modes","target_temp_step","temperature_unit","token","unit_of_measurement","visibility_unit","wind_speed_unit"]}}},{name:"from",context:{filter_entity:"entity_id"},selector:{state:{multiple:!0,extra_options:e?[]:[{label:t("ui.panel.config.automation.editor.triggers.type.state.any_state_ignore_attributes"),value:g.x}],attribute:e,hide_states:i}}},{name:"to",context:{filter_entity:"entity_id"},selector:{state:{multiple:!0,extra_options:e?[]:[{label:t("ui.panel.config.automation.editor.triggers.type.state.any_state_ignore_attributes"),value:g.x}],attribute:e,hide_states:a}}},{name:"for",selector:{duration:{}}}]),this._computeLabelCallback=t=>this.hass.localize("entity_id"===t.name?"ui.components.entity.entity-picker.entity":`ui.panel.config.automation.editor.triggers.type.state.${t.name}`)}}f.styles=(0,s.AH)(_||(_=b`:host{display:block;margin-bottom:var(--ha-space-3)}`)),(0,a.Cg)([(0,o.MZ)({attribute:!1})],f.prototype,"hass",void 0),(0,a.Cg)([(0,o.MZ)({attribute:!1})],f.prototype,"trigger",void 0),(0,a.Cg)([(0,o.MZ)({type:Boolean})],f.prototype,"disabled",void 0),f=(0,a.Cg)([(0,o.EM)("ha-automation-trigger-state")],f),e()}catch(m){e(m)}})},38650:function(t,e,i){i.a(t,async function(t,e){try{i(62953);var a=i(40445),s=i(5124),o=i(67576),r=i(22786),n=i(1087),l=i(52763),d=t([l]);l=(d.then?(await d)():d)[0];let h,c=t=>t;class g extends s.WF{static get defaultConfig(){return{trigger:"sun",event:"sunrise",offset:0}}render(){const t=this._schema(this.hass.localize);return(0,s.qy)(h||(h=c` <ha-form .schema="${0}" .data="${0}" .hass="${0}" .disabled="${0}" .computeLabel="${0}" @value-changed="${0}"></ha-form> `),t,this.trigger,this.hass,this.disabled,this._computeLabelCallback,this._valueChanged)}_valueChanged(t){t.stopPropagation();const e=t.detail.value;(0,n.r)(this,"value-changed",{value:e})}constructor(...t){super(...t),this.disabled=!1,this._schema=(0,r.A)(t=>[{name:"event",type:"select",required:!0,options:[["sunrise",t("ui.panel.config.automation.editor.triggers.type.sun.sunrise")],["sunset",t("ui.panel.config.automation.editor.triggers.type.sun.sunset")]]},{name:"offset",selector:{text:{}}}]),this._computeLabelCallback=t=>this.hass.localize(`ui.panel.config.automation.editor.triggers.type.sun.${t.name}`)}}(0,a.Cg)([(0,o.MZ)({attribute:!1})],g.prototype,"hass",void 0),(0,a.Cg)([(0,o.MZ)({attribute:!1})],g.prototype,"trigger",void 0),(0,a.Cg)([(0,o.MZ)({type:Boolean})],g.prototype,"disabled",void 0),g=(0,a.Cg)([(0,o.EM)("ha-automation-trigger-sun")],g),e()}catch(h){e(h)}})},5816:function(t,e,i){i.a(t,async function(t,e){try{i(26910),i(18111),i(61701),i(3362),i(62953);var a=i(40445),s=i(5124),o=i(67576),r=i(1087),n=i(52220),l=i(606),d=i(79276),h=t([l]);l=(h.then?(await h)():h)[0];let c,g,u=t=>t;class p extends s.WF{static get defaultConfig(){return{trigger:"tag",tag_id:""}}firstUpdated(t){super.firstUpdated(t),this._fetchTags()}render(){return this._tags?(0,s.qy)(c||(c=u` <ha-select .label="${0}" .disabled="${0}" .value="${0}" @selected="${0}" .options="${0}"> </ha-select> `),this.hass.localize("ui.panel.config.automation.editor.triggers.type.tag.label"),this.disabled||0===this._tags.length,this.trigger.tag_id,this._tagChanged,this._tags.map(t=>({value:t.id,label:t.name||t.id}))):s.s6}async _fetchTags(){this._tags=(await(0,d.un)(this.hass)).sort((t,e)=>(0,n.SH)(t.name||t.id,e.name||e.id,this.hass.locale.language))}_tagChanged(t){t.detail.value&&this._tags&&this.trigger.tag_id!==t.detail.value&&(0,r.r)(this,"value-changed",{value:Object.assign(Object.assign({},this.trigger),{},{tag_id:t.detail.value})})}constructor(...t){super(...t),this.disabled=!1}}p.styles=(0,s.AH)(g||(g=u`ha-select{display:block}`)),(0,a.Cg)([(0,o.MZ)({attribute:!1})],p.prototype,"hass",void 0),(0,a.Cg)([(0,o.MZ)({attribute:!1})],p.prototype,"trigger",void 0),(0,a.Cg)([(0,o.MZ)({type:Boolean})],p.prototype,"disabled",void 0),(0,a.Cg)([(0,o.wk)()],p.prototype,"_tags",void 0),p=(0,a.Cg)([(0,o.EM)("ha-automation-trigger-tag")],p),e()}catch(c){e(c)}})},20616:function(t,e,i){i.a(t,async function(t,e){try{i(16280),i(18111),i(81148),i(62953);var a=i(40445),s=i(5124),o=i(67576),r=i(52763),n=i(57673),l=i(1087),d=i(24790),h=t([r]);r=(h.then?(await h)():h)[0];let c,g=t=>t;const u=[{name:"value_template",required:!0,selector:{template:{}}},{name:"for",selector:{duration:{}}}];class p extends s.WF{static get defaultConfig(){return{trigger:"template",value_template:""}}willUpdate(t){t.has("trigger")&&this.trigger&&(0,d.r)(this.trigger.for)&&(0,l.r)(this,"ui-mode-not-available",Error(this.hass.localize("ui.errors.config.no_template_editor_support")))}render(){const t=(0,n.z)(this.trigger.for),e=Object.assign(Object.assign({},this.trigger),{},{for:t});return(0,s.qy)(c||(c=g` <ha-form .hass="${0}" .data="${0}" .schema="${0}" @value-changed="${0}" .computeLabel="${0}" .disabled="${0}"></ha-form> `),this.hass,e,u,this._valueChanged,this._computeLabelCallback,this.disabled)}_valueChanged(t){t.stopPropagation();const e=t.detail.value;e.for&&Object.values(e.for).every(t=>0===t)&&delete e.for,(0,l.r)(this,"value-changed",{value:e})}constructor(...t){super(...t),this.disabled=!1,this._computeLabelCallback=t=>this.hass.localize(`ui.panel.config.automation.editor.triggers.type.template.${t.name}`)}}(0,a.Cg)([(0,o.MZ)({attribute:!1})],p.prototype,"hass",void 0),(0,a.Cg)([(0,o.MZ)({attribute:!1})],p.prototype,"trigger",void 0),(0,a.Cg)([(0,o.MZ)({type:Boolean})],p.prototype,"disabled",void 0),p=(0,a.Cg)([(0,o.EM)("ha-automation-trigger-template")],p),e()}catch(c){e(c)}})},40995:function(t,e,i){i.a(t,async function(t,e){try{i(16280),i(18107),i(74423),i(18111),i(61701),i(67357),i(62953);var a=i(40445),s=i(5124),o=i(67576),r=i(22786),n=i(380),l=i(1087),d=i(71727),h=i(52763),c=t([h,n]);[h,n]=c.then?(await c)():c;let g,u,p=t=>t;const v="time",m="entity",_=["sensor","input_datetime"],b=["sun","mon","tue","wed","thu","fri","sat"];class y extends s.WF{static get defaultConfig(){return{trigger:"time",at:""}}willUpdate(t){t.has("trigger")&&this.trigger&&Array.isArray(this.trigger.at)&&(0,l.r)(this,"ui-mode-not-available",Error(this.hass.localize("ui.errors.config.editor_not_supported")))}render(){const t=this.trigger.at;if(Array.isArray(t))return s.s6;const e=this._data(this._inputMode,t,this.trigger.weekday),i=this._schema(this.hass.localize,this.hass.locale,e.mode);return(0,s.qy)(g||(g=p` <ha-form .hass="${0}" .data="${0}" .schema="${0}" .disabled="${0}" @value-changed="${0}" .computeLabel="${0}"></ha-form> `),this.hass,e,i,this.disabled,this._valueChanged,this._computeLabelCallback)}_valueChanged(t){t.stopPropagation();const e=Object.assign({},t.detail.value);this._inputMode=e.mode;const i=e.weekday;delete e.weekday,e.mode===v?(delete e.entity,delete e.offset):delete e.time;const a=Object.assign(Object.assign({},this.trigger),{},{at:e.offset?{entity_id:e.entity,offset:e.offset}:e.entity||e.time});i&&i.length>0?a.weekday=i:delete a.weekday,(0,l.r)(this,"value-changed",{value:a})}constructor(...t){super(...t),this.disabled=!1,this._schema=(0,r.A)((t,e,i)=>{const a=(0,n.P)(e),s=b.slice(a,b.length).concat(b.slice(0,a));return[{name:"mode",type:"select",required:!0,options:[[v,t("ui.panel.config.automation.editor.triggers.type.time.type_value")],[m,t("ui.panel.config.automation.editor.triggers.type.time.type_input")]]},...i===v?[{name:"time",selector:{time:{}}}]:[{name:"entity",selector:{entity:{filter:[{domain:"input_datetime"},{domain:"sensor",device_class:"timestamp"}]}}},{name:"offset",selector:{text:{}}}],{type:"multi_select",name:"weekday",options:s.map(e=>[e,t(`ui.panel.config.automation.editor.triggers.type.time.weekdays.${e}`)])}]}),this._data=(0,r.A)((t,e,i)=>{const a="object"==typeof e?e.entity_id:e&&_.includes((0,d.m)(e))?e:void 0,s=a?void 0:e,o="object"==typeof e?e.offset:void 0;return{mode:null!=t?t:a?m:v,entity:a,time:s,offset:o,weekday:i}}),this._computeLabelCallback=t=>{switch(t.name){case"time":return this.hass.localize("ui.panel.config.automation.editor.triggers.type.time.at");case"weekday":return this.hass.localize("ui.panel.config.automation.editor.triggers.type.time.weekday")}return this.hass.localize(`ui.panel.config.automation.editor.triggers.type.time.${t.name}`)}}}y.styles=(0,s.AH)(u||(u=p`:host{display:block;margin-bottom:var(--ha-space-3)}`)),(0,a.Cg)([(0,o.MZ)({attribute:!1})],y.prototype,"hass",void 0),(0,a.Cg)([(0,o.MZ)({attribute:!1})],y.prototype,"trigger",void 0),(0,a.Cg)([(0,o.MZ)({type:Boolean})],y.prototype,"disabled",void 0),(0,a.Cg)([(0,o.wk)()],y.prototype,"_inputMode",void 0),y=(0,a.Cg)([(0,o.EM)("ha-automation-trigger-time")],y),e()}catch(g){e(g)}})},20790:function(t,e,i){i.a(t,async function(t,e){try{i(62953);var a=i(40445),s=i(5124),o=i(67576),r=i(1087),n=i(52763),l=t([n]);n=(l.then?(await l)():l)[0];let d,h=t=>t;const c=[{name:"hours",selector:{text:{}}},{name:"minutes",selector:{text:{}}},{name:"seconds",selector:{text:{}}}];class g extends s.WF{static get defaultConfig(){return{trigger:"time_pattern"}}render(){return(0,s.qy)(d||(d=h` <ha-form .hass="${0}" .schema="${0}" .data="${0}" .disabled="${0}" .computeLabel="${0}" .computeHelper="${0}" @value-changed="${0}"></ha-form> `),this.hass,c,this.trigger,this.disabled,this._computeLabelCallback,this._computeHelperCallback,this._valueChanged)}_valueChanged(t){t.stopPropagation();const e=t.detail.value;(0,r.r)(this,"value-changed",{value:e})}constructor(...t){super(...t),this.disabled=!1,this._computeLabelCallback=t=>this.hass.localize(`ui.panel.config.automation.editor.triggers.type.time_pattern.${t.name}`),this._computeHelperCallback=t=>this.hass.localize("ui.panel.config.automation.editor.triggers.type.time_pattern.help")}}(0,a.Cg)([(0,o.MZ)({attribute:!1})],g.prototype,"hass",void 0),(0,a.Cg)([(0,o.MZ)({attribute:!1})],g.prototype,"trigger",void 0),(0,a.Cg)([(0,o.MZ)({type:Boolean})],g.prototype,"disabled",void 0),g=(0,a.Cg)([(0,o.EM)("ha-automation-trigger-time_pattern")],g),e()}catch(d){e(d)}})},33461:function(t,e,i){i.a(t,async function(t,e){try{i(74423),i(44114),i(54743),i(11745),i(16573),i(78100),i(77936),i(3362),i(27495),i(25440),i(21489),i(48140),i(75044),i(21903),i(91134),i(28845),i(373),i(37467),i(44732),i(79577),i(16632),i(34226),i(9486),i(20456),i(62953),i(55815),i(64979),i(79739);var a=i(40445),s=(i(68825),i(5124)),o=i(67576),r=i(1087),n=i(80880),l=i(63130),d=i(29823),h=(i(70947),i(26300)),c=i(91485),g=i(49053),u=i(71562),p=t([d,h,c,u]);[d,h,c,u]=p.then?(await p)():p;let v,m,_,b,y=t=>t;const f="M12,15.5A3.5,3.5 0 0,1 8.5,12A3.5,3.5 0 0,1 12,8.5A3.5,3.5 0 0,1 15.5,12A3.5,3.5 0 0,1 12,15.5M19.43,12.97C19.47,12.65 19.5,12.33 19.5,12C19.5,11.67 19.47,11.34 19.43,11L21.54,9.37C21.73,9.22 21.78,8.95 21.66,8.73L19.66,5.27C19.54,5.05 19.27,4.96 19.05,5.05L16.56,6.05C16.04,5.66 15.5,5.32 14.87,5.07L14.5,2.42C14.46,2.18 14.25,2 14,2H10C9.75,2 9.54,2.18 9.5,2.42L9.13,5.07C8.5,5.32 7.96,5.66 7.44,6.05L4.95,5.05C4.73,4.96 4.46,5.05 4.34,5.27L2.34,8.73C2.21,8.95 2.27,9.22 2.46,9.37L4.57,11C4.53,11.34 4.5,11.67 4.5,12C4.5,12.33 4.53,12.65 4.57,12.97L2.46,14.63C2.27,14.78 2.21,15.05 2.34,15.27L4.34,18.73C4.46,18.95 4.73,19.03 4.95,18.95L7.44,17.94C7.96,18.34 8.5,18.68 9.13,18.93L9.5,21.58C9.54,21.82 9.75,22 10,22H14C14.25,22 14.46,21.82 14.5,21.58L14.87,18.93C15.5,18.67 16.04,18.34 16.56,17.94L19.05,18.95C19.27,19.03 19.54,18.95 19.66,18.73L21.66,15.27C21.78,15.05 21.73,14.78 21.54,14.63L19.43,12.97Z",C="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z",$=["GET","HEAD","POST","PUT"],w=["POST","PUT"],M="";class A extends s.WF{static get defaultConfig(){return{trigger:"webhook",allowed_methods:[...w],local_only:!0,webhook_id:M}}connectedCallback(){super.connectedCallback();const t={callback:t=>{this._config=t}};(0,r.r)(this,"subscribe-automation-config",t),this._unsub=t.unsub}disconnectedCallback(){super.disconnectedCallback(),this._unsub&&this._unsub()}_generateWebhookId(){var t;const e=crypto.getRandomValues(new Uint8Array(18)),i=btoa(String.fromCharCode(...e)).replace(/\+/g,"-").replace(/\//g,"_");return`${(0,n.Y)((null===(t=this._config)||void 0===t?void 0:t.alias)||"","-")}-${i}`}willUpdate(t){super.willUpdate(t),t.has("trigger")&&(void 0===this.trigger.allowed_methods&&(this.trigger.allowed_methods=[...w]),void 0===this.trigger.local_only&&(this.trigger.local_only=!0),this.trigger.webhook_id===M&&(this.trigger.webhook_id=this._generateWebhookId()))}render(){const{allowed_methods:t,local_only:e,webhook_id:i}=this.trigger;return(0,s.qy)(v||(v=y` <div class="flex"> <ha-input name="webhook_id" .label="${0}" .hint="${0}" .disabled="${0}" .value="${0}" @input="${0}"> <ha-icon-button @click="${0}" slot="end" .label="${0}" .path="${0}"></ha-icon-button> </ha-input> <ha-dropdown @wa-select="${0}" placement="bottom-end" distance="-24"> <ha-icon-button slot="trigger" .label="${0}" .path="${0}"></ha-icon-button> ${0} ${0} <ha-dropdown-item type="checkbox" .checked="${0}" value="local_only"> ${0} </ha-dropdown-item> </ha-dropdown> </div> `),this.hass.localize("ui.panel.config.automation.editor.triggers.type.webhook.webhook_id"),this.hass.localize("ui.panel.config.automation.editor.triggers.type.webhook.webhook_id_helper"),this.disabled,i||"",this._valueChanged,this._copyUrl,this.hass.localize("ui.panel.config.automation.editor.triggers.type.webhook.copy_url"),C,this._handleDropdownSelect,this.hass.localize("ui.panel.config.automation.editor.triggers.type.webhook.webhook_settings"),f,$.map(e=>(0,s.qy)(m||(m=y` <ha-dropdown-item .value="${0}" type="checkbox" @request-selected="${0}" .checked="${0}"> ${0} </ha-dropdown-item> `),e,this._allowedMethodsChanged,t.includes(e),e)),$.length?(0,s.qy)(_||(_=y`<wa-divider></wa-divider>`)):s.s6,e,this.hass.localize("ui.panel.config.automation.editor.triggers.type.webhook.local_only"))}_valueChanged(t){(0,u.P)(this,t)}_localOnlyChanged(t){if(this.trigger.local_only===t)return;const e=Object.assign(Object.assign({},this.trigger),{},{local_only:t});(0,r.r)(this,"value-changed",{value:e})}_allowedMethodsChanged(t,e){var i,a;if(e===(null===(i=this.trigger.allowed_methods)||void 0===i?void 0:i.includes(t)))return;const s=[...null!==(a=this.trigger.allowed_methods)&&void 0!==a?a:[]];e?s.push(t):s.splice(s.indexOf(t),1);const o=Object.assign(Object.assign({},this.trigger),{},{allowed_methods:s});(0,r.r)(this,"value-changed",{value:o})}async _copyUrl(t){const e=t.target.parentElement,i=this.hass.hassUrl(`/api/webhook/${e.value}`);await(0,l.l)(i),(0,g.c)(this,{message:this.hass.localize("ui.common.copied_clipboard")})}_handleDropdownSelect(t){var e;t.preventDefault();const i=null===(e=t.detail)||void 0===e||null===(e=e.item)||void 0===e?void 0:e.value;i&&("local_only"!==i?this._allowedMethodsChanged(t.detail.item.value,t.detail.item.checked):this._localOnlyChanged(t.detail.item.checked))}constructor(...t){super(...t),this.disabled=!1}}A.styles=(0,s.AH)(b||(b=y`.flex{display:flex}ha-input{flex:1}ha-input>ha-icon-button{--ha-icon-button-size:24px;--mdc-icon-size:18px;color:var(--secondary-text-color)}ha-dropdown ha-icon-button{padding-top:4px}`)),(0,a.Cg)([(0,o.MZ)({attribute:!1})],A.prototype,"hass",void 0),(0,a.Cg)([(0,o.MZ)({attribute:!1})],A.prototype,"trigger",void 0),(0,a.Cg)([(0,o.MZ)({type:Boolean})],A.prototype,"disabled",void 0),(0,a.Cg)([(0,o.wk)()],A.prototype,"_config",void 0),A=(0,a.Cg)([(0,o.EM)("ha-automation-trigger-webhook")],A),e()}catch(v){e(v)}})},88656:function(t,e,i){i.a(t,async function(t,e){try{i(62953);var a=i(40445),s=i(5124),o=i(67576),r=i(1087),n=i(69093),l=i(3471),d=i(82474),h=(i(64013),i(92677),t([d]));d=(h.then?(await h)():h)[0];let g,u,p=t=>t;function v(t){return(0,l.e)(t)&&"zone"!==(0,n.t)(t)}const m=["zone"];class _ extends s.WF{static get defaultConfig(){return{trigger:"zone",entity_id:"",zone:"",event:"enter"}}render(){const{entity_id:t,zone:e,event:i}=this.trigger;return(0,s.qy)(g||(g=p` <ha-entity-picker .label="${0}" .value="${0}" .disabled="${0}" @value-changed="${0}" .hass="${0}" .entityFilter="${0}"></ha-entity-picker> <ha-entity-picker .label="${0}" .value="${0}" .disabled="${0}" @value-changed="${0}" .hass="${0}" .includeDomains="${0}"></ha-entity-picker> <ha-radio-group orientation="horizontal" .label="${0}" .value="${0}" .disabled="${0}" @change="${0}" name="event"> <ha-radio-option value="enter"> ${0} </ha-radio-option> <ha-radio-option value="leave"> ${0} </ha-radio-option> </ha-radio-group> `),this.hass.localize("ui.panel.config.automation.editor.triggers.type.zone.entity"),t,this.disabled,this._entityPicked,this.hass,v,this.hass.localize("ui.panel.config.automation.editor.triggers.type.zone.zone"),e,this.disabled,this._zonePicked,this.hass,m,this.hass.localize("ui.panel.config.automation.editor.triggers.type.zone.event"),i,this.disabled,this._radioGroupPicked,this.hass.localize("ui.panel.config.automation.editor.triggers.type.zone.enter"),this.hass.localize("ui.panel.config.automation.editor.triggers.type.zone.leave"))}_entityPicked(t){t.stopPropagation(),(0,r.r)(this,"value-changed",{value:Object.assign(Object.assign({},this.trigger),{},{entity_id:t.detail.value})})}_zonePicked(t){t.stopPropagation(),(0,r.r)(this,"value-changed",{value:Object.assign(Object.assign({},this.trigger),{},{zone:t.detail.value})})}_radioGroupPicked(t){t.stopPropagation(),(0,r.r)(this,"value-changed",{value:Object.assign(Object.assign({},this.trigger),{},{event:t.currentTarget.value})})}constructor(...t){super(...t),this.disabled=!1}}_.styles=(0,s.AH)(u||(u=p`ha-entity-picker{display:block;margin-bottom:24px}`)),(0,a.Cg)([(0,o.MZ)({attribute:!1})],_.prototype,"hass",void 0),(0,a.Cg)([(0,o.MZ)({attribute:!1})],_.prototype,"trigger",void 0),(0,a.Cg)([(0,o.MZ)({type:Boolean})],_.prototype,"disabled",void 0),_=(0,a.Cg)([(0,o.EM)("ha-automation-trigger-zone")],_),e()}catch(c){e(c)}})}}]);