diff --git a/config/.HA_VERSION b/config/.HA_VERSION index 617bf7c1..6567f20f 100755 --- a/config/.HA_VERSION +++ b/config/.HA_VERSION @@ -1 +1 @@ -2023.6.2 \ No newline at end of file +2023.7.2 \ No newline at end of file diff --git a/config/automation/Speech/door_opened.yaml b/config/automation/Speech/door_opened.yaml index 07ec2f15..80b67103 100755 --- a/config/automation/Speech/door_opened.yaml +++ b/config/automation/Speech/door_opened.yaml @@ -11,6 +11,7 @@ - binary_sensor.MCU2_GPIO12 # Main Slider - binary_sensor.MCU1_GPIO12 # Interior Garage Door # from: 'off' + to: 'on' condition: - condition: state diff --git a/config/automation/medicine_logger.yaml b/config/automation/medicine_logger.yaml index 5841a8cc..44d1da28 100755 --- a/config/automation/medicine_logger.yaml +++ b/config/automation/medicine_logger.yaml @@ -30,7 +30,7 @@ - service: script.notify_engine data: title: 'Medicine Reminder Completed' - value1: 'Carlo Took Medicine today.' + value1: 'Carlo Took his Medicine today.' who: 'parents' apns_id: 'Medicine' - delay: diff --git a/config/group/media_players.yaml b/config/group/media_players.yaml index 2a921629..b929cda8 100755 --- a/config/group/media_players.yaml +++ b/config/group/media_players.yaml @@ -8,9 +8,10 @@ media_players: - media_player.living_room - media_player.front_room_flex - media_player.office - - media_player.kitchen_show + - media_player.kitchen - media_player.justin_room - media_player.tap - media_player.upstairs - media_player.stacey_bedroom - media_player.carlo_bedroom + - media_player.master_bathroom diff --git a/config/packages/conico.yaml b/config/packages/conico.yaml index d67e7c1f..7a4ebc7b 100755 --- a/config/packages/conico.yaml +++ b/config/packages/conico.yaml @@ -35,7 +35,14 @@ automation: - person.carlo - person.stacey from: 'not_home' - to: 'home' + to: 'home' + + - platform: state + entity_id: + - person.carlo + - person.stacey + to: 'not_home' + from: 'home' action: - choose: @@ -53,24 +60,26 @@ automation: media_content_id: 'hide garage camera' media_content_type: custom - - conditions: "{{ is_state('switch.kitchen_accent_1','on') }}" - sequence: - - service: media_player.play_media - data: - entity_id: media_player.alarm_panel_1 - media_content_id: 'show garage camera' - media_content_type: custom + # - conditions: "{{ is_state('switch.kitchen_accent_1','on') }}" + # sequence: + # - service: media_player.play_media + # data: + # entity_id: media_player.alarm_panel_1 + # media_content_id: 'show garage camera' + # media_content_type: custom default: - service: media_player.play_media + target: + entity_id: media_player.kitchen data: - entity_id: media_player.kitchen_show media_content_id: 'show garage camera' media_content_type: custom - delay: '00:20:00' - service: media_player.play_media + target: + entity_id: media_player.kitchen data: - entity_id: media_player.kitchen_show media_content_id: 'hide garage camera' media_content_type: custom diff --git a/config/packages/github.yaml b/config/packages/github.yaml index 353dfbac..e1eeca9e 100755 --- a/config/packages/github.yaml +++ b/config/packages/github.yaml @@ -54,6 +54,7 @@ automation: trigger: platform: webhook webhook_id: !secret github_webhook + local_only: false condition: diff --git a/config/packages/ios.yaml b/config/packages/ios.yaml index 435bad5c..72c52fd5 100755 --- a/config/packages/ios.yaml +++ b/config/packages/ios.yaml @@ -12,13 +12,12 @@ notify: - name: ios_family platform: group services: - - service: mobile_app_stacey_6s + - service: mobile_app_stacey_iphone11 - service: mobile_app_carlo_xsmax - - service: mobile_app_paige_6s - name: ios_parents platform: group services: - - service: mobile_app_stacey_6s + - service: mobile_app_stacey_iphone11 - service: mobile_app_carlo_xsmax mobile_app: diff --git a/config/packages/twitter.yaml b/config/packages/twitter.yaml index ba5a0a75..aff15da6 100755 --- a/config/packages/twitter.yaml +++ b/config/packages/twitter.yaml @@ -12,7 +12,6 @@ command_line: command: "find /config -name '*.yaml' | xargs cat | wc -l" scan_interval: 20000 -command_line: - sensor: name: 'GitHub Stats' unique_id: github_stats_command diff --git a/config/script/notify_engine.yaml b/config/script/notify_engine.yaml index accc2705..01ac9d49 100755 --- a/config/script/notify_engine.yaml +++ b/config/script/notify_engine.yaml @@ -32,7 +32,7 @@ notify_engine: - service: > {% if who == 'stacey' %} - notify.mobile_app_iphone + notify.mobile_app_stacey_iphone11 {% elif who == 'carlo' %} notify.mobile_app_carlo_xsmax {% elif who == 'parents' %} @@ -46,14 +46,16 @@ notify_engine: title: "{{ title }}" message: "{{ value1 }} {{ value2 }} {{ value3 }}" data: - attachment: - url: "{{ url }}" - content-type: "{{ content_type }}" - hide-thumbnail: false + # attachment: + # url: "{{ url }}" + # content-type: "{{ content_type }}" + # hide-thumbnail: false apns_headers: 'apns-collapse-id': "{{ apns_id }}" push: # sound: "{{ ios_sound }}" # badge: "{{ ios_badge }}" +# interruption-level: time-sensitive +# interruption-level: critical category: "{{ ios_category }}" entity_id: "{{ camera_entity }}" diff --git a/config/www/community/vacuum-card/vacuum-card.js b/config/www/community/vacuum-card/vacuum-card.js index 1e8ac308..deb2984b 100644 --- a/config/www/community/vacuum-card/vacuum-card.js +++ b/config/www/community/vacuum-card/vacuum-card.js @@ -1,4 +1,4 @@ -function t(t,e,a,o){var i,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,a):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,a,o);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(n=(r<3?i(n):r>3?i(e,a,n):i(e,a))||n);return r>3&&n&&Object.defineProperty(e,a,n),n}const e=window,a=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol(),i=new WeakMap;class r{constructor(t,e,a){if(this._$cssResult$=!0,a!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(a&&void 0===t){const a=void 0!==e&&1===e.length;a&&(t=i.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),a&&i.set(e,t))}return t}toString(){return this.cssText}}const n=(t,...e)=>{const a=1===t.length?t[0]:e.reduce(((e,a,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(a)+t[o+1]),t[0]);return new r(a,t,o)},s=a?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const a of t.cssRules)e+=a.cssText;return(t=>new r("string"==typeof t?t:t+"",void 0,o))(e)})(t):t;var l;const c=window,u=c.trustedTypes,_=u?u.emptyScript:"",d=c.reactiveElementPolyfillSupport,h={toAttribute(t,e){switch(e){case Boolean:t=t?_:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let a=t;switch(e){case Boolean:a=null!==t;break;case Number:a=null===t?null:Number(t);break;case Object:case Array:try{a=JSON.parse(t)}catch(t){a=null}}return a}},m=(t,e)=>e!==t&&(e==e||t==t),p={attribute:!0,type:String,converter:h,reflect:!1,hasChanged:m};class v extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,a)=>{const o=this._$Ep(a,e);void 0!==o&&(this._$Ev.set(o,a),t.push(o))})),t}static createProperty(t,e=p){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const a="symbol"==typeof t?Symbol():"__"+t,o=this.getPropertyDescriptor(t,a,e);void 0!==o&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,e,a){return{get(){return this[e]},set(o){const i=this[t];this[e]=o,this.requestUpdate(t,i,a)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||p}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const a of e)this.createProperty(a,t[a])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const a=new Set(t.flat(1/0).reverse());for(const t of a)e.unshift(s(t))}else void 0!==t&&e.push(s(t));return e}static _$Ep(t,e){const a=e.attribute;return!1===a?void 0:"string"==typeof a?a:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,a;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(a=t.hostConnected)||void 0===a||a.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const o=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,o)=>{a?t.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):o.forEach((a=>{const o=document.createElement("style"),i=e.litNonce;void 0!==i&&o.setAttribute("nonce",i),o.textContent=a.cssText,t.appendChild(o)}))})(o,this.constructor.elementStyles),o}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,a){this._$AK(t,a)}_$EO(t,e,a=p){var o;const i=this.constructor._$Ep(t,a);if(void 0!==i&&!0===a.reflect){const r=(void 0!==(null===(o=a.converter)||void 0===o?void 0:o.toAttribute)?a.converter:h).toAttribute(e,a.type);this._$El=t,null==r?this.removeAttribute(i):this.setAttribute(i,r),this._$El=null}}_$AK(t,e){var a;const o=this.constructor,i=o._$Ev.get(t);if(void 0!==i&&this._$El!==i){const t=o.getPropertyOptions(i),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(a=t.converter)||void 0===a?void 0:a.fromAttribute)?t.converter:h;this._$El=i,this[i]=r.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,a){let o=!0;void 0!==t&&(((a=a||this.constructor.getPropertyOptions(t)).hasChanged||m)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===a.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,a))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const a=this._$AL;try{e=this.shouldUpdate(a),e?(this.willUpdate(a),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(a)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(a)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}var g;v.finalized=!0,v.elementProperties=new Map,v.elementStyles=[],v.shadowRootOptions={mode:"open"},null==d||d({ReactiveElement:v}),(null!==(l=c.reactiveElementVersions)&&void 0!==l?l:c.reactiveElementVersions=[]).push("1.6.1");const f=window,b=f.trustedTypes,w=b?b.createPolicy("lit-html",{createHTML:t=>t}):void 0,y="$lit$",k=`lit$${(Math.random()+"").slice(9)}$`,$="?"+k,S=`<${$}>`,A=document,z=()=>A.createComment(""),j=t=>null===t||"object"!=typeof t&&"function"!=typeof t,C=Array.isArray,x="[ \t\n\f\r]",E=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,O=/-->/g,P=/>/g,V=RegExp(`>|${x}(?:([^\\s"'>=/]+)(${x}*=${x}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),M=/'/g,T=/"/g,N=/^(?:script|style|textarea|title)$/i,I=(t=>(e,...a)=>({_$litType$:t,strings:e,values:a}))(1),R=Symbol.for("lit-noChange"),H=Symbol.for("lit-nothing"),U=new WeakMap,D=A.createTreeWalker(A,129,null,!1),L=(t,e)=>{const a=t.length-1,o=[];let i,r=2===e?"":"",n=E;for(let e=0;e"===l[0]?(n=null!=i?i:E,c=-1):void 0===l[1]?c=-2:(c=n.lastIndex-l[2].length,s=l[1],n=void 0===l[3]?V:'"'===l[3]?T:M):n===T||n===M?n=V:n===O||n===P?n=E:(n=V,i=void 0);const _=n===V&&t[e+1].startsWith("/>")?" ":"";r+=n===E?a+S:c>=0?(o.push(s),a.slice(0,c)+y+a.slice(c)+k+_):a+k+(-2===c?(o.push(void 0),e):_)}const s=r+(t[a]||"")+(2===e?"":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==w?w.createHTML(s):s,o]};class B{constructor({strings:t,_$litType$:e},a){let o;this.parts=[];let i=0,r=0;const n=t.length-1,s=this.parts,[l,c]=L(t,e);if(this.el=B.createElement(l,a),D.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=D.nextNode())&&s.length0){o.textContent=b?b.emptyScript:"";for(let a=0;aC(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==H&&j(this._$AH)?this._$AA.nextSibling.data=t:this.$(A.createTextNode(t)),this._$AH=t}g(t){var e;const{values:a,_$litType$:o}=t,i="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=B.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===i)this._$AH.v(a);else{const t=new q(i,this),e=t.u(this.options);t.v(a),this.$(e),this._$AH=t}}_$AC(t){let e=U.get(t.strings);return void 0===e&&U.set(t.strings,e=new B(t)),e}T(t){C(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let a,o=0;for(const i of t)o===e.length?e.push(a=new K(this.k(z()),this.k(z()),this,this.options)):a=e[o],a._$AI(i),o++;o2||""!==a[0]||""!==a[1]?(this._$AH=Array(a.length-1).fill(new String),this.strings=a):this._$AH=H}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,a,o){const i=this.strings;let r=!1;if(void 0===i)t=Z(this,t,e,0),r=!j(t)||t!==this._$AH&&t!==R,r&&(this._$AH=t);else{const o=t;let n,s;for(t=i[0],n=0;n{var o,i;const r=null!==(o=null==a?void 0:a.renderBefore)&&void 0!==o?o:e;let n=r._$litPart$;if(void 0===n){const t=null!==(i=null==a?void 0:a.renderBefore)&&void 0!==i?i:null;r._$litPart$=n=new K(e.insertBefore(z(),t),t,void 0,null!=a?a:{})}return n._$AI(t),n})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return R}}at.finalized=!0,at._$litElement$=!0,null===(tt=globalThis.litElementHydrateSupport)||void 0===tt||tt.call(globalThis,{LitElement:at});const ot=globalThis.litElementPolyfillSupport;null==ot||ot({LitElement:at}),(null!==(et=globalThis.litElementVersions)&&void 0!==et?et:globalThis.litElementVersions=[]).push("3.3.2");const it=t=>e=>"function"==typeof e?((t,e)=>(customElements.define(t,e),e))(t,e):((t,e)=>{const{kind:a,elements:o}=e;return{kind:a,elements:o,finisher(e){customElements.define(t,e)}}})(t,e),rt=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(a){a.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(a){a.createProperty(e.key,t)}};function nt(t){return(e,a)=>void 0!==a?((t,e,a)=>{e.constructor.createProperty(a,t)})(t,e,a):rt(t,e)}function st(t){return nt({...t,state:!0})}var lt,ct,ut;null===(lt=window.HTMLSlotElement)||void 0===lt||lt.prototype.assignedElements,function(t){t.language="language",t.system="system",t.comma_decimal="comma_decimal",t.decimal_comma="decimal_comma",t.space_comma="space_comma",t.none="none"}(ct||(ct={})),function(t){t.language="language",t.system="system",t.am_pm="12",t.twenty_four="24"}(ut||(ut={}));var _t=function(t,e,a,o){o=o||{},a=null==a?{}:a;var i=new Event(e,{bubbles:void 0===o.bubbles||o.bubbles,cancelable:Boolean(o.cancelable),composed:void 0===o.composed||o.composed});return i.detail=a,t.dispatchEvent(i),i};function dt(t,e,a,o){var i,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,a):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,a,o);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(n=(r<3?i(n):r>3?i(e,a,n):i(e,a))||n);return r>3&&n&&Object.defineProperty(e,a,n),n}let ht=class extends at{constructor(){super(...arguments),this.template="",this.variables={},this.value=null,this.unsubscribePromise=null}connectedCallback(){super.connectedCallback(),this.hass?this.unsubscribePromise||this.template&&(this.unsubscribePromise=this.hass.connection.subscribeMessage((t=>{this.value=t.result}),{type:"render_template",template:this.template,variables:this.variables})):console.warn("hass object is not provided")}async disconnectedCallback(){if(super.disconnectedCallback(),this.unsubscribePromise)try{const t=await this.unsubscribePromise;return this.unsubscribePromise=null,t()}catch(t){if("not_found"!==t.code)throw t}}render(){var t;return null!==(t=this.value)&&void 0!==t?t:H}};dt([nt()],ht.prototype,"hass",void 0),dt([nt()],ht.prototype,"template",void 0),dt([nt()],ht.prototype,"variables",void 0),dt([nt()],ht.prototype,"value",void 0),dt([nt({attribute:!1})],ht.prototype,"unsubscribePromise",void 0),ht=dt([it("ha-template")],ht);var mt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function pt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var vt=Array.isArray,gt="object"==typeof mt&&mt&&mt.Object===Object&&mt,ft="object"==typeof self&&self&&self.Object===Object&&self,bt=gt||ft||Function("return this")(),wt=bt.Symbol,yt=wt,kt=Object.prototype,$t=kt.hasOwnProperty,St=kt.toString,At=yt?yt.toStringTag:void 0;var zt=function(t){var e=$t.call(t,At),a=t[At];try{t[At]=void 0;var o=!0}catch(t){}var i=St.call(t);return o&&(e?t[At]=a:delete t[At]),i},jt=Object.prototype.toString;var Ct=zt,xt=function(t){return jt.call(t)},Et=wt?wt.toStringTag:void 0;var Ot=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Et&&Et in Object(t)?Ct(t):xt(t)};var Pt=Ot,Vt=function(t){return null!=t&&"object"==typeof t};var Mt=function(t){return"symbol"==typeof t||Vt(t)&&"[object Symbol]"==Pt(t)},Tt=vt,Nt=Mt,It=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Rt=/^\w*$/;var Ht=function(t,e){if(Tt(t))return!1;var a=typeof t;return!("number"!=a&&"symbol"!=a&&"boolean"!=a&&null!=t&&!Nt(t))||(Rt.test(t)||!It.test(t)||null!=e&&t in Object(e))};var Ut=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},Dt=Ot,Lt=Ut;var Bt,Zt=function(t){if(!Lt(t))return!1;var e=Dt(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},qt=bt["__core-js_shared__"],Kt=(Bt=/[^.]+$/.exec(qt&&qt.keys&&qt.keys.IE_PROTO||""))?"Symbol(src)_1."+Bt:"";var Wt=function(t){return!!Kt&&Kt in t},Ft=Function.prototype.toString;var Gt=Zt,Jt=Wt,Xt=Ut,Yt=function(t){if(null!=t){try{return Ft.call(t)}catch(t){}try{return t+""}catch(t){}}return""},Qt=/^\[object .+?Constructor\]$/,te=Function.prototype,ee=Object.prototype,ae=te.toString,oe=ee.hasOwnProperty,ie=RegExp("^"+ae.call(oe).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var re=function(t){return!(!Xt(t)||Jt(t))&&(Gt(t)?ie:Qt).test(Yt(t))},ne=function(t,e){return null==t?void 0:t[e]};var se=function(t,e){var a=ne(t,e);return re(a)?a:void 0},le=se(Object,"create"),ce=le;var ue=function(){this.__data__=ce?ce(null):{},this.size=0};var _e=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},de=le,he=Object.prototype.hasOwnProperty;var me=function(t){var e=this.__data__;if(de){var a=e[t];return"__lodash_hash_undefined__"===a?void 0:a}return he.call(e,t)?e[t]:void 0},pe=le,ve=Object.prototype.hasOwnProperty;var ge=le;var fe=ue,be=_e,we=me,ye=function(t){var e=this.__data__;return pe?void 0!==e[t]:ve.call(e,t)},ke=function(t,e){var a=this.__data__;return this.size+=this.has(t)?0:1,a[t]=ge&&void 0===e?"__lodash_hash_undefined__":e,this};function $e(t){var e=-1,a=null==t?0:t.length;for(this.clear();++e-1},Ie=function(t,e){var a=this.__data__,o=Pe(a,t);return o<0?(++this.size,a.push([t,e])):a[o][1]=e,this};function Re(t){var e=-1,a=null==t?0:t.length;for(this.clear();++e=0;s--)(i=t[s])&&(n=(r<3?i(n):r>3?i(e,a,n):i(e,a))||n);return r>3&&n&&Object.defineProperty(e,a,n),n}const e=window,a=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol(),i=new WeakMap;class r{constructor(t,e,a){if(this._$cssResult$=!0,a!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(a&&void 0===t){const a=void 0!==e&&1===e.length;a&&(t=i.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),a&&i.set(e,t))}return t}toString(){return this.cssText}}const n=(t,...e)=>{const a=1===t.length?t[0]:e.reduce(((e,a,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(a)+t[o+1]),t[0]);return new r(a,t,o)},s=a?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const a of t.cssRules)e+=a.cssText;return(t=>new r("string"==typeof t?t:t+"",void 0,o))(e)})(t):t;var l;const c=window,u=c.trustedTypes,_=u?u.emptyScript:"",d=c.reactiveElementPolyfillSupport,h={toAttribute(t,e){switch(e){case Boolean:t=t?_:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let a=t;switch(e){case Boolean:a=null!==t;break;case Number:a=null===t?null:Number(t);break;case Object:case Array:try{a=JSON.parse(t)}catch(t){a=null}}return a}},m=(t,e)=>e!==t&&(e==e||t==t),p={attribute:!0,type:String,converter:h,reflect:!1,hasChanged:m};class v extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,a)=>{const o=this._$Ep(a,e);void 0!==o&&(this._$Ev.set(o,a),t.push(o))})),t}static createProperty(t,e=p){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const a="symbol"==typeof t?Symbol():"__"+t,o=this.getPropertyDescriptor(t,a,e);void 0!==o&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,e,a){return{get(){return this[e]},set(o){const i=this[t];this[e]=o,this.requestUpdate(t,i,a)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||p}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const a of e)this.createProperty(a,t[a])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const a=new Set(t.flat(1/0).reverse());for(const t of a)e.unshift(s(t))}else void 0!==t&&e.push(s(t));return e}static _$Ep(t,e){const a=e.attribute;return!1===a?void 0:"string"==typeof a?a:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,a;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(a=t.hostConnected)||void 0===a||a.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const o=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,o)=>{a?t.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):o.forEach((a=>{const o=document.createElement("style"),i=e.litNonce;void 0!==i&&o.setAttribute("nonce",i),o.textContent=a.cssText,t.appendChild(o)}))})(o,this.constructor.elementStyles),o}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,a){this._$AK(t,a)}_$EO(t,e,a=p){var o;const i=this.constructor._$Ep(t,a);if(void 0!==i&&!0===a.reflect){const r=(void 0!==(null===(o=a.converter)||void 0===o?void 0:o.toAttribute)?a.converter:h).toAttribute(e,a.type);this._$El=t,null==r?this.removeAttribute(i):this.setAttribute(i,r),this._$El=null}}_$AK(t,e){var a;const o=this.constructor,i=o._$Ev.get(t);if(void 0!==i&&this._$El!==i){const t=o.getPropertyOptions(i),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(a=t.converter)||void 0===a?void 0:a.fromAttribute)?t.converter:h;this._$El=i,this[i]=r.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,a){let o=!0;void 0!==t&&(((a=a||this.constructor.getPropertyOptions(t)).hasChanged||m)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===a.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,a))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const a=this._$AL;try{e=this.shouldUpdate(a),e?(this.willUpdate(a),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(a)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(a)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}var g;v.finalized=!0,v.elementProperties=new Map,v.elementStyles=[],v.shadowRootOptions={mode:"open"},null==d||d({ReactiveElement:v}),(null!==(l=c.reactiveElementVersions)&&void 0!==l?l:c.reactiveElementVersions=[]).push("1.6.1");const f=window,b=f.trustedTypes,w=b?b.createPolicy("lit-html",{createHTML:t=>t}):void 0,y="$lit$",k=`lit$${(Math.random()+"").slice(9)}$`,$="?"+k,S=`<${$}>`,A=document,z=()=>A.createComment(""),j=t=>null===t||"object"!=typeof t&&"function"!=typeof t,C=Array.isArray,x="[ \t\n\f\r]",E=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,O=/-->/g,P=/>/g,V=RegExp(`>|${x}(?:([^\\s"'>=/]+)(${x}*=${x}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),M=/'/g,T=/"/g,N=/^(?:script|style|textarea|title)$/i,I=(t=>(e,...a)=>({_$litType$:t,strings:e,values:a}))(1),R=Symbol.for("lit-noChange"),H=Symbol.for("lit-nothing"),U=new WeakMap,D=A.createTreeWalker(A,129,null,!1),L=(t,e)=>{const a=t.length-1,o=[];let i,r=2===e?"":"",n=E;for(let e=0;e"===l[0]?(n=null!=i?i:E,c=-1):void 0===l[1]?c=-2:(c=n.lastIndex-l[2].length,s=l[1],n=void 0===l[3]?V:'"'===l[3]?T:M):n===T||n===M?n=V:n===O||n===P?n=E:(n=V,i=void 0);const _=n===V&&t[e+1].startsWith("/>")?" ":"";r+=n===E?a+S:c>=0?(o.push(s),a.slice(0,c)+y+a.slice(c)+k+_):a+k+(-2===c?(o.push(void 0),e):_)}const s=r+(t[a]||"")+(2===e?"":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==w?w.createHTML(s):s,o]};class B{constructor({strings:t,_$litType$:e},a){let o;this.parts=[];let i=0,r=0;const n=t.length-1,s=this.parts,[l,c]=L(t,e);if(this.el=B.createElement(l,a),D.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=D.nextNode())&&s.length0){o.textContent=b?b.emptyScript:"";for(let a=0;aC(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==H&&j(this._$AH)?this._$AA.nextSibling.data=t:this.$(A.createTextNode(t)),this._$AH=t}g(t){var e;const{values:a,_$litType$:o}=t,i="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=B.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===i)this._$AH.v(a);else{const t=new q(i,this),e=t.u(this.options);t.v(a),this.$(e),this._$AH=t}}_$AC(t){let e=U.get(t.strings);return void 0===e&&U.set(t.strings,e=new B(t)),e}T(t){C(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let a,o=0;for(const i of t)o===e.length?e.push(a=new K(this.k(z()),this.k(z()),this,this.options)):a=e[o],a._$AI(i),o++;o2||""!==a[0]||""!==a[1]?(this._$AH=Array(a.length-1).fill(new String),this.strings=a):this._$AH=H}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,a,o){const i=this.strings;let r=!1;if(void 0===i)t=Z(this,t,e,0),r=!j(t)||t!==this._$AH&&t!==R,r&&(this._$AH=t);else{const o=t;let n,s;for(t=i[0],n=0;n{var o,i;const r=null!==(o=null==a?void 0:a.renderBefore)&&void 0!==o?o:e;let n=r._$litPart$;if(void 0===n){const t=null!==(i=null==a?void 0:a.renderBefore)&&void 0!==i?i:null;r._$litPart$=n=new K(e.insertBefore(z(),t),t,void 0,null!=a?a:{})}return n._$AI(t),n})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return R}}at.finalized=!0,at._$litElement$=!0,null===(tt=globalThis.litElementHydrateSupport)||void 0===tt||tt.call(globalThis,{LitElement:at});const ot=globalThis.litElementPolyfillSupport;null==ot||ot({LitElement:at}),(null!==(et=globalThis.litElementVersions)&&void 0!==et?et:globalThis.litElementVersions=[]).push("3.3.2");const it=t=>e=>"function"==typeof e?((t,e)=>(customElements.define(t,e),e))(t,e):((t,e)=>{const{kind:a,elements:o}=e;return{kind:a,elements:o,finisher(e){customElements.define(t,e)}}})(t,e),rt=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(a){a.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(a){a.createProperty(e.key,t)}};function nt(t){return(e,a)=>void 0!==a?((t,e,a)=>{e.constructor.createProperty(a,t)})(t,e,a):rt(t,e)}function st(t){return nt({...t,state:!0})}var lt,ct,ut;null===(lt=window.HTMLSlotElement)||void 0===lt||lt.prototype.assignedElements,function(t){t.language="language",t.system="system",t.comma_decimal="comma_decimal",t.decimal_comma="decimal_comma",t.space_comma="space_comma",t.none="none"}(ct||(ct={})),function(t){t.language="language",t.system="system",t.am_pm="12",t.twenty_four="24"}(ut||(ut={}));var _t=function(t,e,a,o){o=o||{},a=null==a?{}:a;var i=new Event(e,{bubbles:void 0===o.bubbles||o.bubbles,cancelable:Boolean(o.cancelable),composed:void 0===o.composed||o.composed});return i.detail=a,t.dispatchEvent(i),i};function dt(t,e,a,o){var i,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,a):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,a,o);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(n=(r<3?i(n):r>3?i(e,a,n):i(e,a))||n);return r>3&&n&&Object.defineProperty(e,a,n),n}class ht extends at{constructor(){super(...arguments),this.template="",this.variables={},this.value=null,this.unsubscribePromise=null}connectedCallback(){super.connectedCallback(),this.hass?this.unsubscribePromise||this.template&&(this.unsubscribePromise=this.hass.connection.subscribeMessage((t=>{this.value=t.result}),{type:"render_template",template:this.template,variables:this.variables})):console.warn("hass object is not provided")}async disconnectedCallback(){if(super.disconnectedCallback(),this.unsubscribePromise)try{const t=await this.unsubscribePromise;return this.unsubscribePromise=null,t()}catch(t){if("not_found"!==t.code)throw t}}render(){var t;return null!==(t=this.value)&&void 0!==t?t:H}}dt([nt()],ht.prototype,"hass",void 0),dt([nt()],ht.prototype,"template",void 0),dt([nt()],ht.prototype,"variables",void 0),dt([nt()],ht.prototype,"value",void 0),dt([st()],ht.prototype,"unsubscribePromise",void 0);var mt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function pt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var vt=Array.isArray,gt="object"==typeof mt&&mt&&mt.Object===Object&&mt,ft="object"==typeof self&&self&&self.Object===Object&&self,bt=gt||ft||Function("return this")(),wt=bt.Symbol,yt=wt,kt=Object.prototype,$t=kt.hasOwnProperty,St=kt.toString,At=yt?yt.toStringTag:void 0;var zt=function(t){var e=$t.call(t,At),a=t[At];try{t[At]=void 0;var o=!0}catch(t){}var i=St.call(t);return o&&(e?t[At]=a:delete t[At]),i},jt=Object.prototype.toString;var Ct=zt,xt=function(t){return jt.call(t)},Et=wt?wt.toStringTag:void 0;var Ot=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Et&&Et in Object(t)?Ct(t):xt(t)};var Pt=Ot,Vt=function(t){return null!=t&&"object"==typeof t};var Mt=function(t){return"symbol"==typeof t||Vt(t)&&"[object Symbol]"==Pt(t)},Tt=vt,Nt=Mt,It=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Rt=/^\w*$/;var Ht=function(t,e){if(Tt(t))return!1;var a=typeof t;return!("number"!=a&&"symbol"!=a&&"boolean"!=a&&null!=t&&!Nt(t))||(Rt.test(t)||!It.test(t)||null!=e&&t in Object(e))};var Ut=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},Dt=Ot,Lt=Ut;var Bt,Zt=function(t){if(!Lt(t))return!1;var e=Dt(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},qt=bt["__core-js_shared__"],Kt=(Bt=/[^.]+$/.exec(qt&&qt.keys&&qt.keys.IE_PROTO||""))?"Symbol(src)_1."+Bt:"";var Wt=function(t){return!!Kt&&Kt in t},Ft=Function.prototype.toString;var Gt=Zt,Jt=Wt,Xt=Ut,Yt=function(t){if(null!=t){try{return Ft.call(t)}catch(t){}try{return t+""}catch(t){}}return""},Qt=/^\[object .+?Constructor\]$/,te=Function.prototype,ee=Object.prototype,ae=te.toString,oe=ee.hasOwnProperty,ie=RegExp("^"+ae.call(oe).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var re=function(t){return!(!Xt(t)||Jt(t))&&(Gt(t)?ie:Qt).test(Yt(t))},ne=function(t,e){return null==t?void 0:t[e]};var se=function(t,e){var a=ne(t,e);return re(a)?a:void 0},le=se(Object,"create"),ce=le;var ue=function(){this.__data__=ce?ce(null):{},this.size=0};var _e=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},de=le,he=Object.prototype.hasOwnProperty;var me=function(t){var e=this.__data__;if(de){var a=e[t];return"__lodash_hash_undefined__"===a?void 0:a}return he.call(e,t)?e[t]:void 0},pe=le,ve=Object.prototype.hasOwnProperty;var ge=le;var fe=ue,be=_e,we=me,ye=function(t){var e=this.__data__;return pe?void 0!==e[t]:ve.call(e,t)},ke=function(t,e){var a=this.__data__;return this.size+=this.has(t)?0:1,a[t]=ge&&void 0===e?"__lodash_hash_undefined__":e,this};function $e(t){var e=-1,a=null==t?0:t.length;for(this.clear();++e-1},Ie=function(t,e){var a=this.__data__,o=Pe(a,t);return o<0?(++this.size,a.push([t,e])):a[o][1]=e,this};function Re(t){var e=-1,a=null==t?0:t.length;for(this.clear();++et.startsWith("vacuum")));return{entity:null!=a?a:""}}get entity(){return this.hass.states[this.config.entity]}get map(){return this.hass&&this.config.map?this.hass.states[this.config.map]:null}setConfig(t){this.config=function(t){var e,a,o,i,r,n,s,l,c,u;if(!t)throw new Error(Ur("error.invalid_config"));if(!t.entity)throw new Error(Ur("error.missing_entity"));const _=t.actions;return _&&Array.isArray(_)&&console.warn(Ur("warning.actions_array")),{entity:t.entity,map:null!==(e=t.map)&&void 0!==e?e:"",map_refresh:null!==(a=t.map_refresh)&&void 0!==a?a:5,image:null!==(o=t.image)&&void 0!==o?o:"default",show_name:null===(i=t.show_name)||void 0===i||i,show_status:null===(r=t.show_status)||void 0===r||r,show_toolbar:null===(n=t.show_toolbar)||void 0===n||n,compact_view:null!==(s=t.compact_view)&&void 0!==s&&s,stats:null!==(l=t.stats)&&void 0!==l?l:{},actions:null!==(c=t.actions)&&void 0!==c?c:{},shortcuts:null!==(u=t.shortcuts)&&void 0!==u?u:[]}}(t)}getCardSize(){return this.config.compact_view?3:8}shouldUpdate(t){return function(t,e,a){if(e.has("config")||a)return!0;if(t.config.entity){var o=e.get("hass");return!o||o.states[t.config.entity]!==t.hass.states[t.config.entity]}return!1}(this,t,!1)}updated(t){t.get("hass")&&t.get("hass").states[this.config.entity].state!==this.hass.states[this.config.entity].state&&(this.requestInProgress=!1)}connectedCallback(){super.connectedCallback(),!this.config.compact_view&&this.map&&(this.requestUpdate(),this.thumbUpdater=setInterval((()=>this.requestUpdate()),1e3*this.config.map_refresh))}disconnectedCallback(){super.disconnectedCallback(),this.map&&this.thumbUpdater&&clearInterval(this.thumbUpdater)}handleMore(t=this.entity.entity_id){_t(this,"hass-more-info",{entityId:t},{bubbles:!1,composed:!0})}callService(t){const{service:e,service_data:a}=t,[o,i]=e.split(".");this.hass.callService(o,i,a)}callVacuumService(t,e={request:!0},a={}){this.hass.callService("vacuum",t,Object.assign({entity_id:this.config.entity},a)),e.request&&(this.requestInProgress=!0,this.requestUpdate())}handleSpeed(t){const e=t.target.getAttribute("value");this.callVacuumService("set_fan_speed",{request:!1},{fan_speed:e})}handleVacuumAction(t,e={request:!0}){return()=>{if(!this.config.actions[t])return this.callVacuumService(e.defaultService||t,e);this.callService(this.config.actions[t])}}getAttributes(t){const{status:e,state:a}=t.attributes;return Object.assign({status:e||a||t.state},t.attributes)}renderSource(){const{fan_speed:t,fan_speed_list:e}=this.getAttributes(this.entity);if(!e||!t)return H;const a=e.indexOf(t);return I`
${Ur(`source.${t.toLowerCase()}`)||t}
${e.map(((t,e)=>I`${Ur(`source.${t.toLowerCase()}`)||t}`))}
`}renderBattery(){const{battery_level:t,battery_icon:e}=this.getAttributes(this.entity);return I`
${t}%
`}renderMapOrImage(t){if(this.config.compact_view)return H;if(this.map)return this.map&&this.map.attributes.entity_picture?I``:H;const e="default"===this.config.image?"data:image/svg+xml,%3csvg width='490' height='490' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M490 245c0 135.31-109.69 245-245 245S0 380.31 0 245c0-3.013.0543891-6.013.162239-9H5l5 3v-12l-8.84919-5.899C13.1643 97.0064 117.754 0 245 0c127.089 0 231.578 96.7672 243.804 220.641L480 227v12.5l5-4h4.819c.12 3.152.181 6.319.181 9.5Z' fill='white'/%3e%3cpath d='M411.749 119c-6.307-8.348-13.27-16.258-20.851-23.6492C351.81 57.243 299.364 35.941 244.774 36.0001c-54.59.0591-106.99 21.4746-145.9954 59.667C59.7735 133.86 37.2596 185.797 36.0512 240.374l2.0895.046c.918-41.46 14.2556-81.382 37.8593-114.798V126h116v-2H77.1576c.7253-1.006 1.46-2.006 2.204-3H192v-2H80.8779c5.8988-7.683 12.3626-14.985 19.3631-21.8395 38.615-37.8105 90.491-59.0119 144.535-59.0704 54.044-.0585 105.966 21.0305 144.663 58.7572 7.123 6.9447 13.694 14.3517 19.683 22.1527H299v2h111.638c.744.994 1.479 1.994 2.204 3H299v2h115.266c23.35 33.213 36.583 72.821 37.583 113.972l2.089-.051c-1.066-43.848-15.882-85.962-41.938-120.589V119h-.251Z' fill='%23AAA'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M300 122.5c0 30.1-24.624 54.5-55 54.5s-55-24.4-55-54.5c0-30.0995 24.624-54.5 55-54.5s55 24.4005 55 54.5Zm-4 0c0 27.856-22.799 50.5-51 50.5s-51-22.644-51-50.5S216.799 72 245 72s51 22.644 51 50.5Z' fill='%23666'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M1.12741 221.523C6.9567 160.97 35.1055 104.75 80.0964 63.8045 125.087 22.8589 183.702.115675 244.536.00044016 305.369-.114809 364.07 22.4061 409.216 63.1811c44.985 40.6299 73.305 96.4879 79.5 156.7719l.011.001c-.002.013-.004.025-.007.038.021.202.042.405.062.607l-.279.028c-.145.286-.312.483-.382.565l-.003.005c-.185.218-.402.426-.611.612-.425.377-.994.817-1.651 1.294-1.325.963-3.171 2.194-5.341 3.588-.17.109-.341.219-.515.33v12.215l.249-.174c1.54-1.073 2.823-1.981 3.736-2.644.39-.283.703-.515.936-.693l-.007-.183.254-.01c.048-.038.083-.067.106-.087l.008-.007-.01.01c-.01.009-.033.032-.063.066l-.015.017 4.616-.182c1.298 32.938-4.063 65.799-15.764 96.616-11.7 30.816-29.499 58.955-52.331 82.731-22.832 23.776-50.226 42.7-80.544 55.64-30.317 12.939-62.934 19.627-95.898 19.664-32.963.037-65.594-6.579-95.941-19.45-30.346-12.872-57.783-31.735-80.6677-55.46-22.8846-23.725-40.7463-51.824-52.5157-82.614-11.76935-30.791-17.20429-63.64-15.979377-96.58l3.830807.142V236c.18555 0 .35898.025.50489.057l.56091.021-.00581.158c.13048.053.26118.112.38589.171.35305.167.78483.397 1.26649.667.87404.489 1.99915 1.158 3.2876 1.949v-12.13l-.4815-.302c-2.17716-1.367-4.02092-2.536-5.35246-3.398-.66426-.431-1.21155-.792-1.61262-1.066-.19905-.136-.37589-.261-.51834-.366l-.01222-.009c-.04061-.03-.11781-.087-.20795-.163l-.6875-.066ZM464.644 236.475c3.564-2.147 7.127-4.312 10.356-6.313v12.528c-1.909 1.31-3.945 2.699-5.987 4.086-4.093 2.779-8.206 5.546-11.376 7.648-1.586 1.052-2.93 1.933-3.915 2.566-.474.304-.857.546-1.14.719l-.19-.011-.007.131c-.063.037-.107.062-.135.079-.03.017-.042.025-.042.025l.024-.009c.01-.004.023-.01.039-.016l.095.241c-3.217 52.86-26.453 102.516-64.989 138.858-38.646 36.444-89.759 56.743-142.878 56.743-53.12 0-104.232-20.3-142.878-56.745-38.6453-36.445-61.9029-86.281-65.0136-139.31l-.2108.013c-.0549-.17-.1194-.3-.1616-.378-.0859-.16-.1788-.29-.2489-.38-.1401-.181-.2992-.346-.4386-.482-.2858-.279-.6601-.598-1.0796-.936-.8488-.684-2.029-1.563-3.413-2.556-2.7761-1.991-6.4661-4.507-10.1873-6.974-1.9862-1.317-3.9866-2.622-5.8676-3.83v-12.157c3.2173 2.001 6.7542 4.19 10.2783 6.365 5.686 3.509 11.3427 6.985 15.5776 9.583 2.1175 1.299 3.8798 2.379 5.1126 3.134l1.0774.66c1.0989 51.017 21.909 99.675 58.1301 135.725 36.902 36.729 86.816 57.401 138.881 57.518 52.066.116 102.072-20.331 139.139-56.895 36.507-36.012 57.554-84.787 58.75-135.992.352-.224.817-.513 1.385-.861 1.325-.813 3.172-1.923 5.371-3.238 1.287-.77 2.693-1.609 4.183-2.498l.097-.058c3.574-2.133 7.624-4.55 11.662-6.983ZM6.22995 219.764l.11131.072c1.3071.847 3.13156 2.004 5.30424 3.368 4.343 2.727 10.0507 6.265 15.7336 9.772 5.6819 3.507 11.3354 6.98 15.5686 9.578 2.1165 1.298 3.8778 2.377 5.11 3.132l1.9049 1.166.9921-.007c.3546 51.024 20.8428 99.843 57.0073 135.837 36.165 35.995 85.08 56.253 136.104 56.367 51.025.115 100.03-19.924 136.356-55.756 36.325-35.832 57.032-84.559 57.615-135.58l.585.006-.071-.066c.19-.204.434-.374.522-.435l.012-.008c.144-.101.323-.22.524-.35.406-.262.96-.607 1.631-1.018 1.346-.826 3.21-1.946 5.409-3.261 1.321-.79 2.764-1.651 4.292-2.563 3.571-2.131 7.608-4.54 11.639-6.969 5.757-3.469 11.476-6.963 15.773-9.723 2.152-1.384 3.921-2.565 5.152-3.459.053-.038.104-.076.154-.113l.102-.075c-6.233-58.782-33.937-113.219-77.829-152.8616C361.689 26.858 304.162 4.78749 244.545 4.90042 184.928 5.01336 127.486 27.3017 83.3945 67.4284 39.856 107.052 12.4116 161.271 6.22995 219.764Zm2.09908 22.928c-1.35577-.837-2.51273-1.53-3.38991-2.026-.55505 30.74 4.79901 61.315 15.78648 90.06 11.534 30.175 29.0385 57.712 51.4654 80.963 22.427 23.25 49.315 41.736 79.055 54.35 29.739 12.614 61.718 19.097 94.022 19.061 32.304-.036 64.269-6.591 93.98-19.271 29.711-12.681 56.558-31.226 78.933-54.527 22.375-23.3 39.818-50.876 51.284-81.077 10.871-28.632 16.159-59.064 15.594-89.655-.734.522-1.584 1.119-2.522 1.773-3.095 2.159-7.176 4.958-11.277 7.742-4.101 2.785-8.227 5.56-11.412 7.673-1.284.851-2.419 1.597-3.34 2.194-3.637 53.361-27.268 103.418-66.216 140.147C350.858 437.287 298.702 458 244.498 458c-54.204 0-106.359-20.714-145.7927-57.903-39.1679-36.938-62.8452-87.356-66.2735-141.057-.1301-.112-.2876-.243-.4742-.394-.7611-.613-1.8697-1.441-3.2341-2.419-2.7209-1.952-6.3663-4.439-10.0659-6.891-3.6986-2.452-7.4329-4.857-10.32857-6.644Z' fill='%23666'/%3e%3crect x='233' y='365' width='24' height='53' rx='12' stroke='%23AAA' stroke-width='2'/%3e%3c/svg%3e":this.config.image;return I``}renderStats(t){const e=(this.config.stats[t]||this.config.stats.default||[]).map((({entity_id:t,attribute:e,value_template:a,unit:o,subtitle:i})=>{if(!t&&!e)return H;let r="";if(t&&e)r=Sa(this.hass.states[t].attributes,e);else if(e)r=Sa(this.entity.attributes,e);else{if(!t)return H;r=this.hass.states[t].state}const n=I``;return I`
${n} ${o}
${i}
`}));return e.length?I`
${e}
`:H}renderName(){const{friendly_name:t}=this.getAttributes(this.entity);return this.config.show_name?I`
${t}
`:H}renderStatus(){const{status:t}=this.getAttributes(this.entity),e=Ur(`status.${t.toLowerCase()}`)||t;return this.config.show_status?I`
${e}
`:H}renderToolbar(t){if(!this.config.show_toolbar)return H;switch(t){case"on":case"auto":case"spot":case"edge":case"single_room":case"cleaning":return I`
${Ur("common.pause")}${Ur("common.stop")}${Ur("common.return_to_base")}
`;case"paused":return I`
${Ur("common.continue")}${Ur("common.return_to_base")}
`;case"returning":return I`
${Ur("common.continue")}${Ur("common.pause")}
`;default:{const e=this.config.shortcuts.map((({name:t,service:e,icon:a,service_data:o})=>I``)),a=I``;return I`
${"idle"===t?a:""}
${e}
`}}}renderUnavailable(){return I`
`}render(){return this.entity?I`
${this.renderSource()} ${this.renderBattery()}
${this.renderMapOrImage(this.entity.state)}${this.renderStats(this.entity.state)}
${this.renderToolbar(this.entity.state)}
`:this.renderUnavailable()}};t([nt({attribute:!1})],Zr.prototype,"hass",void 0),t([st()],Zr.prototype,"config",void 0),t([st()],Zr.prototype,"requestInProgress",void 0),t([st()],Zr.prototype,"thumbUpdater",void 0),Zr=t([it("vacuum-card")],Zr),window.customCards=window.customCards||[],window.customCards.push({preview:!0,type:"vacuum-card",name:Ur("common.name"),description:Ur("common.description")});var qr=n`.card-config{flex-direction:column;display:flex;gap:10px}.option{display:flex;align-items:center}.option ha-switch{margin-right:10px}.option ha-select,.option paper-input{width:100%}`;Dr(qr);let Kr=class extends at{constructor(){super(...arguments),this.image=void 0,this.compact_view=!1,this.show_name=!0,this.show_status=!0,this.show_toolbar=!0}setConfig(t){this.config=t,this.config.entity||(this.config.entity=this.getEntitiesByType("vacuum")[0]||"",_t(this,"config-changed",{config:this.config}))}getEntitiesByType(t){return this.hass?Object.keys(this.hass.states).filter((e=>e.startsWith(t))):[]}render(){if(!this.hass)return H;const t=this.getEntitiesByType("vacuum"),e=this.getEntitiesByType("camera");return I`
${t.map((t=>I`${t}`))}
${e.map((t=>I`${t}`))}
${Ur("editor.compact_view")}
${Ur("editor.show_name")}
${Ur("editor.show_status")}
${Ur("editor.show_toolbar")}
${Ur("editor.code_only_note")}
`}valueChanged(t){if(!this.config||!this.hass||!t.target)return;const e=t.target;e.configValue&&this.config[e.configValue]!==(null==e?void 0:e.value)&&(e.configValue&&(""===e.value?delete this.config[e.configValue]:this.config=Object.assign(Object.assign({},this.config),{[e.configValue]:void 0!==e.checked?e.checked:e.value})),_t(this,"config-changed",{config:this.config}))}static get styles(){return qr}};t([nt({attribute:!1})],Kr.prototype,"hass",void 0),t([st()],Kr.prototype,"config",void 0),t([st()],Kr.prototype,"image",void 0),t([st()],Kr.prototype,"compact_view",void 0),t([st()],Kr.prototype,"show_name",void 0),t([st()],Kr.prototype,"show_status",void 0),t([st()],Kr.prototype,"show_toolbar",void 0),Kr=t([it("vacuum-card-editor")],Kr);var Wr=Object.freeze({__proto__:null,get VacuumCardEditor(){return Kr}});export{Zr as VacuumCard}; + );--vc-primary-text-color:var(--primary-text-color);--vc-secondary-text-color:var(--secondary-text-color);--vc-icon-color:var(--secondary-text-color);--vc-toolbar-background:var(--vc-background);--vc-toolbar-text-color:var(--secondary-text-color);--vc-toolbar-icon-color:var(--secondary-text-color);--vc-divider-color:var(--entities-divider-color, var(--divider-color));--vc-spacing:10px;display:flex;flex:1;flex-direction:column}ha-card{flex-direction:column;flex:1;position:relative;overflow:hidden}.preview{background:var(--vc-background);position:relative;text-align:center}.preview.not-available{filter:grayscale(1)}.header{display:flex;justify-content:space-between}.tips{display:flex;gap:var(--vc-spacing);flex-grow:1;flex-wrap:wrap;padding:var(--vc-spacing)}.tips .tip{cursor:pointer}.map{max-width:95%;image-rendering:crisp-edges;cursor:pointer}@keyframes cleaning{0%{transform:rotate(0) translate(0)}5%{transform:rotate(0) translate(0,-10px)}10%{transform:rotate(0) translate(0,5px)}15%{transform:rotate(0) translate(0)}20%{transform:rotate(30deg) translate(0)}25%{transform:rotate(30deg) translate(0,-10px)}30%{transform:rotate(30deg) translate(0,5px)}35%{transform:rotate(30deg) translate(0)}40%{transform:rotate(0) translate(0)}45%{transform:rotate(-30deg) translate(0)}50%{transform:rotate(-30deg) translate(0,-10px)}55%{transform:rotate(-30deg) translate(0,5px)}60%{transform:rotate(-30deg) translate(0)}70%{transform:rotate(0) translate(0)}100%{transform:rotate(0)}}@keyframes returning{0%{transform:rotate(0)}25%{transform:rotate(10deg)}50%{transform:rotate(0)}75%{transform:rotate(-10deg)}100%{transform:rotate(0)}}.vacuum{display:block;max-width:90%;max-height:200px;image-rendering:crisp-edges;margin:var(--vc-spacing) auto;cursor:pointer;filter:brightness(.9)}.vacuum.auto,.vacuum.cleaning,.vacuum.edge,.vacuum.on,.vacuum.single_room,.vacuum.spot{animation:cleaning 5s linear infinite}.vacuum.returning{animation:returning 2s linear infinite}.vacuum.paused{opacity:1}.vacuum.docked{opacity:.5}.fill-gap{flex-grow:1}.more-info ha-icon{display:flex}.status{display:flex;align-items:center;justify-content:center;direction:ltr}.status-text{color:var(--vc-secondary-text-color);white-space:nowrap;text-overflow:ellipsis;overflow:hidden;margin-left:calc(28px + var(--vc-spacing))}.status mwc-circular-progress{--mdc-theme-primary:var(--vc-secondary-text-color)!important}.status mwc-circular-progress{margin-left:var(--vc-spacing)}.vacuum-name{text-align:center;font-weight:700;color:var(--vc-primary-text-color);font-size:16px}.not-available .offline{text-align:center;color:var(--vc-primary-text-color);font-size:16px}.metadata{margin:var(--vc-spacing) auto}.stats{border-top:1px solid var(--vc-divider-color);display:flex;flex-direction:row;justify-content:space-evenly;color:var(--vc-secondary-text-color)}.stats-block{cursor:pointer;padding:var(--vc-spacing) 0;text-align:center;border-right:1px solid var(--vc-divider-color);flex-grow:1}.stats-block:last-of-type{border-right:0}.stats-value{font-size:20px;color:var(--vc-primary-text-color)}ha-icon{color:var(--vc-icon-color)}.toolbar{background:var(--vc-toolbar-background);min-height:30px;display:flex;flex-direction:row;flex-flow:row wrap;flex-wrap:wrap;justify-content:space-evenly;padding:5px;border-top:1px solid var(--vc-divider-color)}.toolbar ha-icon-button{color:var(--vc-toolbar-text-color);flex-direction:column;width:44px;height:44px;--mdc-icon-button-size:44px}.toolbar paper-button{color:var(--vc-toolbar-text-color);display:flex;align-items:center;margin-right:10px;padding:15px 10px;cursor:pointer}.toolbar paper-button ha-icon{margin-right:5px;color:var(--vc-toolbar-icon-color)}.toolbar ha-icon{color:var(--vc-toolbar-icon-color);display:flex}.icon-title{display:inline-block;vertical-align:middle;padding:0 3px}`;Dr(Lr);var Br;!function(t="ha-template"){customElements.get(t)||customElements.define(t,ht)}();console.info("%c VACUUM-CARD %c 2.7.2","color: white; background: blue; font-weight: 700;","color: blue; background: white; font-weight: 700;"),customElements.get("ha-icon-button")||customElements.define("ha-icon-button",class extends(null!==(Br=customElements.get("paper-icon-button"))&&void 0!==Br?Br:HTMLElement){});let Zr=class extends at{constructor(){super(...arguments),this.requestInProgress=!1,this.thumbUpdater=null}static get styles(){return Lr}static async getConfigElement(){return await Promise.resolve().then((function(){return Wr})),document.createElement("vacuum-card-editor")}static getStubConfig(t,e){const[a]=e.filter((t=>t.startsWith("vacuum")));return{entity:null!=a?a:""}}get entity(){return this.hass.states[this.config.entity]}get map(){return this.hass&&this.config.map?this.hass.states[this.config.map]:null}setConfig(t){this.config=function(t){var e,a,o,i,r,n,s,l,c,u;if(!t)throw new Error(Ur("error.invalid_config"));if(!t.entity)throw new Error(Ur("error.missing_entity"));const _=t.actions;return _&&Array.isArray(_)&&console.warn(Ur("warning.actions_array")),{entity:t.entity,map:null!==(e=t.map)&&void 0!==e?e:"",map_refresh:null!==(a=t.map_refresh)&&void 0!==a?a:5,image:null!==(o=t.image)&&void 0!==o?o:"default",show_name:null===(i=t.show_name)||void 0===i||i,show_status:null===(r=t.show_status)||void 0===r||r,show_toolbar:null===(n=t.show_toolbar)||void 0===n||n,compact_view:null!==(s=t.compact_view)&&void 0!==s&&s,stats:null!==(l=t.stats)&&void 0!==l?l:{},actions:null!==(c=t.actions)&&void 0!==c?c:{},shortcuts:null!==(u=t.shortcuts)&&void 0!==u?u:[]}}(t)}getCardSize(){return this.config.compact_view?3:8}shouldUpdate(t){return function(t,e,a){if(e.has("config")||a)return!0;if(t.config.entity){var o=e.get("hass");return!o||o.states[t.config.entity]!==t.hass.states[t.config.entity]}return!1}(this,t,!1)}updated(t){t.get("hass")&&t.get("hass").states[this.config.entity].state!==this.hass.states[this.config.entity].state&&(this.requestInProgress=!1)}connectedCallback(){super.connectedCallback(),!this.config.compact_view&&this.map&&(this.requestUpdate(),this.thumbUpdater=setInterval((()=>this.requestUpdate()),1e3*this.config.map_refresh))}disconnectedCallback(){super.disconnectedCallback(),this.map&&this.thumbUpdater&&clearInterval(this.thumbUpdater)}handleMore(t=this.entity.entity_id){_t(this,"hass-more-info",{entityId:t},{bubbles:!1,composed:!0})}callService(t){const{service:e,service_data:a}=t,[o,i]=e.split(".");this.hass.callService(o,i,a)}callVacuumService(t,e={request:!0},a={}){this.hass.callService("vacuum",t,Object.assign({entity_id:this.config.entity},a)),e.request&&(this.requestInProgress=!0,this.requestUpdate())}handleSpeed(t){const e=t.target.getAttribute("value");this.callVacuumService("set_fan_speed",{request:!1},{fan_speed:e})}handleVacuumAction(t,e={request:!0}){return()=>{if(!this.config.actions[t])return this.callVacuumService(e.defaultService||t,e);this.callService(this.config.actions[t])}}getAttributes(t){const{status:e,state:a}=t.attributes;return Object.assign({status:e||a||t.state},t.attributes)}renderSource(){const{fan_speed:t,fan_speed_list:e}=this.getAttributes(this.entity);if(!e||!t)return H;const a=e.indexOf(t);return I`
${Ur(`source.${t.toLowerCase()}`)||t}
${e.map(((t,e)=>I`${Ur(`source.${t.toLowerCase()}`)||t}`))}
`}renderBattery(){const{battery_level:t,battery_icon:e}=this.getAttributes(this.entity);return I`
${t}%
`}renderMapOrImage(t){if(this.config.compact_view)return H;if(this.map)return this.map&&this.map.attributes.entity_picture?I``:H;const e="default"===this.config.image?"data:image/svg+xml,%3csvg width='490' height='490' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M490 245c0 135.31-109.69 245-245 245S0 380.31 0 245c0-3.013.0543891-6.013.162239-9H5l5 3v-12l-8.84919-5.899C13.1643 97.0064 117.754 0 245 0c127.089 0 231.578 96.7672 243.804 220.641L480 227v12.5l5-4h4.819c.12 3.152.181 6.319.181 9.5Z' fill='white'/%3e%3cpath d='M411.749 119c-6.307-8.348-13.27-16.258-20.851-23.6492C351.81 57.243 299.364 35.941 244.774 36.0001c-54.59.0591-106.99 21.4746-145.9954 59.667C59.7735 133.86 37.2596 185.797 36.0512 240.374l2.0895.046c.918-41.46 14.2556-81.382 37.8593-114.798V126h116v-2H77.1576c.7253-1.006 1.46-2.006 2.204-3H192v-2H80.8779c5.8988-7.683 12.3626-14.985 19.3631-21.8395 38.615-37.8105 90.491-59.0119 144.535-59.0704 54.044-.0585 105.966 21.0305 144.663 58.7572 7.123 6.9447 13.694 14.3517 19.683 22.1527H299v2h111.638c.744.994 1.479 1.994 2.204 3H299v2h115.266c23.35 33.213 36.583 72.821 37.583 113.972l2.089-.051c-1.066-43.848-15.882-85.962-41.938-120.589V119h-.251Z' fill='%23AAA'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M300 122.5c0 30.1-24.624 54.5-55 54.5s-55-24.4-55-54.5c0-30.0995 24.624-54.5 55-54.5s55 24.4005 55 54.5Zm-4 0c0 27.856-22.799 50.5-51 50.5s-51-22.644-51-50.5S216.799 72 245 72s51 22.644 51 50.5Z' fill='%23666'/%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M1.12741 221.523C6.9567 160.97 35.1055 104.75 80.0964 63.8045 125.087 22.8589 183.702.115675 244.536.00044016 305.369-.114809 364.07 22.4061 409.216 63.1811c44.985 40.6299 73.305 96.4879 79.5 156.7719l.011.001c-.002.013-.004.025-.007.038.021.202.042.405.062.607l-.279.028c-.145.286-.312.483-.382.565l-.003.005c-.185.218-.402.426-.611.612-.425.377-.994.817-1.651 1.294-1.325.963-3.171 2.194-5.341 3.588-.17.109-.341.219-.515.33v12.215l.249-.174c1.54-1.073 2.823-1.981 3.736-2.644.39-.283.703-.515.936-.693l-.007-.183.254-.01c.048-.038.083-.067.106-.087l.008-.007-.01.01c-.01.009-.033.032-.063.066l-.015.017 4.616-.182c1.298 32.938-4.063 65.799-15.764 96.616-11.7 30.816-29.499 58.955-52.331 82.731-22.832 23.776-50.226 42.7-80.544 55.64-30.317 12.939-62.934 19.627-95.898 19.664-32.963.037-65.594-6.579-95.941-19.45-30.346-12.872-57.783-31.735-80.6677-55.46-22.8846-23.725-40.7463-51.824-52.5157-82.614-11.76935-30.791-17.20429-63.64-15.979377-96.58l3.830807.142V236c.18555 0 .35898.025.50489.057l.56091.021-.00581.158c.13048.053.26118.112.38589.171.35305.167.78483.397 1.26649.667.87404.489 1.99915 1.158 3.2876 1.949v-12.13l-.4815-.302c-2.17716-1.367-4.02092-2.536-5.35246-3.398-.66426-.431-1.21155-.792-1.61262-1.066-.19905-.136-.37589-.261-.51834-.366l-.01222-.009c-.04061-.03-.11781-.087-.20795-.163l-.6875-.066ZM464.644 236.475c3.564-2.147 7.127-4.312 10.356-6.313v12.528c-1.909 1.31-3.945 2.699-5.987 4.086-4.093 2.779-8.206 5.546-11.376 7.648-1.586 1.052-2.93 1.933-3.915 2.566-.474.304-.857.546-1.14.719l-.19-.011-.007.131c-.063.037-.107.062-.135.079-.03.017-.042.025-.042.025l.024-.009c.01-.004.023-.01.039-.016l.095.241c-3.217 52.86-26.453 102.516-64.989 138.858-38.646 36.444-89.759 56.743-142.878 56.743-53.12 0-104.232-20.3-142.878-56.745-38.6453-36.445-61.9029-86.281-65.0136-139.31l-.2108.013c-.0549-.17-.1194-.3-.1616-.378-.0859-.16-.1788-.29-.2489-.38-.1401-.181-.2992-.346-.4386-.482-.2858-.279-.6601-.598-1.0796-.936-.8488-.684-2.029-1.563-3.413-2.556-2.7761-1.991-6.4661-4.507-10.1873-6.974-1.9862-1.317-3.9866-2.622-5.8676-3.83v-12.157c3.2173 2.001 6.7542 4.19 10.2783 6.365 5.686 3.509 11.3427 6.985 15.5776 9.583 2.1175 1.299 3.8798 2.379 5.1126 3.134l1.0774.66c1.0989 51.017 21.909 99.675 58.1301 135.725 36.902 36.729 86.816 57.401 138.881 57.518 52.066.116 102.072-20.331 139.139-56.895 36.507-36.012 57.554-84.787 58.75-135.992.352-.224.817-.513 1.385-.861 1.325-.813 3.172-1.923 5.371-3.238 1.287-.77 2.693-1.609 4.183-2.498l.097-.058c3.574-2.133 7.624-4.55 11.662-6.983ZM6.22995 219.764l.11131.072c1.3071.847 3.13156 2.004 5.30424 3.368 4.343 2.727 10.0507 6.265 15.7336 9.772 5.6819 3.507 11.3354 6.98 15.5686 9.578 2.1165 1.298 3.8778 2.377 5.11 3.132l1.9049 1.166.9921-.007c.3546 51.024 20.8428 99.843 57.0073 135.837 36.165 35.995 85.08 56.253 136.104 56.367 51.025.115 100.03-19.924 136.356-55.756 36.325-35.832 57.032-84.559 57.615-135.58l.585.006-.071-.066c.19-.204.434-.374.522-.435l.012-.008c.144-.101.323-.22.524-.35.406-.262.96-.607 1.631-1.018 1.346-.826 3.21-1.946 5.409-3.261 1.321-.79 2.764-1.651 4.292-2.563 3.571-2.131 7.608-4.54 11.639-6.969 5.757-3.469 11.476-6.963 15.773-9.723 2.152-1.384 3.921-2.565 5.152-3.459.053-.038.104-.076.154-.113l.102-.075c-6.233-58.782-33.937-113.219-77.829-152.8616C361.689 26.858 304.162 4.78749 244.545 4.90042 184.928 5.01336 127.486 27.3017 83.3945 67.4284 39.856 107.052 12.4116 161.271 6.22995 219.764Zm2.09908 22.928c-1.35577-.837-2.51273-1.53-3.38991-2.026-.55505 30.74 4.79901 61.315 15.78648 90.06 11.534 30.175 29.0385 57.712 51.4654 80.963 22.427 23.25 49.315 41.736 79.055 54.35 29.739 12.614 61.718 19.097 94.022 19.061 32.304-.036 64.269-6.591 93.98-19.271 29.711-12.681 56.558-31.226 78.933-54.527 22.375-23.3 39.818-50.876 51.284-81.077 10.871-28.632 16.159-59.064 15.594-89.655-.734.522-1.584 1.119-2.522 1.773-3.095 2.159-7.176 4.958-11.277 7.742-4.101 2.785-8.227 5.56-11.412 7.673-1.284.851-2.419 1.597-3.34 2.194-3.637 53.361-27.268 103.418-66.216 140.147C350.858 437.287 298.702 458 244.498 458c-54.204 0-106.359-20.714-145.7927-57.903-39.1679-36.938-62.8452-87.356-66.2735-141.057-.1301-.112-.2876-.243-.4742-.394-.7611-.613-1.8697-1.441-3.2341-2.419-2.7209-1.952-6.3663-4.439-10.0659-6.891-3.6986-2.452-7.4329-4.857-10.32857-6.644Z' fill='%23666'/%3e%3crect x='233' y='365' width='24' height='53' rx='12' stroke='%23AAA' stroke-width='2'/%3e%3c/svg%3e":this.config.image;return I``}renderStats(t){const e=(this.config.stats[t]||this.config.stats.default||[]).map((({entity_id:t,attribute:e,value_template:a,unit:o,subtitle:i})=>{if(!t&&!e)return H;let r="";if(t&&e)r=Sa(this.hass.states[t].attributes,e);else if(e)r=Sa(this.entity.attributes,e);else{if(!t)return H;r=this.hass.states[t].state}const n=I``;return I`
${n} ${o}
${i}
`}));return e.length?I`
${e}
`:H}renderName(){const{friendly_name:t}=this.getAttributes(this.entity);return this.config.show_name?I`
${t}
`:H}renderStatus(){const{status:t}=this.getAttributes(this.entity),e=Ur(`status.${t.toLowerCase()}`)||t;return this.config.show_status?I`
${e}
`:H}renderToolbar(t){if(!this.config.show_toolbar)return H;switch(t){case"on":case"auto":case"spot":case"edge":case"single_room":case"cleaning":return I`
${Ur("common.pause")}${Ur("common.stop")}${Ur("common.return_to_base")}
`;case"paused":return I`
${Ur("common.continue")}${Ur("common.return_to_base")}
`;case"returning":return I`
${Ur("common.continue")}${Ur("common.pause")}
`;default:{const e=this.config.shortcuts.map((({name:t,service:e,icon:a,service_data:o})=>I``)),a=I``;return I`
${"idle"===t?a:""}
${e}
`}}}renderUnavailable(){return I`
`}render(){return this.entity?I`
${this.renderSource()} ${this.renderBattery()}
${this.renderMapOrImage(this.entity.state)}${this.renderStats(this.entity.state)}
${this.renderToolbar(this.entity.state)}
`:this.renderUnavailable()}};t([nt({attribute:!1})],Zr.prototype,"hass",void 0),t([st()],Zr.prototype,"config",void 0),t([st()],Zr.prototype,"requestInProgress",void 0),t([st()],Zr.prototype,"thumbUpdater",void 0),Zr=t([it("vacuum-card")],Zr),window.customCards=window.customCards||[],window.customCards.push({preview:!0,type:"vacuum-card",name:Ur("common.name"),description:Ur("common.description")});var qr=n`.card-config{flex-direction:column;display:flex;gap:10px}.option{display:flex;align-items:center}.option ha-switch{margin-right:10px}.option ha-select,.option paper-input{width:100%}`;Dr(qr);let Kr=class extends at{constructor(){super(...arguments),this.image=void 0,this.compact_view=!1,this.show_name=!0,this.show_status=!0,this.show_toolbar=!0}setConfig(t){this.config=t,this.config.entity||(this.config.entity=this.getEntitiesByType("vacuum")[0]||"",_t(this,"config-changed",{config:this.config}))}getEntitiesByType(t){return this.hass?Object.keys(this.hass.states).filter((e=>e.startsWith(t))):[]}render(){if(!this.hass)return H;const t=this.getEntitiesByType("vacuum"),e=this.getEntitiesByType("camera");return I`
${t.map((t=>I`${t}`))}
${e.map((t=>I`${t}`))}
${Ur("editor.compact_view")}
${Ur("editor.show_name")}
${Ur("editor.show_status")}
${Ur("editor.show_toolbar")}
${Ur("editor.code_only_note")}
`}valueChanged(t){if(!this.config||!this.hass||!t.target)return;const e=t.target;e.configValue&&this.config[e.configValue]!==(null==e?void 0:e.value)&&(e.configValue&&(""===e.value?delete this.config[e.configValue]:this.config=Object.assign(Object.assign({},this.config),{[e.configValue]:void 0!==e.checked?e.checked:e.value})),_t(this,"config-changed",{config:this.config}))}static get styles(){return qr}};t([nt({attribute:!1})],Kr.prototype,"hass",void 0),t([st()],Kr.prototype,"config",void 0),t([st()],Kr.prototype,"image",void 0),t([st()],Kr.prototype,"compact_view",void 0),t([st()],Kr.prototype,"show_name",void 0),t([st()],Kr.prototype,"show_status",void 0),t([st()],Kr.prototype,"show_toolbar",void 0),Kr=t([it("vacuum-card-editor")],Kr);var Wr=Object.freeze({__proto__:null,get VacuumCardEditor(){return Kr}});export{Zr as VacuumCard}; diff --git a/config/www/community/vacuum-card/vacuum-card.js.gz b/config/www/community/vacuum-card/vacuum-card.js.gz index 315ee6bb..47e04a40 100644 Binary files a/config/www/community/vacuum-card/vacuum-card.js.gz and b/config/www/community/vacuum-card/vacuum-card.js.gz differ