diff --git a/.eslintrc b/.eslintrc.json similarity index 100% rename from .eslintrc rename to .eslintrc.json diff --git a/.github/PULL_REQUEST_TEMPLATE/bugfix.md b/.github/PULL_REQUEST_TEMPLATE/bugfix.md index 3880470..80dfb37 100644 --- a/.github/PULL_REQUEST_TEMPLATE/bugfix.md +++ b/.github/PULL_REQUEST_TEMPLATE/bugfix.md @@ -5,7 +5,7 @@ Please fill out the following information to help us review your pull request. --- -### Bug Summary +## Bug Summary Explain why this fix is needed and what problem it solves. If it relates to an existing issue, please link it. @@ -15,7 +15,7 @@ See [Linking a pull request to an issue](https://docs.github.com/en/issues/track --- -### Motivation and Context +## Motivation and Context Explain why this bug needs to be fixed and the impact it has on the project or users. @@ -23,20 +23,20 @@ Explain why this bug needs to be fixed and the impact it has on the project or u --- -### List of Changes +## List of Changes [Provide a concise list of the main changes introduced by this pull request to fix the bug.] - ... -### Steps to Reproduce (if not covered in the linked issue) +## Steps to Reproduce (if not covered in the linked issue) If the steps to reproduce the bug are not clearly outlined in the linked issue, please provide them here: 1. ... 2. ... -### Expected Behavior (if not covered in the linked issue) +## Expected Behavior (if not covered in the linked issue) Describe what the expected behavior should have been before the bug occurred. @@ -50,13 +50,13 @@ Describe the actual behavior that occurred due to the bug. --- -### Wiki Updates +## Wiki Updates [If this bug fix requires any updates to the Wiki, please provide details here.] --- -### Agreements +## Agreements Please confirm the following by inserting an `x` between the brackets: diff --git a/.github/PULL_REQUEST_TEMPLATE/feature.md b/.github/PULL_REQUEST_TEMPLATE/feature.md index 47a4cbf..650904a 100644 --- a/.github/PULL_REQUEST_TEMPLATE/feature.md +++ b/.github/PULL_REQUEST_TEMPLATE/feature.md @@ -5,13 +5,13 @@ Please fill out the following information to help us review your pull request. --- -### Feature Summary +## Feature Summary [Briefly describe the feature you are proposing] --- -### Motivation and Context +## Motivation and Context Explain why this feature is needed and what problem it solves. If it relates to an existing issue, please link it. @@ -21,19 +21,19 @@ See [Linking a pull request to an issue](https://docs.github.com/en/issues/track --- -### List of Changes +## List of Changes [Provide a concise list of the main changes introduced by this pull request.] - ... -### Wiki Updates +## Wiki Updates [If this bug feature requires any updates to the Wiki, please provide details here.] --- -### Agreements +## Agreements Please confirm the following by inserting an `x` between the brackets: diff --git a/.github/PULL_REQUEST_TEMPLATE/translation.md b/.github/PULL_REQUEST_TEMPLATE/translation.md index 3acdcac..d17a2cc 100644 --- a/.github/PULL_REQUEST_TEMPLATE/translation.md +++ b/.github/PULL_REQUEST_TEMPLATE/translation.md @@ -5,7 +5,7 @@ Please fill out the following information to help us review your translation cha --- -### Type of Translation Contribution +## Type of Translation Contribution Please select the type of contribution: @@ -15,7 +15,7 @@ Please select the type of contribution: --- -### Target Language +## Target Language Please specify the language you are adding or modifying: @@ -23,7 +23,7 @@ Please specify the language you are adding or modifying: --- -### Motivation and Context +## Motivation and Context Explain why this translation (addition, fix, or update) is needed. - For fixes, please describe the original error. @@ -33,7 +33,7 @@ Explain why this translation (addition, fix, or update) is needed. --- -### Scope of Changes +## Scope of Changes Please describe the scope of your translation changes. Which parts of the project are affected by these translations? @@ -42,7 +42,7 @@ Which parts of the project are affected by these translations? --- -### List of Changes +## List of Changes Provide a concise list of the main changes you've made in this pull request. If it's a large update, you can highlight key areas. @@ -51,7 +51,7 @@ If it's a large update, you can highlight key areas. --- -### Considerations for Reviewers +## Considerations for Reviewers Are there any specific areas you would like reviewers to pay extra attention to? For example, specific terminology, cultural nuances, or consistency with existing translations. @@ -60,7 +60,7 @@ For example, specific terminology, cultural nuances, or consistency with existin --- -### Agreements +## Agreements Please confirm the following: diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..4ecb67b --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,26 @@ +# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file + +version: 2 +updates: + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "weekly" + groups: + dependencies: + patterns: ["*"] + labels: + - "dependencies" + pull-request-branch-name: + separator: "-" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + groups: + actions: + patterns: ["*"] + labels: + - "actions" + pull-request-branch-name: + separator: "-" diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 0b7d8d0..1c5d521 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -9,6 +9,6 @@ jobs: runs-on: "ubuntu-latest" steps: - name: HACS Action - uses: "hacs/action@main" + uses: "hacs/action@22.5.0" with: category: "plugin" diff --git a/.github/workflows/webpack.yml b/.github/workflows/webpack.yml index ff8a7f0..06ae377 100644 --- a/.github/workflows/webpack.yml +++ b/.github/workflows/webpack.yml @@ -14,23 +14,26 @@ jobs: name: Build Distribution runs-on: ubuntu-latest env: - CI_COMMIT_MESSAGE: Continuous Integration - Build Distribution + CI_COMMIT_MESSAGE: | + Continuous Integration - Build Distribution + + [skip codacy] CI_COMMIT_AUTHOR: Continuous Integration strategy: matrix: - node-version: [ 18.x ] + node-version: [22.x] # Checkout Repository steps: - name: Checkout Repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: token: ${{ secrets.WORKFLOW_GIT_ACCESS_TOKEN }} # Build steps - name: Setup Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 81348cd..6346948 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -153,7 +153,7 @@ Enhancement suggestions are tracked as [GitHub issues][issuesUrl]. ### Code Contribution -You can contribute to this project by following the _fork → clone → edit → pull request_ workflow of GitHub. +You can contribute to this project by following the *fork → clone → edit → pull request* workflow of GitHub. #### Prevent changes to the distribution directory diff --git a/README.md b/README.md index 77e9ed3..d3b1856 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ # Mushroom dashboard strategy -[![release][releaseBadge]][releaseUrl] -[![hacs][hacsBadge]][hacsUrl] +[![Release][releaseBadge]][releaseUrl] +[![HACS][hacsBadge]][hacsUrl] +[![Codacy][codacyBadge]][codacyUrl] ![Preview GIF](./docs/preview.gif) @@ -26,10 +27,10 @@ For easy access, separate views are generated for entities which belong to speci ### Features -- 🛠 Automatically create a dashboard with three lines of YAML. -- 😍 Built-in Views for device-specific controls. -- 🎨 Many options to customize to fit your needs. -- 📈 [Mini graph][miniGraphUrl] cards for sensor entities. +* 🛠 Automatically create a dashboard with three lines of YAML. +* 😍 Built-in Views for device-specific controls. +* 🎨 Many options to customize to fit your needs. +* 📈 [Mini graph][miniGraphUrl] cards for sensor entities. > [!TIP] > If you like this package, please star the [project at GitHub][repositoryUrl]! @@ -59,14 +60,18 @@ Visit the [issues][issuesUrl] page. -[hacsBadge]: https://img.shields.io/badge/HACS-Default-blue +[codacyBadge]: https://app.codacy.com/project/badge/Grade/24de1e79aea445499917d9acd5ce9e04 -[sponsorBadge]: https://img.shields.io/badge/Sponsor_him-%E2%9D%A4-%23db61a2.svg?&logo=github&color=%23fe8e86 +[hacsBadge]: https://img.shields.io/badge/HACS-Default-blue [releaseBadge]: https://img.shields.io/github/v/tag/digilive/mushroom-strategy?filter=v2.3.3-alpha.1&label=Release +[sponsorBadge]: https://img.shields.io/badge/Sponsor_him-%E2%9D%A4-%23db61a2.svg?&logo=github&color=%23fe8e86 + +[codacyUrl]: https://app.codacy.com/gh/DigiLive/mushroom-strategy/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade + [repositoryUrl]: https://github.com/DigiLive/mushroom-strategy [releaseUrl]: https://github.com/DigiLive/mushroom-strategy/releases/tag/v2.3.3-alpha.1 diff --git a/dist/mushroom-strategy.js b/dist/mushroom-strategy.js index f0110b8..3bac909 100644 --- a/dist/mushroom-strategy.js +++ b/dist/mushroom-strategy.js @@ -1 +1 @@ -(()=>{var e,t,i={245:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>r});var n=i(1241),s=i(5987),a=i(1122);class o extends a.default{static getDefaultConfig(){return{title:(0,s.k)("fan.fans"),path:"fans",icon:"mdi:fan",subview:!1,headerCardConfiguration:{iconOn:"mdi:fan",iconOff:"mdi:fan-off",onService:"fan.turn_on",offService:"fan.turn_off"}}}static getViewHeaderCardConfig(){return{title:(0,s.k)("fan.all_fans"),subtitle:`${n.O.getCountTemplate(o.domain,"eq","on")} ${(0,s.k)("fan.fans")} `+(0,s.k)("generic.on")}}constructor(e){super(),this.initializeViewConfig(o.getDefaultConfig(),e,o.getViewHeaderCardConfig())}}o.domain="fan";const r=o},845:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});var n=i(4818);class s extends n.default{static getDefaultConfig(){return{type:"custom:mushroom-person-card",layout:"vertical",primary_info:"none",secondary_info:"none",icon_type:"entity-picture"}}constructor(e,t){super(e),this.configuration={...this.configuration,...s.getDefaultConfig(),...t}}}const a=s},1122:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>l});var n=i(4137),s=i(1241),a=i(3007),o=i(6964),r=i(2682),c=i(2737);const l=class{get domain(){return this.constructor.domain}constructor(){this.baseConfiguration={icon:"mdi:view-dashboard",subview:!1},this.viewHeaderCardConfiguration={cards:[],type:""},s.O.initialized||(0,o.OG)(o.ZY,"Registry is not initialized!")}async createCardConfigurations(){const e=[],t=(0,a.p)(this.domain+"Card"),o=(await i(2560)(`./${t}`)).default,l=new r.A(s.O.entities).whereDomain(this.domain).where((e=>!e.entity_id.endsWith("_stateful_scene"))).toList();for(const t of s.O.areas){let i=[],a={area_id:[t.area_id]};const u=new r.A(l).whereAreaId(t.area_id).toList();if("undisclosed"===t.area_id&&(a={entity_id:u.map((e=>e.entity_id))}),i.push(...u.map((e=>new o(e,s.O.strategyOptions.card_options?.[e.entity_id]).getCard()))),i.length){i=(0,c.P)(i,s.O.strategyOptions.domains[this.domain].stack_count??s.O.strategyOptions.domains._.stack_count);const o="headerCardConfiguration"in this.baseConfiguration?this.baseConfiguration.headerCardConfiguration:{};i.unshift(new n.default(a,{title:t.name,...o}).createCard()),e.push({type:"vertical-stack",cards:i})}}return this.viewHeaderCardConfiguration.cards.length&&e.length&&e.unshift(this.viewHeaderCardConfiguration),e}async getView(){return{...this.baseConfiguration,cards:await this.createCardConfigurations()}}getDomainTargets(){return{entity_id:s.O.entities.filter((e=>e.entity_id.startsWith(this.domain+"."))).map((e=>e.entity_id))}}initializeViewConfig(e,t={},i){this.baseConfiguration={...this.baseConfiguration,...e,...t},this.baseConfiguration.headerCardConfiguration={showControls:s.O.strategyOptions.domains[this.domain]?.showControls??s.O.strategyOptions.domains._.showControls},this.viewHeaderCardConfiguration=new n.default(this.getDomainTargets(),{...this.baseConfiguration.headerCardConfiguration,...i}).createCard()}}},1151:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});var n=i(5982);class s extends n.default{static getDefaultConfig(){return{type:"custom:mushroom-entity-card",icon:"mdi:power-cycle",icon_color:"green"}}constructor(e,t){super(e),this.configuration={...this.configuration,...s.getDefaultConfig(),...t}}}const a=s},1216:(e,t,i)=>{var n={"./AbstractChip":[8222,792],"./AbstractChip.ts":[8222,792],"./ClimateChip":[7757,792],"./ClimateChip.ts":[7757,792],"./CoverChip":[9589,792],"./CoverChip.ts":[9589,792],"./FanChip":[1867,792],"./FanChip.ts":[1867,792],"./LightChip":[3122,792],"./LightChip.ts":[3122,792],"./SwitchChip":[9908,792],"./SwitchChip.ts":[9908,792],"./WeatherChip":[1778,792],"./WeatherChip.ts":[1778,792]};function s(e){if(!i.o(n,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=n[e],s=t[0];return i.e(t[1]).then((()=>i(s)))}s.keys=()=>Object.keys(n),s.id=1216,e.exports=s},1241:(e,t,i)=>{"use strict";i.d(t,{O:()=>l});var n=i(4744),s=i.n(n),a=i(2700),o=i(6964),r=i(5987),c=i(2682);class l{constructor(){}static get strategyOptions(){return l._strategyOptions}static get areas(){return l._areas}static get devices(){return l._devices}static get entities(){return l._entities}static get hassStates(){return l._hassStates}static get initialized(){return l._initialized}static async initialize(e){(0,r.A)(e.hass),l._hassStates=e.hass.states;const{ConfigurationDefaults:t}=await Promise.resolve().then(i.bind(i,7688));try{l._strategyOptions=s()(t,e.config?.strategy?.options??{})}catch(e){(0,o.OG)(o.ZY,"Error importing strategy options!",e)}(0,o.Ux)(l.strategyOptions.debug?o.ZY:o.QC);try{[l._entities,l._devices,l._areas]=await Promise.all([e.hass.callWS({type:"config/entity_registry/list"}),e.hass.callWS({type:"config/device_registry/list"}),e.hass.callWS({type:"config/area_registry/list"})])}catch(e){(0,o.OG)(o.ZY,"Error importing Home Assistant registries!",e)}l._strategyOptions.extra_views.map((e=>({...e,subview:!1}))),l._entities=new c.A(l.entities).not().whereEntityCategory("config").not().whereEntityCategory("diagnostic").isNotHidden().whereDisabledBy(null).orderBy(["name","original_name"],"asc").toList(),l._entities=l.entities.map((e=>({...e,area_id:e.area_id??"undisclosed"}))),l._devices=new c.A(l.devices).isNotHidden().whereDisabledBy(null).orderBy(["name_by_user","name"],"asc").toList(),l._devices=l.devices.map((e=>({...e,area_id:e.area_id??"undisclosed"}))),l.strategyOptions.areas._.hidden?l._areas=[]:(l.strategyOptions.areas.undisclosed?.hidden||l.areas.push(t.areas.undisclosed),l._areas=l.areas.map((e=>({...e,...l.strategyOptions.areas._,...l.strategyOptions.areas?.[e.area_id]}))),l.strategyOptions.areas.undisclosed.area_id="undisclosed",l.strategyOptions.areas.undisclosed.type="default",l._areas=new c.A(l.areas).isNotHidden().orderBy(["order","name"],"asc").toList()),(()=>{const e=Object.entries(l.strategyOptions.views);l.strategyOptions.views=Object.fromEntries(e.sort((([e,t],[i,n])=>(t.order??1/0)-(n.order??1/0)||(t.title??"").localeCompare(n.title??""))))})(),(()=>{const e=Object.entries(l.strategyOptions.domains);l.strategyOptions.domains=Object.fromEntries(e.sort((([,e],[,t])=>(0,a.vv)(e)&&(0,a.vv)(t)?(e.order??1/0)-(t.order??1/0)||(e.title??"").localeCompare(t.title??""):0)))})(),l.strategyOptions.extra_views.sort(((e,t)=>(e.order??1/0)-(t.order??1/0)||(e.title??"").localeCompare(t.title??""))),l._initialized=!0}static getCountTemplate(e,t,i){const n=[];return l.initialized?(n.push(...new c.A(l.entities).whereDomain(e).where((e=>!e.entity_id.endsWith("_stateful_scene"))).toList().map((e=>`states['${e.entity_id}']`))),`{% set entities = [${n}] %}\n {{ entities\n | selectattr('state','${t}','${i}')\n | selectattr('state','ne','unavailable')\n | selectattr('state','ne','unknown')\n | list\n | count\n }}`):((0,o.OG)(o.br,"Registry is not initialized!"),"?")}static getExposedNames(e){if("chip"===e)return Object.entries(l.strategyOptions.chips).filter((([e,t])=>!0===t)).map((([e])=>e.split("_")[0]));const t=l.strategyOptions[`${e}s`];return Object.keys(t).filter((e=>"_"!==e&&"default"!==e&&!t[e].hidden))}}l._areas=[],l._initialized=!1},1255:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>r});var n=i(1241),s=i(5987),a=i(1122);class o extends a.default{static getDefaultConfig(){return{title:(0,s.k)("camera.cameras"),path:"cameras",icon:"mdi:cctv",subview:!1,headerCardConfiguration:{showControls:!1}}}static getViewHeaderCardConfig(){return{title:(0,s.k)("camera.all_cameras"),subtitle:`${n.O.getCountTemplate(o.domain,"ne","off")} ${(0,s.k)("camera.cameras")} `+(0,s.k)("generic.busy")}}constructor(e){super(),this.initializeViewConfig(o.getDefaultConfig(),e,o.getViewHeaderCardConfig())}}o.domain="camera";const r=o},1778:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});var n=i(8222);class s extends n.default{static getDefaultConfig(e){return{type:"weather",entity:e,show_temperature:!0,show_conditions:!0}}constructor(e,t){super(),this.configuration={...this.configuration,...s.getDefaultConfig(e),...t}}}const a=s},1810:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});var n=i(7212);class s extends n.default{static getDefaultConfig(){return{type:"custom:mushroom-select-card",icon:void 0}}constructor(e,t){super(e),this.configuration={...this.configuration,...s.getDefaultConfig(),...t}}}const a=s},1867:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>r});var n=i(1241),s=i(8222),a=i(2682);class o extends s.default{static getDefaultConfig(){return{type:"template",icon:"mdi:fan",icon_color:"green",content:n.O.getCountTemplate("fan","eq","on"),tap_action:{action:"perform-action",perform_action:"fan.turn_off",target:{entity_id:new a.A(n.O.entities).whereDomain("fan").getValuesByProperty("entity_id")}},hold_action:{action:"navigate",navigation_path:"fans"}}}constructor(e){super(),this.configuration={...this.configuration,...o.getDefaultConfig(),...e}}}const r=o},2137:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});var n=i(4818);class s extends n.default{static getDefaultConfig(){return{type:"custom:mushroom-number-card",icon:void 0}}constructor(e,t){super(e),this.configuration={...this.configuration,...s.getDefaultConfig(),...t}}}const a=s},2464:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>r});var n=i(1241),s=i(5987),a=i(1122);class o extends a.default{static getDefaultConfig(){return{title:(0,s.k)("switch.switches"),path:"switches",icon:"mdi:dip-switch",subview:!1,headerCardConfiguration:{iconOn:"mdi:power-plug",iconOff:"mdi:power-plug-off",onService:"switch.turn_on",offService:"switch.turn_off"}}}static getViewHeaderCardConfig(){return{title:(0,s.k)("switch.all_switches"),subtitle:`${n.O.getCountTemplate(o.domain,"eq","on")} ${(0,s.k)("switch.switches")} `+(0,s.k)("generic.on")}}constructor(e){super(),this.initializeViewConfig(o.getDefaultConfig(),e,o.getViewHeaderCardConfig())}}o.domain="switch";const r=o},2560:(e,t,i)=>{var n={"./AbstractCard":[4818],"./AbstractCard.ts":[4818],"./AreaCard":[4301,792],"./AreaCard.ts":[4301,792],"./BinarySensorCard":[1151,792],"./BinarySensorCard.ts":[1151,792],"./CameraCard":[2723,792],"./CameraCard.ts":[2723,792],"./ClimateCard":[8721,792],"./ClimateCard.ts":[8721,792],"./CoverCard":[8033,792],"./CoverCard.ts":[8033,792],"./FanCard":[2667,792],"./FanCard.ts":[2667,792],"./HaAreaCard":[9042,792],"./HaAreaCard.ts":[9042,792],"./HeaderCard":[4137],"./HeaderCard.ts":[4137],"./InputSelectCard":[1810,792],"./InputSelectCard.ts":[1810,792],"./LightCard":[8254,792],"./LightCard.ts":[8254,792],"./LockCard":[6555,792],"./LockCard.ts":[6555,792],"./MediaPlayerCard":[9879,792],"./MediaPlayerCard.ts":[9879,792],"./MiscellaneousCard":[4486,792],"./MiscellaneousCard.ts":[4486,792],"./NumberCard":[2137,792],"./NumberCard.ts":[2137,792],"./PersonCard":[845,792],"./PersonCard.ts":[845,792],"./SceneCard":[2858,792],"./SceneCard.ts":[2858,792],"./SelectCard":[7212,792],"./SelectCard.ts":[7212,792],"./SensorCard":[5982],"./SensorCard.ts":[5982],"./SwitchCard":[3708,792],"./SwitchCard.ts":[3708,792],"./VacuumCard":[7430,792],"./VacuumCard.ts":[7430,792],"./ValveCard":[8868,792],"./ValveCard.ts":[8868,792]};function s(e){if(!i.o(n,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=n[e],s=t[0];return Promise.all(t.slice(1).map(i.e)).then((()=>i(s)))}s.keys=()=>Object.keys(n),s.id=2560,e.exports=s},2667:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});var n=i(4818);class s extends n.default{static getDefaultConfig(){return{type:"custom:mushroom-fan-card",icon:void 0,show_percentage_control:!0,show_oscillate_control:!0,icon_animation:!0}}constructor(e,t){super(e),this.configuration={...this.configuration,...s.getDefaultConfig(),...t}}}const a=s},2682:(e,t,i)=>{"use strict";i.d(t,{A:()=>o});var n=i(1241),s=i(6964);class a{constructor(e){this.filters=[],this.invertNext=!1,this.entries=e,this.entryIdentifier=0===e.length||"entity_id"in e[0]?"entity_id":"floor_id"in e[0]?"area_id":"id"}not(){return this.invertNext=!this.invertNext,this}resetFilters(){return this.filters=[],this.invertNext=!1,this}where(e){return this.filters.push(this.checkInversion(e)),this}whereAreaId(e,t=!0){return this.filters.push(this.checkInversion((i=>{let s;const a=i;return t&&a.device_id&&(s=n.O.devices.find((e=>e.id===a.device_id))?.area_id),void 0===e?void 0===i.area_id&&void 0===s:"undisclosed"!==i.area_id&&i.area_id?i.area_id===e:s===e}))),this}whereNameContains(e){const t=e.toLowerCase();return this.filters.push(this.checkInversion((e=>{const i=e;return[i.name,i.original_name,i.name_by_user].filter((e=>"string"==typeof e)).some((e=>e.toLowerCase().includes(t)))}))),this}whereDomain(e){const t=e+".";return this.filters.push(this.checkInversion((e=>"entity_id"in e&&e.entity_id.startsWith(t)))),this}whereFloorId(e){return this.filters.push(this.checkInversion((t=>{const i="floor_id"in t;return void 0===e?!i:i&&t.floor_id===e}))),this}whereDeviceId(e){return this.filters.push(this.checkInversion((t=>{const i="id"in t,n="device_id"in t;return void 0===e?!i&&!n:i&&t.id===e||n&&t.device_id===e}))),this}whereEntityId(e){return this.filters.push(this.checkInversion((t=>void 0===e?!("entity_id"in t):"entity_id"in t&&t.entity_id===e))),this}whereDisabledBy(e){return this.filters.push(this.checkInversion((t=>{const i="disabled_by"in t;return void 0===e?!i:i&&t.disabled_by===e}))),this}whereHiddenBy(e){return this.filters.push(this.checkInversion((t=>{const i="hidden_by"in t;return void 0===e?!i:i&&t.hidden_by===e}))),this}isNotHidden(e=!0){return this.filters.push(this.checkInversion((t=>{const i="hidden_by"in t&&t.hidden_by;if(!e)return!i;const s=t[this.entryIdentifier],a="area_id"===this.entryIdentifier?{...n.O.strategyOptions.areas._,...n.O.strategyOptions.areas[s]}:n.O.strategyOptions.card_options?.[s];return!(i||!0===a?.hidden)}))),this}whereEntityCategory(e){const t=this.invertNext;return this.invertNext=!1,this.filters.push((i=>{const s="entity_category"in i?i.entity_category:void 0,a="string"==typeof s?n.O.strategyOptions?.domains?._?.[`hide_${s}_entities`]:void 0;return!0!==a&&(!1===a&&s===e||(t?s!==e:s===e))})),this}orderBy(e,t="asc"){const i=(e,t)=>{for(const i of t){const t=e[i];if(null!=t)return t}},n=[...this.entries].sort(((n,s)=>{const a=i(n,e),o=i(s,e);if(a===o)return 0;const r="asc"===t?1:-1;return null==a?r:null==o?-r:"string"==typeof a&&"string"==typeof o?a.localeCompare(o)*r:(aii>=t)),this}toList(){const e=new a(this.entries);return e.filters=[...this.filters],e.entries.filter(((t,i)=>e.filters.every((e=>e(t,i)))))}getValuesByProperty(e){return this.toList().map((t=>t[e])).filter((e=>void 0!==e))}first(){const e=new a(this.entries);return e.filters=[...this.filters],e.entries.find(((t,i)=>e.filters.every((e=>e(t,i)))))}single(){const e=new a(this.entries);e.filters=[...this.filters];const t=e.entries.filter(((t,i)=>e.filters.every((e=>e(t,i)))));if(1===t.length)return t[0];(0,s.OG)(s.br,`Expected a single element, but found ${t.length}.`)}count(){const e=new a(this.entries);return e.filters=[...this.filters],e.entries.filter(((t,i)=>e.filters.every((e=>e(t,i))))).length}checkInversion(e){return this.invertNext?(this.invertNext=!1,t=>!e(t)):e}}const o=a},2700:(e,t,i)=>{"use strict";i.d(t,{dQ:()=>u,eq:()=>r,ln:()=>d,uS:()=>l,vv:()=>o});const n=["_","binary_sensor","camera","climate","cover","default","fan","input_select","light","lock","media_player","number","scene","select","sensor","switch","vacuum"],s=["camera","climate","cover","fan","home","light","lock","scene","switch","vacuum"],a=["light","fan","cover","switch","climate","weather"];function o(e){return e&&("order"in e||"title"in e||"name"in e)}function r(e){return!!e&&("perform-action"===e.action||"call-service"===e.action)&&"perform_action"in e}function c(e,t){return t.includes(e)}function l(e){return c(e,s)}function u(e){return c(e,n)}function d(e){return c(e,a)}},2723:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});var n=i(4818);class s extends n.default{static getDefaultConfig(){return{entity:"",type:"picture-entity",show_name:!1,show_state:!1,camera_view:"live"}}constructor(e,t){super(e),this.configuration={...this.configuration,...s.getDefaultConfig(),...t}}}const a=s},2737:(e,t,i)=>{"use strict";function n(e,t=2,i){if(e.length<=1)return e;const n=(e,t)=>{if(e.length<=1)return e;const i=[];for(let n=0;nn})},2858:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>c});var n=i(1241),s=i(4818),a=i(3708),o=i(2700);class r extends s.default{static getDefaultConfig(){return{type:"custom:mushroom-entity-card",tap_action:{action:"perform-action",perform_action:"scene.turn_on",target:{}}}}constructor(e,t){const i=e.entity_id.split(".").pop(),s=n.O.entities.find((e=>e.entity_id===`switch.${i}_stateful_scene`));if(super(s??e),s)return void(this.configuration=new a.default(s).getCard());const c=r.getDefaultConfig();(0,o.eq)(c.tap_action)&&(c.tap_action.target={entity_id:e.entity_id}),c.icon=n.O.hassStates[e.entity_id]?.attributes.icon??c.icon,this.configuration={...this.configuration,...c,...t}}}const c=r},3007:(e,t,i)=>{"use strict";function n(e){return e.replace(/^([a-z])|([-_][a-z])/g,(e=>e.toUpperCase().replace(/[-_]/g,"")))}function s(e){if("function"==typeof structuredClone)try{return structuredClone(e)}catch{}try{return JSON.parse(JSON.stringify(e))}catch{return e}}i.d(t,{G:()=>s,p:()=>n})},3122:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>r});var n=i(1241),s=i(8222),a=i(2682);class o extends s.default{static getDefaultConfig(){return{type:"template",icon:"mdi:lightbulb-group",icon_color:"amber",content:n.O.getCountTemplate("light","eq","on"),tap_action:{action:"perform-action",perform_action:"light.turn_off",target:{entity_id:new a.A(n.O.entities).whereDomain("light").getValuesByProperty("entity_id")}},hold_action:{action:"navigate",navigation_path:"lights"}}}constructor(e){super(),this.configuration={...this.configuration,...o.getDefaultConfig(),...e}}}const r=o},3708:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});var n=i(4818);class s extends n.default{static getDefaultConfig(){return{type:"custom:mushroom-entity-card",icon:void 0,tap_action:{action:"toggle"}}}constructor(e,t){super(e),this.configuration={...this.configuration,...s.getDefaultConfig(),...t}}}const a=s},4137:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});class n{static getDefaultConfig(){return{type:"custom:mushroom-title-card",iconOn:"mdi:power-on",iconOff:"mdi:power-off",onService:"none",offService:"none"}}constructor(e,t){this.target=e,this.configuration={...n.getDefaultConfig(),...t}}createCard(){const e=[{type:"custom:mushroom-title-card",title:this.configuration.title,subtitle:this.configuration.subtitle}];return this.configuration.showControls&&e.push({type:"horizontal-stack",cards:[{type:"custom:mushroom-template-card",icon:this.configuration.iconOff,layout:"vertical",icon_color:"red",tap_action:{action:"call-service",service:this.configuration.offService,target:this.target,data:{}}},{type:"custom:mushroom-template-card",icon:this.configuration.iconOn,layout:"vertical",icon_color:"amber",tap_action:{action:"call-service",service:this.configuration.onService,target:this.target,data:{}}}]}),{type:"horizontal-stack",cards:e}}}const s=n},4301:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});var n=i(4818);class s extends n.default{static getDefaultConfig(){return{type:"custom:mushroom-template-card",primary:void 0,icon:"mdi:floor-plan",icon_color:"blue",tap_action:{action:"navigate",navigation_path:""},hold_action:{action:"none"}}}constructor(e,t){super(e);const i=s.getDefaultConfig();let n=t;i.primary=e.name,i.icon=e.icon||i.icon,i.tap_action&&"navigation_path"in i.tap_action&&(i.tap_action.navigation_path=e.area_id),n&&(n={...n,type:i.type}),this.configuration={...this.configuration,...i,...n}}}const a=s},4486:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});var n=i(4818);class s extends n.default{static getDefaultConfig(){return{type:"custom:mushroom-entity-card",icon_color:"blue-grey"}}constructor(e,t){super(e),this.configuration={...this.configuration,...s.getDefaultConfig(),...t}}}const a=s},4744:e=>{"use strict";var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===i}(e)}(e)},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?r((i=e,Array.isArray(i)?[]:{}),e,t):e;var i}function s(e,t,i){return e.concat(t).map((function(e){return n(e,i)}))}function a(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function o(e,t){try{return t in e}catch(e){return!1}}function r(e,i,c){(c=c||{}).arrayMerge=c.arrayMerge||s,c.isMergeableObject=c.isMergeableObject||t,c.cloneUnlessOtherwiseSpecified=n;var l=Array.isArray(i);return l===Array.isArray(e)?l?c.arrayMerge(e,i,c):function(e,t,i){var s={};return i.isMergeableObject(e)&&a(e).forEach((function(t){s[t]=n(e[t],i)})),a(t).forEach((function(a){(function(e,t){return o(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,a)||(o(e,a)&&i.isMergeableObject(t[a])?s[a]=function(e,t){if(!t.customMerge)return r;var i=t.customMerge(e);return"function"==typeof i?i:r}(a,i)(e[a],t[a],i):s[a]=n(t[a],i))})),s}(e,i,c):n(i,c)}r.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,i){return r(e,i,t)}),{})};var c=r;e.exports=c},4818:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});var n=i(1241),s=i(6964);const a=class{constructor(e){this.configuration={type:"custom:mushroom-entity-card",icon:"mdi:help-circle"},n.O.initialized||(0,s.OG)(s.ZY,"Registry not initialized!"),this.entity=e}getCard(){return{...this.configuration,entity:"entity_id"in this.entity?this.entity.entity_id:void 0}}}},5982:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});var n=i(4818);class s extends n.default{static getDefaultConfig(){return{type:"custom:mushroom-entity-card",icon:"mdi:information",animate:!0,line_color:"green"}}constructor(e,t){super(e),this.configuration={...this.configuration,...s.getDefaultConfig(),...t}}}const a=s},5987:(e,t,i)=>{"use strict";i.d(t,{A:()=>v,k:()=>y});const n=JSON.parse('{"camera":{"all_cameras":"Alle Kameras","cameras":"Kameras"},"climate":{"all_climates":"Alle Klimaanlagen","climates":"Klimaanlagen"},"cover":{"all_covers":"Alle Abdeckungen","covers":"Abdeckungen"},"fan":{"all_fans":"Alle Ventilatoren","fans":"Ventilatoren"},"generic":{"all":"Alle","areas":"Bereiche","busy":"Beschäftigt","good_afternoon":"Guten Nachmittag","good_evening":"Guten Abend","good_morning":"Guten Morgen","hello":"Hallo","home":"Start","miscellaneous":"Sonstiges","numbers":"Zahlen","off":"Aus","on":"Ein","open":"Offen","unavailable":"Nicht verfügbar","unclosed":"Nicht Geschlossen","undisclosed":"Sonstiges","unknown":"Unbekannt"},"input_select":{"input_selects":"Auswahl-Eingaben"},"light":{"all_lights":"Alle Leuchten","lights":"Leuchten"},"lock":{"locked":"Gesperrt","all_locks":"Alle Schlösser","locks":"Schlösser","unlocked":"Entsperrt"},"media_player":{"media_players":"Wiedergabegeräte"},"scene":{"scenes":"Szenen"},"select":{"selects":"Auswahlen"},"sensor":{"binary":"Binäre","sensors":"Sensoren"},"switch":{"all_switches":"Alle Schalter","switches":"Schalter"},"vacuum":{"all_vacuums":"Alle Staubsauger","vacuums":"Staubsauger"},"valve":{"all_valves":"Alle Ventile","valves":"Ventile","open":"Offen","opening":"Öffnet","closed":"Geschlossen","closing":"Schließt","stopped":"Gestoppt"}}');var s=i.t(n,2);const a=JSON.parse('{"camera":{"all_cameras":"All Cameras","cameras":"Cameras"},"climate":{"all_climates":"All Climates","climates":"Climates"},"cover":{"all_covers":"All Covers","covers":"Covers"},"fan":{"all_fans":"All Fans","fans":"Fans"},"generic":{"all":"All","areas":"Areas","busy":"Busy","good_afternoon":"Good afternoon","good_evening":"Good evening","good_morning":"Good morning","hello":"Hello","home":"Home","miscellaneous":"Miscellaneous","numbers":"Numbers","off":"Off","on":"On","open":"Open","unavailable":"Unavailable","unclosed":"Unclosed","undisclosed":"Other","unknown":"Unknown"},"input_select":{"input_selects":"Input Selects"},"light":{"all_lights":"All Lights","lights":"Lights"},"lock":{"all_locks":"All Locks","locked":"Locked","locks":"Locks","unlocked":"Unlocked"},"media_player":{"media_players":"Media Players"},"scene":{"scenes":"Scenes"},"select":{"selects":"Selects"},"sensor":{"binary":"Binary","sensors":"Sensors"},"switch":{"all_switches":"All Switches","switches":"Switches"},"vacuum":{"all_vacuums":"All Vacuums","vacuums":"Vacuums"},"valve":{"all_valves":"All Valves","valves":"Valves","open":"Open","opening":"Opening","closed":"Closed","closing":"Closing","stopped":"Stopped"}}');var o=i.t(a,2);const r=JSON.parse('{"camera":{"all_cameras":"Todas las Cámaras","cameras":"Cámaras"},"climate":{"all_climates":"Todos los Termostatos","climates":"Termostatos"},"cover":{"all_covers":"Todas las Cubiertas","covers":"Cubiertas"},"fan":{"all_fans":"Todos los Ventiladores","fans":"Ventiladores"},"generic":{"all":"Todo","areas":"Áreas","busy":"Ocupado","good_afternoon":"Buenas tardes","good_evening":"Buenas noches","good_morning":"Buenos días","hello":"Hola","home":"Inicio","miscellaneous":"Varios","numbers":"Números","off":"Apagado","on":"Encendido","open":"Abierto","unavailable":"No Disponible","unclosed":"Sin Cerrar","undisclosed":"Varios","unknown":"Desconocido"},"input_select":{"input_selects":"Selecciones de Entrada"},"light":{"all_lights":"Todas las Luces","lights":"Luces"},"lock":{"all_locks":"Todas las Candados","locked":"Locked","locks":"Candados","unlocked":"Desbloqueado"},"media_player":{"media_players":"Reproductores Multimedia"},"scene":{"scenes":"Scenas"},"select":{"selects":"Seleccionar"},"sensor":{"binary":"Binario","sensors":"Sensores"},"switch":{"all_switches":"Todos los Apagadores","switches":"Apagadores"},"vacuum":{"all_vacuums":"Todas las Aspiradoras","vacuums":"Aspiradoras"},"valve":{"all_valves":"Todas las válvulas","valves":"Válvulas","open":"Abierta","opening":"Abriendo","closed":"Cerrada","closing":"Cerrando","stopped":"Detenida"}}');var c=i.t(r,2);const l=JSON.parse('{"camera":{"all_cameras":"Alle Cameras","cameras":"Cameras"},"climate":{"all_climates":"Alle Klimaatregelingen","climates":"Klimaatregelingen"},"cover":{"all_covers":"Alle Bedekkingen","covers":"Bedekkingen"},"fan":{"all_fans":"Alle Ventilatoren","fans":"Ventilatoren"},"generic":{"all":"Alle","areas":"Ruimtes","busy":"Bezig","good_afternoon":"Goedemiddag","good_evening":"Goedeavond","good_morning":"Goedemorgen","hello":"Hallo","home":"Start","miscellaneous":"Overige","numbers":"Nummers","off":"Uit","on":"Aan","open":"Open","unavailable":"Onbeschikbaar","unclosed":"Niet Gesloten","undisclosed":"Overige","unknown":"Onbekend"},"input_select":{"input_selects":"Lijsten"},"light":{"all_lights":"Alle Lampen","lights":"Lampen"},"lock":{"all_locks":"Alle Sloten","locked":"Vergrendeld","locks":"Sloten","unlocked":"Ontgrendeld"},"media_player":{"media_players":"Mediaspelers"},"scene":{"scenes":"Scenes"},"select":{"selects":"Statuslijsten"},"sensor":{"binary":"Binaire","sensors":"Sensoren"},"switch":{"all_switches":"Alle Schakelaars","switches":"Schakelaars"},"vacuum":{"all_vacuums":"Alle Afzuiging","vacuums":"Afzuiging"},"valve":{"all_valves":"Alle kleppen","valves":"Kleppen","open":"Open","opening":"Openen","closed":"Gesloten","closing":"Sluiten","stopped":"Gestopt"}}');var u=i.t(l,2);const d=JSON.parse('{"camera":{"all_cameras":"Todas as câmeras","cameras":"Câmeras"},"climate":{"all_climates":"Todos os climatizadores","climates":"Climatizadores"},"cover":{"all_covers":"Todas as persianas","covers":"Persianas"},"fan":{"all_fans":"Todos os ventiladores","fans":"Ventiladores"},"generic":{"all":"Todos","areas":"Áreas","busy":"Ocupado","good_afternoon":"Boa tarde","good_evening":"Boa noite","good_morning":"Bom dia","hello":"Olá","home":"Início","miscellaneous":"Variados","numbers":"Números","off":"Desligado","on":"Ligado","open":"Aberto","unavailable":"Indisponível","unclosed":"Não fechado","undisclosed":"Outro","unknown":"Desconhecido"},"input_select":{"input_selects":"Seleção de entrada"},"light":{"all_lights":"Todas as luzes","lights":"Luzes"},"lock":{"all_locks":"Todas as fechaduras","locked":"Travado","locks":"Fechaduras","unlocked":"Destravado"},"media_player":{"media_players":"Reprodutores de mídia"},"scene":{"scenes":"Cenas"},"select":{"selects":"Seleção"},"sensor":{"binary":"Binário","sensors":"Sensores"},"switch":{"all_switches":"Todos os interruptores","switches":"Interruptores"},"vacuum":{"all_vacuums":"Todos os aspiradores","vacuums":"Aspiradores"},"valve":{"all_valves":"Todas as válvulas","valves":"Válvulas","open":"Aberto","opening":"Abrindo","closed":"Fechado","closing":"Fechando","stopped":"Parado"}}');var f=i.t(d,2),g=i(6964);const h={de:s,en:o,es:c,nl:u,"pt-BR":f},p="en";function m(e,t){try{return e.split(".").reduce(((e,t)=>e[t]),h[t])}catch{return}}let _;function v(e){const t=e?.locale.language??p;_=e=>m(e,t)??m(e,p)??e}function y(e){return _?_(e):((0,g.OG)(g.br,"localize is not initialized! Call setupCustomLocalize first."),e)}},6555:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});var n=i(4818);class s extends n.default{static getDefaultConfig(){return{type:"custom:mushroom-lock-card",icon:void 0}}constructor(e,t){super(e),this.configuration={...this.configuration,...s.getDefaultConfig(),...t}}}const a=s},6559:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>r});var n=i(1241),s=i(5987),a=i(1122);class o extends a.default{static getDefaultConfig(){return{title:(0,s.k)("climate.climates"),path:"climates",icon:"mdi:thermostat",subview:!1,headerCardConfiguration:{showControls:!1}}}static getViewHeaderCardConfig(){return{title:(0,s.k)("climate.all_climates"),subtitle:`${n.O.getCountTemplate(o.domain,"ne","off")} ${(0,s.k)("climate.climates")} `+(0,s.k)("generic.busy")}}constructor(e){super(),this.initializeViewConfig(o.getDefaultConfig(),e,o.getViewHeaderCardConfig())}}o.domain="climate";const r=o},6964:(e,t,i)=>{"use strict";i.d(t,{OG:()=>g,QC:()=>a,Ux:()=>f,ZY:()=>u,br:()=>c,nR:()=>l,tm:()=>r});var n,s=i(3007);!function(e){e[e.Off=0]="Off",e[e.Debug=1]="Debug",e[e.Info=2]="Info",e[e.Warn=3]="Warn",e[e.Error=4]="Error",e[e.Fatal=5]="Fatal"}(n||(n={}));const{Off:a,Debug:o,Info:r,Warn:c,Error:l,Fatal:u}=n;let d=n.Fatal;function f(e){d=e}function g(e,t,...i){if(d===n.Off||e>d)return;const a="Mushroom Strategy - An error occurred. Check the console (F12) for details.",o=`[${n[e].toUpperCase()}]`,r=i.map(s.G),c=`[at ${function(e){if(!e)return"unknown";const t=e.split("\n").filter(Boolean);for(let e=1;e{"use strict";i.r(t),i.d(t,{default:()=>o});var n=i(5987),s=i(1122);class a extends s.default{static getDefaultConfig(){return{title:(0,n.k)("scene.scenes"),path:"scenes",icon:"mdi:palette",subview:!1,headerCardConfiguration:{showControls:!1}}}static getViewHeaderCardConfig(){return{}}constructor(e){super(),this.initializeViewConfig(a.getDefaultConfig(),e,a.getViewHeaderCardConfig())}}a.domain="scene";const o=a},7212:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});var n=i(4818);class s extends n.default{static getDefaultConfig(){return{type:"custom:mushroom-select-card",icon:void 0}}constructor(e,t){super(e),this.configuration={...this.configuration,...s.getDefaultConfig(),...t}}}const a=s},7430:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>o});const n=["on_off","start_pause","stop","locate","clean_spot","return_home"];var s=i(4818);class a extends s.default{static getDefaultConfig(){return{type:"custom:mushroom-vacuum-card",icon:void 0,icon_animation:!0,commands:[...n],tap_action:{action:"more-info"}}}constructor(e,t){super(e),this.configuration={...this.configuration,...a.getDefaultConfig(),...t}}}const o=a},7547:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>r});var n=i(1241),s=i(5987),a=i(1122);class o extends a.default{static getDefaultConfig(){return{title:(0,s.k)("cover.covers"),path:"covers",icon:"mdi:window-open",subview:!1,headerCardConfiguration:{iconOn:"mdi:arrow-up",iconOff:"mdi:arrow-down",onService:"cover.open_cover",offService:"cover.close_cover"}}}static getViewHeaderCardConfig(){return{title:(0,s.k)("cover.all_covers"),subtitle:`${n.O.getCountTemplate(o.domain,"search","(open|opening|closing)")} ${(0,s.k)("cover.covers")} ${(0,s.k)("generic.unclosed")}`}}constructor(e){super(),this.initializeViewConfig(o.getDefaultConfig(),e,o.getViewHeaderCardConfig())}}o.domain="cover";const r=o},7688:(e,t,i)=>{"use strict";i.d(t,{ConfigurationDefaults:()=>s});var n=i(5987);const s={areas:{_:{type:"AreaCard"},undisclosed:{aliases:[],area_id:"undisclosed",created_at:0,floor_id:null,hidden:!1,humidity_entity_id:null,icon:"mdi:floor-plan",labels:[],modified_at:0,name:(0,n.k)("generic.undisclosed"),picture:null,temperature_entity_id:null}},card_options:{},chips:{weather_entity:"auto",light_count:!0,fan_count:!0,cover_count:!0,switch_count:!0,climate_count:!0,extra_chips:[]},debug:!1,domains:{_:{hide_config_entities:void 0,hide_diagnostic_entities:void 0,showControls:!0,stack_count:1},binary_sensor:{title:`${(0,n.k)("sensor.binary")} `+(0,n.k)("sensor.sensors"),showControls:!1,hidden:!1,stack_count:2},camera:{title:(0,n.k)("camera.cameras"),showControls:!1,hidden:!1},climate:{title:(0,n.k)("climate.climates"),showControls:!1,hidden:!1},cover:{title:(0,n.k)("cover.covers"),iconOn:"mdi:arrow-up",iconOff:"mdi:arrow-down",onService:"cover.open_cover",offService:"cover.close_cover",hidden:!1},default:{title:(0,n.k)("generic.miscellaneous"),showControls:!1,hidden:!1},fan:{title:(0,n.k)("fan.fans"),iconOn:"mdi:fan",iconOff:"mdi:fan-off",onService:"fan.turn_on",offService:"fan.turn_off",hidden:!1},input_select:{title:(0,n.k)("input_select.input_selects"),showControls:!1,hidden:!1},light:{title:(0,n.k)("light.lights"),iconOn:"mdi:lightbulb",iconOff:"mdi:lightbulb-off",onService:"light.turn_on",offService:"light.turn_off",hidden:!1},lock:{title:(0,n.k)("lock.locks"),showControls:!1,hidden:!1},media_player:{title:(0,n.k)("media_player.media_players"),showControls:!1,hidden:!1},number:{title:(0,n.k)("generic.numbers"),showControls:!1,hidden:!1},scene:{title:(0,n.k)("scene.scenes"),showControls:!1,onService:"scene.turn_on",hidden:!1},select:{title:(0,n.k)("select.selects"),showControls:!1,hidden:!1},sensor:{title:(0,n.k)("sensor.sensors"),showControls:!1,hidden:!1},switch:{title:(0,n.k)("switch.switches"),iconOn:"mdi:power-plug",iconOff:"mdi:power-plug-off",onService:"switch.turn_on",offService:"switch.turn_off",hidden:!1},vacuum:{title:(0,n.k)("vacuum.vacuums"),iconOn:"mdi:robot-vacuum",iconOff:"mdi:robot-vacuum-off",onService:"vacuum.start",offService:"vacuum.stop",hidden:!1}},extra_cards:[],extra_views:[],home_view:{hidden:[],stack_count:{_:2}},views:{camera:{order:7,hidden:!1},climate:{order:6,hidden:!1},cover:{order:4,hidden:!1},fan:{order:3,hidden:!1},home:{order:1,hidden:!1},light:{order:2,hidden:!1},lock:{order:10,hidden:!1},scene:{order:9,hidden:!1},switch:{order:5,hidden:!1},vacuum:{order:8,hidden:!1}},quick_access_cards:[]}},7757:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>o});var n=i(1241),s=i(8222);class a extends s.default{static getDefaultConfig(){return{type:"template",icon:"mdi:thermostat",icon_color:"orange",content:n.O.getCountTemplate("climate","ne","off"),tap_action:{action:"none"},hold_action:{action:"navigate",navigation_path:"climates"}}}constructor(e){super(),this.configuration={...this.configuration,...a.getDefaultConfig(),...e}}}const o=a},7935:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>r});var n=i(1241),s=i(5987),a=i(1122);class o extends a.default{static getDefaultConfig(){return{title:(0,s.k)("locks.locks"),path:"locks",icon:"mdi:lock-open",subview:!1,headerCardConfiguration:{iconOn:"mdi:lock-open",iconOff:"mdi:lock",onService:"lock.lock",offService:"lock.unlock"}}}static getViewHeaderCardConfig(){return{title:(0,s.k)("lock.all_locks"),subtitle:`${n.O.getCountTemplate(o.domain,"ne","locked")} ${(0,s.k)("lock.locks")} `+(0,s.k)("lock.unlocked")}}constructor(e){super(),this.initializeViewConfig(o.getDefaultConfig(),e,o.getViewHeaderCardConfig())}}o.domain="lock";const r=o},8033:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});var n=i(4818);class s extends n.default{static getDefaultConfig(){return{type:"custom:mushroom-cover-card",icon:void 0,show_buttons_control:!0,show_position_control:!0,show_tilt_position_control:!0}}constructor(e,t){super(e),this.configuration={...this.configuration,...s.getDefaultConfig(),...t}}}const a=s},8222:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});var n=i(1241),s=i(6964);const a=class{constructor(){this.configuration={type:"template"},n.O.initialized||(0,s.OG)(s.ZY,"Registry not initialized!")}getChipConfiguration(){return this.configuration}}},8254:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>o});var n=i(2700),s=i(4818);class a extends s.default{static getDefaultConfig(){return{type:"custom:mushroom-light-card",icon:void 0,show_brightness_control:!0,show_color_control:!0,show_color_temp_control:!0,use_light_color:!0,double_tap_action:{action:"call-service",perform_action:"light.turn_on",target:{entity_id:void 0},data:{rgb_color:[255,255,255]}}}}constructor(e,t){super(e);const i=a.getDefaultConfig();(0,n.eq)(i.double_tap_action)&&(i.double_tap_action.target={entity_id:e.entity_id}),this.configuration={...this.configuration,...i,...t}}}const o=a},8499:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>r});var n=i(1241),s=i(5987),a=i(1122);class o extends a.default{static getDefaultConfig(){return{title:(0,s.k)("vacuum.vacuums"),path:"vacuums",icon:"mdi:robot-vacuum",subview:!1,headerCardConfiguration:{iconOn:"mdi:robot-vacuum",iconOff:"mdi:robot-vacuum-off",onService:"vacuum.start",offService:"vacuum.stop"}}}static getViewHeaderCardConfig(){return{title:(0,s.k)("vacuum.all_vacuums"),subtitle:`${n.O.getCountTemplate(o.domain,"in","[cleaning, returning]")} ${(0,s.k)("vacuum.vacuums")} `+(0,s.k)("generic.busy")}}constructor(e){super(),this.initializeViewConfig(o.getDefaultConfig(),e,o.getViewHeaderCardConfig())}}o.domain="vacuum";const r=o},8721:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});var n=i(4818);class s extends n.default{static getDefaultConfig(){return{type:"custom:mushroom-climate-card",icon:void 0,hvac_modes:["off","cool","heat","fan_only"],show_temperature_control:!0}}constructor(e,t){super(e),this.configuration={...this.configuration,...s.getDefaultConfig(),...t}}}const a=s},8868:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>o});var n=i(5987),s=i(4818);class a extends s.default{static getDefaultConfig(){return{type:"custom:mushroom-template-card",icon:"mdi:valve",icon_color:"blue",double_tap_action:{action:"toggle"}}}constructor(e,t){super(e);const i=a.getDefaultConfig();i.entity=e.entity_id,i.icon=e.icon??i.icon,i.primary=e.name??e.original_name??"?",i.secondary=`{% \n set mapping = {\n 'open': '${(0,n.k)("valve.open")}',\n 'opening': '${(0,n.k)("valve.opening")}',\n 'closed': '${(0,n.k)("valve.closed")}',\n 'closing': '${(0,n.k)("valve.closing")}',\n 'stopped': '${(0,n.k)("valve.stopped")}',\n 'unavailable': '${(0,n.k)("generic.unavailable")}'\n }\n %}\n {{ mapping.get(states('${e.entity_id}'), '${(0,n.k)("generic.unknown")}') }}`,this.configuration={...this.configuration,...i,...t}}}const o=a},9031:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>f});var n=i(1241),s=i(2700),a=i(3007),o=i(6964),r=i(5987),c=i(1122),l=i(2682),u=i(2737);class d extends c.default{static getDefaultConfig(){return{title:(0,r.k)("generic.home"),icon:"mdi:home-assistant",path:"home",subview:!1}}constructor(e){super(),this.baseConfiguration={...this.baseConfiguration,...d.getDefaultConfig(),...e}}async createCardConfigurations(){const e=[];let t,i,s;try{[t,i,s]=await Promise.all([this.createChipsSection(),this.createPersonsSection(),this.createAreasSection()])}catch(t){return(0,o.OG)(o.nR,"Error importing created sections!",t),e}return t&&e.push(t),i&&e.push(i),n.O.strategyOptions.home_view.hidden.includes("greeting")||e.push({type:"custom:mushroom-template-card",primary:`{% set time = now().hour %}\n {% if (time >= 18) %}\n ${(0,r.k)("generic.good_evening")},{{user}}!\n {% elif (time >= 12) %}\n ${(0,r.k)("generic.good_afternoon")}, {{user}}!\n {% elif (time >= 6) %}\n ${(0,r.k)("generic.good_morning")}, {{user}}!\n {% else %}\n ${(0,r.k)("generic.hello")}, {{user}}! {% endif %}`,icon:"mdi:hand-wave",icon_color:"orange",tap_action:{action:"none"},double_tap_action:{action:"none"},hold_action:{action:"none"}}),n.O.strategyOptions.quick_access_cards&&e.push(...n.O.strategyOptions.quick_access_cards),s&&e.push(s),n.O.strategyOptions.extra_cards&&e.push(...n.O.strategyOptions.extra_cards),e}async createChipsSection(){if(n.O.strategyOptions.home_view.hidden.includes("chips"))return;const e=[],t=n.O.getExposedNames("chip");let r;const c="auto"===n.O.strategyOptions.chips.weather_entity?n.O.entities.find((e=>e.entity_id.startsWith("weather.")))?.entity_id:n.O.strategyOptions.chips.weather_entity;if(c)try{r=(await Promise.resolve().then(i.bind(i,1778))).default;const t=new r(c);e.push(t.getChipConfiguration())}catch(e){(0,o.OG)(o.nR,"Error importing chip weather!",e)}else(0,o.OG)(o.tm,"Weather chip has no entities available.");for(const c of t){if(!(0,s.ln)(c)||!new l.A(n.O.entities).whereDomain(c).count()){(0,o.OG)(o.tm,`Chip for domain ${c} is unsupported or has no entities available.`);continue}const t=(0,a.p)(c+"Chip");try{r=(await i(1216)(`./${t}`)).default;const n=new r;e.push(n.getChipConfiguration())}catch(e){(0,o.OG)(o.nR,`Error importing chip ${c}!`,e)}}return n.O.strategyOptions.chips?.extra_chips&&e.push(...n.O.strategyOptions.chips.extra_chips),{type:"custom:mushroom-chips-card",alignment:"center",chips:e}}async createPersonsSection(){if(n.O.strategyOptions.home_view.hidden.includes("persons"))return;const e=[],t=(await Promise.resolve().then(i.bind(i,845))).default;return e.push(...n.O.entities.filter((e=>e.entity_id.startsWith("person."))).map((e=>new t(e).getCard()))),{type:"vertical-stack",cards:(0,u.P)(e,n.O.strategyOptions.home_view.stack_count.persons??n.O.strategyOptions.home_view.stack_count._)}}async createAreasSection(){if(n.O.strategyOptions.home_view.hidden.includes("areas"))return;const e=[];for(const t of n.O.areas){const s=n.O.strategyOptions.areas[t.area_id]?.type??n.O.strategyOptions.areas._?.type??"default";let a;try{a=(await i(2560)(`./${s}`)).default}catch(e){a=(await Promise.resolve().then(i.bind(i,4301))).default,n.O.strategyOptions.debug&&"default"!==s&&(0,o.OG)(o.nR,`Error importing ${s}: card!`,e)}e.push(new a(t,{...n.O.strategyOptions.areas._,...n.O.strategyOptions.areas[t.area_id]}).getCard())}return console.log(n.O.strategyOptions.home_view.stack_count.areas?.[0],n.O.strategyOptions.home_view.stack_count.areas?.[1]),{type:"vertical-stack",title:n.O.strategyOptions.home_view.hidden.includes("areasTitle")?void 0:(0,r.k)("generic.areas"),cards:(0,u.P)(e,n.O.strategyOptions.home_view.stack_count._,{"custom:mushroom-template-card":n.O.strategyOptions.home_view.stack_count.areas?.[0],area:n.O.strategyOptions.home_view.stack_count.areas?.[1]})}}}d.domain="home";const f=d},9042:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});var n=i(4818);class s extends n.default{static getDefaultConfig(){return{type:"area",area:""}}constructor(e,t){super(e);const i=s.getDefaultConfig();i.area=e.area_id,i.navigation_path=i.area,this.configuration={...this.configuration,...i,...t,type:i.type}}}const a=s},9304:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>r});var n=i(1241),s=i(5987),a=i(1122);class o extends a.default{static getDefaultConfig(){return{title:(0,s.k)("light.lights"),path:"lights",icon:"mdi:lightbulb-group",subview:!1,headerCardConfiguration:{iconOn:"mdi:lightbulb",iconOff:"mdi:lightbulb-off",onService:"light.turn_on",offService:"light.turn_off"}}}static getViewHeaderCardConfig(){return{title:(0,s.k)("light.all_lights"),subtitle:`${n.O.getCountTemplate(o.domain,"eq","on")} ${(0,s.k)("light.lights")} `+(0,s.k)("generic.on")}}constructor(e){super(),this.initializeViewConfig(o.getDefaultConfig(),e,o.getViewHeaderCardConfig())}}o.domain="light";const r=o},9555:(e,t,i)=>{var n={"./AbstractView":[1122,792],"./AbstractView.ts":[1122,792],"./CameraView":[1255,792],"./CameraView.ts":[1255,792],"./ClimateView":[6559,792],"./ClimateView.ts":[6559,792],"./CoverView":[7547,792],"./CoverView.ts":[7547,792],"./FanView":[245,792],"./FanView.ts":[245,792],"./HomeView":[9031,792],"./HomeView.ts":[9031,792],"./LightView":[9304,792],"./LightView.ts":[9304,792],"./LockView":[7935,792],"./LockView.ts":[7935,792],"./SceneView":[7204,792],"./SceneView.ts":[7204,792],"./SwitchView":[2464,792],"./SwitchView.ts":[2464,792],"./VacuumView":[8499,792],"./VacuumView.ts":[8499,792]};function s(e){if(!i.o(n,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=n[e],s=t[0];return i.e(t[1]).then((()=>i(s)))}s.keys=()=>Object.keys(n),s.id=9555,e.exports=s},9589:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>o});var n=i(1241),s=i(8222);class a extends s.default{static getDefaultConfig(){return{type:"template",icon:"mdi:window-open",icon_color:"cyan",content:n.O.getCountTemplate("cover","search","(open|opening|closing)"),tap_action:{action:"none"},hold_action:{action:"navigate",navigation_path:"covers"}}}constructor(e){super(),this.configuration={...this.configuration,...a.getDefaultConfig(),...e}}}const o=a},9879:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});var n=i(4818);class s extends n.default{static getDefaultConfig(){return{type:"custom:mushroom-media-player-card",use_media_info:!0,media_controls:["on_off","play_pause_stop"],show_volume_level:!0,volume_controls:["volume_mute","volume_set","volume_buttons"]}}constructor(e,t){super(e),this.configuration={...this.configuration,...s.getDefaultConfig(),...t}}}const a=s},9908:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>r});var n=i(1241),s=i(8222),a=i(2682);class o extends s.default{static getDefaultConfig(){return{type:"template",icon:"mdi:dip-switch",icon_color:"blue",content:n.O.getCountTemplate("switch","eq","on"),tap_action:{action:"perform-action",perform_action:"switch.turn_off",target:{entity_id:new a.A(n.O.entities).whereDomain("switch").getValuesByProperty("entity_id")}},hold_action:{action:"navigate",navigation_path:"switches"}}}constructor(e){super(),this.configuration={...this.configuration,...o.getDefaultConfig(),...e}}}const r=o}},n={};function s(e){var t=n[e];if(void 0!==t)return t.exports;var a=n[e]={exports:{}};return i[e](a,a.exports,s),a.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(i,n){if(1&n&&(i=this(i)),8&n)return i;if("object"==typeof i&&i){if(4&n&&i.__esModule)return i;if(16&n&&"function"==typeof i.then)return i}var a=Object.create(null);s.r(a);var o={};e=e||[null,t({}),t([]),t(t)];for(var r=2&n&&i;"object"==typeof r&&!~e.indexOf(r);r=t(r))Object.getOwnPropertyNames(r).forEach((e=>o[e]=()=>i[e]));return o.default=()=>i,s.d(a,o),a},s.d=(e,t)=>{for(var i in t)s.o(t,i)&&!s.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},s.e=()=>Promise.resolve(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e=s(4137),t=s(5982),i=s(1241),n=s(2700),a=s(3007),o=s(6964),r=s(2682),c=s(2737);class l extends HTMLTemplateElement{static async generateDashboard(e){await i.O.initialize(e);const t=[],r=i.O.getExposedNames("view").filter(n.uS).map((async e=>{try{const t=(0,a.p)(`${e}View`),n=new(0,(await s(9555)(`./${t}`)).default)(i.O.strategyOptions.views[e]),o=await n.getView();if(o.cards.length)return o}catch(t){(0,o.OG)(o.nR,`Error importing ${e} view!`,t)}return null})),c=(await Promise.all(r)).filter(Boolean);return t.push(...c),t.push(...i.O.areas.map((e=>({title:e.name,path:e.area_id,subview:!0,strategy:{type:"custom:mushroom-strategy",options:{area:e}}})))),i.O.strategyOptions.extra_views&&t.push(...i.O.strategyOptions.extra_views),{views:t}}static async generateView(l){const u=i.O.getExposedNames("domain"),d=l.view.strategy?.options?.area??{},f=new r.A(i.O.entities).whereAreaId(d.area_id).toList(),g=[...d.extra_cards??[]],h={area_id:[d.area_id]},p=u.filter(n.dQ).map((async n=>{const l=(0,a.p)(n+"Card"),u=new r.A(f).whereDomain(n).where((e=>!("switch"===n&&e.entity_id.endsWith("_stateful_scene")))).toList();if(!u.length)return null;const d=new e.default({entity_id:u.map((e=>e.entity_id))},{...i.O.strategyOptions.domains._,...i.O.strategyOptions.domains[n]}).createCard();try{const e=(await s(2560)(`./${l}`)).default;if("sensor"===n){let e=u.filter((e=>i.O.hassStates[e.entity_id]?.attributes.unit_of_measurement)).map((e=>{const n={...e.device_id&&i.O.strategyOptions.card_options?.[e.device_id],...i.O.strategyOptions.card_options?.[e.entity_id],type:"custom:mini-graph-card",entities:[e.entity_id]};return new t.default(e,n).getCard()}));return e.length?(e=(0,c.P)(e,i.O.strategyOptions.domains[n].stack_count??i.O.strategyOptions.domains._.stack_count),{type:"vertical-stack",cards:[d,...e]}):null}let a=u.map((t=>{const n={...t.device_id&&i.O.strategyOptions.card_options?.[t.device_id],...i.O.strategyOptions.card_options?.[t.entity_id]};return new e(t,n).getCard()}));return a=(0,c.P)(a,i.O.strategyOptions.domains[n].stack_count??i.O.strategyOptions.domains._.stack_count),a.length?{type:"vertical-stack",cards:[d,...a]}:null}catch(e){return(0,o.OG)(o.nR,`Error creating card configurations for domain ${n}`,e),null}})),m=(await Promise.all(p)).filter(Boolean);if(g.push(...m),!i.O.strategyOptions.domains.default.hidden){const t=new r.A(f).not().where((e=>(0,n.dQ)(e.entity_id.split(".",1)[0]))).toList();if(t.length)try{const n=(await Promise.resolve().then(s.bind(s,4486))).default;let a=t.map((e=>new n(e,i.O.strategyOptions.card_options?.[e.entity_id]).getCard()));const o=new e.default(h,{...i.O.strategyOptions.domains._,...i.O.strategyOptions.domains.default}).createCard();a.length&&(a=(0,c.P)(a,i.O.strategyOptions.domains.default.stack_count??i.O.strategyOptions.domains._.stack_count),g.push({type:"vertical-stack",cards:[o,...a]}))}catch(e){(0,o.OG)(o.nR,"Error creating card configurations for domain `miscellaneous`",e)}}return{cards:g}}}customElements.define("ll-strategy-mushroom-strategy",l),console.info("%c Mushroom Strategy %c ".concat("v2.3.3-alpha.1"," "),"color: white; background: coral; font-weight: 700;","color: coral; background: white; font-weight: 700;")})()})(); \ No newline at end of file +(()=>{var e,t,i={245:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>o});var n=i(1241),r=i(5987),s=i(1122);class a extends s.default{static getDefaultConfig(){return{title:(0,r.k)("fan.fans"),path:"fans",icon:"mdi:fan",subview:!1,headerCardConfiguration:{iconOn:"mdi:fan",iconOff:"mdi:fan-off",onService:"fan.turn_on",offService:"fan.turn_off"}}}static getViewHeaderCardConfig(){return{title:(0,r.k)("fan.all_fans"),subtitle:`${n.O.getCountTemplate(a.domain,"eq","on")} ${(0,r.k)("fan.fans")} `+(0,r.k)("generic.on")}}constructor(e){super(),this.initializeViewConfig(a.getDefaultConfig(),e,a.getViewHeaderCardConfig())}}a.domain="fan";const o=a},845:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});var n=i(4818);class r extends n.default{static getDefaultConfig(){return{type:"custom:mushroom-person-card",layout:"vertical",primary_info:"none",secondary_info:"none",icon_type:"entity-picture"}}constructor(e,t){super(e),this.configuration={...this.configuration,...r.getDefaultConfig(),...t}}}const s=r},1122:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>c});var n=i(4137),r=i(1241),s=i(3007),a=i(6964),o=i(2682);const c=class{get domain(){return this.constructor.domain}constructor(){this.baseConfiguration={icon:"mdi:view-dashboard",subview:!1},this.viewHeaderCardConfiguration={cards:[],type:""},r.O.initialized||(0,a.OG)(a.ZY,"Registry not initialized!")}async createCardConfigurations(){const e=[],t=(0,s.p)(this.domain+"Card"),a=(await i(2560)(`./${t}`)).default,c=new o.A(r.O.entities).whereDomain(this.domain).where((e=>!e.entity_id.endsWith("_stateful_scene"))).toList();for(const t of r.O.areas){const i=[];let s={area_id:[t.area_id]};const l=new o.A(c).whereAreaId(t.area_id).toList();if("undisclosed"===t.area_id&&(s={entity_id:l.map((e=>e.entity_id))}),i.push(...l.map((e=>new a(e,r.O.strategyOptions.card_options?.[e.entity_id]).getCard()))),i.length){const r="headerCardConfiguration"in this.baseConfiguration?this.baseConfiguration.headerCardConfiguration:{};i.unshift(new n.default(s,{title:t.name,...r}).createCard()),e.push({type:"vertical-stack",cards:i})}}return this.viewHeaderCardConfiguration.cards.length&&e.length&&e.unshift(this.viewHeaderCardConfiguration),e}async getView(){return{...this.baseConfiguration,cards:await this.createCardConfigurations()}}getDomainTargets(){return{entity_id:r.O.entities.filter((e=>e.entity_id.startsWith(this.domain+"."))).map((e=>e.entity_id))}}initializeViewConfig(e,t={},i){this.baseConfiguration={...this.baseConfiguration,...e,...t},this.baseConfiguration.headerCardConfiguration={showControls:r.O.strategyOptions.domains[this.domain]?.showControls??r.O.strategyOptions.domains._.showControls},this.viewHeaderCardConfiguration=new n.default(this.getDomainTargets(),{...this.baseConfiguration.headerCardConfiguration,...i}).createCard()}}},1151:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});var n=i(5982);class r extends n.default{static getDefaultConfig(){return{type:"custom:mushroom-entity-card",icon:"mdi:power-cycle",icon_color:"green"}}constructor(e,t){super(e),this.configuration={...this.configuration,...r.getDefaultConfig(),...t}}}const s=r},1216:(e,t,i)=>{var n={"./AbstractChip":[8222,792],"./AbstractChip.ts":[8222,792],"./ClimateChip":[7757,792],"./ClimateChip.ts":[7757,792],"./CoverChip":[9589,792],"./CoverChip.ts":[9589,792],"./FanChip":[1867,792],"./FanChip.ts":[1867,792],"./LightChip":[3122,792],"./LightChip.ts":[3122,792],"./SwitchChip":[9908,792],"./SwitchChip.ts":[9908,792],"./WeatherChip":[1778,792],"./WeatherChip.ts":[1778,792]};function r(e){if(!i.o(n,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=n[e],r=t[0];return i.e(t[1]).then((()=>i(r)))}r.keys=()=>Object.keys(n),r.id=1216,e.exports=r},1241:(e,t,i)=>{"use strict";i.d(t,{O:()=>l});var n=i(4744),r=i.n(n),s=i(2700),a=i(6964),o=i(5987),c=i(2682);class l{constructor(){}static get strategyOptions(){return l._strategyOptions}static get areas(){return l._areas}static get devices(){return l._devices}static get entities(){return l._entities}static get hassStates(){return l._hassStates}static get initialized(){return l._initialized}static async initialize(e){(0,o.A)(e.hass),l._hassStates=e.hass.states;const{ConfigurationDefaults:t}=await Promise.resolve().then(i.bind(i,7688));try{l._strategyOptions=r()(t,e.config?.strategy?.options??{})}catch(e){(0,a.OG)(a.ZY,"Error importing strategy options!",e)}(0,a.Ux)(l.strategyOptions.debug?a.ZY:a.QC);try{[l._entities,l._devices,l._areas]=await Promise.all([e.hass.callWS({type:"config/entity_registry/list"}),e.hass.callWS({type:"config/device_registry/list"}),e.hass.callWS({type:"config/area_registry/list"})])}catch(e){(0,a.OG)(a.ZY,"Error importing Home Assistant registries!",e)}l._strategyOptions.extra_views.map((e=>({...e,subview:!1}))),l._entities=new c.A(l.entities).not().whereEntityCategory("config").not().whereEntityCategory("diagnostic").isNotHidden().whereDisabledBy(null).orderBy(["name","original_name"],"asc").toList(),l._entities=l.entities.map((e=>({...e,area_id:e.area_id??"undisclosed"}))),l._devices=new c.A(l.devices).isNotHidden().whereDisabledBy(null).orderBy(["name_by_user","name"],"asc").toList(),l._devices=l.devices.map((e=>({...e,area_id:e.area_id??"undisclosed"}))),l.strategyOptions.areas._?.hidden?l._areas=[]:(l.strategyOptions.areas.undisclosed?.hidden||l.areas.push(t.areas.undisclosed),l._areas=l.areas.map((e=>({...e,...l.strategyOptions.areas._,...l.strategyOptions.areas?.[e.area_id]}))),l.strategyOptions.areas.undisclosed.area_id="undisclosed",l.strategyOptions.areas.undisclosed.type="default",l._areas=new c.A(l.areas).isNotHidden().orderBy(["order","name"],"asc").toList()),(()=>{const e=Object.entries(l.strategyOptions.views);l.strategyOptions.views=Object.fromEntries(e.sort((([e,t],[i,n])=>(t.order??1/0)-(n.order??1/0)||(t.title??"").localeCompare(n.title??""))))})(),(()=>{const e=Object.entries(l.strategyOptions.domains);l.strategyOptions.domains=Object.fromEntries(e.sort((([,e],[,t])=>(0,s.vv)(e)&&(0,s.vv)(t)?(e.order??1/0)-(t.order??1/0)||(e.title??"").localeCompare(t.title??""):0)))})(),l.strategyOptions.extra_views.sort(((e,t)=>(e.order??1/0)-(t.order??1/0)||(e.title??"").localeCompare(t.title??""))),l._initialized=!0}static getCountTemplate(e,t,i){const n=[];return l.initialized?(n.push(...new c.A(l.entities).whereDomain(e).where((e=>!e.entity_id.endsWith("_stateful_scene"))).toList().map((e=>`states['${e.entity_id}']`))),`{% set entities = [${n}] %}\n {{ entities\n | selectattr('state','${t}','${i}')\n | selectattr('state','ne','unavailable')\n | selectattr('state','ne','unknown')\n | list\n | count\n }}`):((0,a.OG)(a.br,"Registry not initialized!"),"?")}static getExposedNames(e){if("chip"===e)return Object.entries(l.strategyOptions.chips).filter((([e,t])=>!0===t)).map((([e])=>e.split("_")[0]));const t=l.strategyOptions[`${e}s`];return Object.keys(t).filter((e=>"_"!==e&&"default"!==e&&!t[e].hidden))}}l._areas=[],l._initialized=!1},1255:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>o});var n=i(1241),r=i(5987),s=i(1122);class a extends s.default{static getDefaultConfig(){return{title:(0,r.k)("camera.cameras"),path:"cameras",icon:"mdi:cctv",subview:!1,headerCardConfiguration:{showControls:!1}}}static getViewHeaderCardConfig(){return{title:(0,r.k)("camera.all_cameras"),subtitle:`${n.O.getCountTemplate(a.domain,"ne","off")} ${(0,r.k)("camera.cameras")} `+(0,r.k)("generic.busy")}}constructor(e){super(),this.initializeViewConfig(a.getDefaultConfig(),e,a.getViewHeaderCardConfig())}}a.domain="camera";const o=a},1778:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});var n=i(8222);class r extends n.default{static getDefaultConfig(e){return{type:"weather",entity:e,show_temperature:!0,show_conditions:!0}}constructor(e,t){super(),this.configuration={...this.configuration,...r.getDefaultConfig(e),...t}}}const s=r},1810:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});var n=i(7212);class r extends n.default{static getDefaultConfig(){return{type:"custom:mushroom-select-card",icon:void 0}}constructor(e,t){super(e),this.configuration={...this.configuration,...r.getDefaultConfig(),...t}}}const s=r},1867:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>o});var n=i(1241),r=i(8222),s=i(2682);class a extends r.default{static getDefaultConfig(){return{type:"template",icon:"mdi:fan",icon_color:"green",content:n.O.getCountTemplate("fan","eq","on"),tap_action:{action:"perform-action",perform_action:"fan.turn_off",target:{entity_id:new s.A(n.O.entities).whereDomain("fan").getValuesByProperty("entity_id")}},hold_action:{action:"navigate",navigation_path:"fans"}}}constructor(e){super(),this.configuration={...this.configuration,...a.getDefaultConfig(),...e}}}const o=a},2137:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});var n=i(4818);class r extends n.default{static getDefaultConfig(){return{type:"custom:mushroom-number-card",icon:void 0}}constructor(e,t){super(e),this.configuration={...this.configuration,...r.getDefaultConfig(),...t}}}const s=r},2464:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>o});var n=i(1241),r=i(5987),s=i(1122);class a extends s.default{static getDefaultConfig(){return{title:(0,r.k)("switch.switches"),path:"switches",icon:"mdi:dip-switch",subview:!1,headerCardConfiguration:{iconOn:"mdi:power-plug",iconOff:"mdi:power-plug-off",onService:"switch.turn_on",offService:"switch.turn_off"}}}static getViewHeaderCardConfig(){return{title:(0,r.k)("switch.all_switches"),subtitle:`${n.O.getCountTemplate(a.domain,"eq","on")} ${(0,r.k)("switch.switches")} `+(0,r.k)("generic.on")}}constructor(e){super(),this.initializeViewConfig(a.getDefaultConfig(),e,a.getViewHeaderCardConfig())}}a.domain="switch";const o=a},2560:(e,t,i)=>{var n={"./AbstractCard":[4818],"./AbstractCard.ts":[4818],"./AreaCard":[4301,792],"./AreaCard.ts":[4301,792],"./BinarySensorCard":[1151,792],"./BinarySensorCard.ts":[1151,792],"./CameraCard":[2723,792],"./CameraCard.ts":[2723,792],"./ClimateCard":[8721,792],"./ClimateCard.ts":[8721,792],"./CoverCard":[8033,792],"./CoverCard.ts":[8033,792],"./FanCard":[2667,792],"./FanCard.ts":[2667,792],"./HaAreaCard":[9042,792],"./HaAreaCard.ts":[9042,792],"./HeaderCard":[4137],"./HeaderCard.ts":[4137],"./InputSelectCard":[1810,792],"./InputSelectCard.ts":[1810,792],"./LightCard":[8254,792],"./LightCard.ts":[8254,792],"./LockCard":[6555,792],"./LockCard.ts":[6555,792],"./MediaPlayerCard":[9879,792],"./MediaPlayerCard.ts":[9879,792],"./MiscellaneousCard":[4486,792],"./MiscellaneousCard.ts":[4486,792],"./NumberCard":[2137,792],"./NumberCard.ts":[2137,792],"./PersonCard":[845,792],"./PersonCard.ts":[845,792],"./SceneCard":[2858,792],"./SceneCard.ts":[2858,792],"./SelectCard":[7212,792],"./SelectCard.ts":[7212,792],"./SensorCard":[5982],"./SensorCard.ts":[5982],"./SwitchCard":[3708,792],"./SwitchCard.ts":[3708,792],"./VacuumCard":[7430,792],"./VacuumCard.ts":[7430,792],"./ValveCard":[8868,792],"./ValveCard.ts":[8868,792]};function r(e){if(!i.o(n,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=n[e],r=t[0];return Promise.all(t.slice(1).map(i.e)).then((()=>i(r)))}r.keys=()=>Object.keys(n),r.id=2560,e.exports=r},2667:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});var n=i(4818);class r extends n.default{static getDefaultConfig(){return{type:"custom:mushroom-fan-card",icon:void 0,show_percentage_control:!0,show_oscillate_control:!0,icon_animation:!0}}constructor(e,t){super(e),this.configuration={...this.configuration,...r.getDefaultConfig(),...t}}}const s=r},2682:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var n=i(1241),r=i(6964);class s{constructor(e){this.filters=[],this.invertNext=!1,this.entries=e,this.entryIdentifier=0===e.length||"entity_id"in e[0]?"entity_id":"floor_id"in e[0]?"area_id":"id"}not(){return this.invertNext=!this.invertNext,this}resetFilters(){return this.filters=[],this.invertNext=!1,this}where(e){return this.filters.push(this.checkInversion(e)),this}whereAreaId(e,t=!0){return this.filters.push(this.checkInversion((i=>{let r;const s=i;return t&&s.device_id&&(r=n.O.devices.find((e=>e.id===s.device_id))?.area_id),void 0===e?void 0===i.area_id&&void 0===r:"undisclosed"!==i.area_id&&i.area_id?i.area_id===e:r===e}))),this}whereNameContains(e){const t=e.toLowerCase();return this.filters.push(this.checkInversion((e=>{const i=e;return[i.name,i.original_name,i.name_by_user].filter((e=>"string"==typeof e)).some((e=>e.toLowerCase().includes(t)))}))),this}whereDomain(e){const t=e+".";return this.filters.push(this.checkInversion((e=>"entity_id"in e&&e.entity_id.startsWith(t)))),this}whereFloorId(e){return this.filters.push(this.checkInversion((t=>{const i="floor_id"in t;return void 0===e?!i:i&&t.floor_id===e}))),this}whereDeviceId(e){return this.filters.push(this.checkInversion((t=>{const i="id"in t,n="device_id"in t;return void 0===e?!i&&!n:i&&t.id===e||n&&t.device_id===e}))),this}whereEntityId(e){return this.filters.push(this.checkInversion((t=>void 0===e?!("entity_id"in t):"entity_id"in t&&t.entity_id===e))),this}whereDisabledBy(e){return this.filters.push(this.checkInversion((t=>{const i="disabled_by"in t;return void 0===e?!i:i&&t.disabled_by===e}))),this}whereHiddenBy(e){return this.filters.push(this.checkInversion((t=>{const i="hidden_by"in t;return void 0===e?!i:i&&t.hidden_by===e}))),this}isNotHidden(e=!0){return this.filters.push(this.checkInversion((t=>{const i="hidden_by"in t&&t.hidden_by;if(!e)return!i;const r=t[this.entryIdentifier],s="area_id"===this.entryIdentifier?{...n.O.strategyOptions.areas._,...n.O.strategyOptions.areas[r]}:n.O.strategyOptions.card_options?.[r];return!(i||!0===s?.hidden)}))),this}whereEntityCategory(e){const t=this.invertNext;return this.invertNext=!1,this.filters.push((i=>{const r="entity_category"in i?i.entity_category:void 0,s="string"==typeof r?n.O.strategyOptions?.domains?._?.[`hide_${r}_entities`]:void 0;return!0!==s&&(!1===s&&r===e||(t?r!==e:r===e))})),this}orderBy(e,t="asc"){const i=(e,t)=>{for(const i of t){const t=e[i];if(null!=t)return t}},n=[...this.entries].sort(((n,r)=>{const s=i(n,e),a=i(r,e);if(s===a)return 0;const o="asc"===t?1:-1;return null==s?o:null==a?-o:"string"==typeof s&&"string"==typeof a?s.localeCompare(a)*o:(sii>=t)),this}toList(){const e=new s(this.entries);return e.filters=[...this.filters],e.entries.filter(((t,i)=>e.filters.every((e=>e(t,i)))))}getValuesByProperty(e){return this.toList().map((t=>t[e])).filter((e=>void 0!==e))}first(){const e=new s(this.entries);return e.filters=[...this.filters],e.entries.find(((t,i)=>e.filters.every((e=>e(t,i)))))}single(){const e=new s(this.entries);e.filters=[...this.filters];const t=e.entries.filter(((t,i)=>e.filters.every((e=>e(t,i)))));if(1===t.length)return t[0];(0,r.OG)(r.br,`Expected a single element, but found ${t.length}.`)}count(){const e=new s(this.entries);return e.filters=[...this.filters],e.entries.filter(((t,i)=>e.filters.every((e=>e(t,i))))).length}checkInversion(e){return this.invertNext?(this.invertNext=!1,t=>!e(t)):e}}const a=s},2700:(e,t,i)=>{"use strict";i.d(t,{dQ:()=>u,eq:()=>o,ln:()=>d,uS:()=>l,vv:()=>a});const n=["_","binary_sensor","camera","climate","cover","default","fan","input_select","light","lock","media_player","number","scene","select","sensor","switch","vacuum"],r=["camera","climate","cover","fan","home","light","lock","scene","switch","vacuum"],s=["light","fan","cover","switch","climate","weather"];function a(e){return e&&("order"in e||"title"in e||"name"in e)}function o(e){return!!e&&("perform-action"===e.action||"call-service"===e.action)&&"perform_action"in e}function c(e,t){return t.includes(e)}function l(e){return c(e,r)}function u(e){return c(e,n)}function d(e){return c(e,s)}},2723:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});var n=i(4818);class r extends n.default{static getDefaultConfig(){return{entity:"",type:"picture-entity",show_name:!1,show_state:!1,camera_view:"live"}}constructor(e,t){super(e),this.configuration={...this.configuration,...r.getDefaultConfig(),...t}}}const s=r},2737:(e,t,i)=>{"use strict";function n(e,t){const i=(e,t)=>{const i=[];for(let n=0;nn})},2858:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>c});var n=i(1241),r=i(4818),s=i(3708),a=i(2700);class o extends r.default{static getDefaultConfig(){return{type:"custom:mushroom-entity-card",tap_action:{action:"perform-action",perform_action:"scene.turn_on",target:{}}}}constructor(e,t){const i=e.entity_id.split(".").pop(),r=n.O.entities.find((e=>e.entity_id===`switch.${i}_stateful_scene`));if(super(r??e),r)return void(this.configuration=new s.default(r).getCard());const c=o.getDefaultConfig();(0,a.eq)(c.tap_action)&&(c.tap_action.target={entity_id:e.entity_id}),c.icon=n.O.hassStates[e.entity_id]?.attributes.icon??c.icon,this.configuration={...this.configuration,...c,...t}}}const c=o},3007:(e,t,i)=>{"use strict";function n(e){return e.replace(/^([a-z])|([-_][a-z])/g,(e=>e.toUpperCase().replace(/[-_]/g,"")))}function r(e){if("function"==typeof structuredClone)try{return structuredClone(e)}catch{}try{return JSON.parse(JSON.stringify(e))}catch{return e}}i.d(t,{G:()=>r,p:()=>n})},3122:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>o});var n=i(1241),r=i(8222),s=i(2682);class a extends r.default{static getDefaultConfig(){return{type:"template",icon:"mdi:lightbulb-group",icon_color:"amber",content:n.O.getCountTemplate("light","eq","on"),tap_action:{action:"perform-action",perform_action:"light.turn_off",target:{entity_id:new s.A(n.O.entities).whereDomain("light").getValuesByProperty("entity_id")}},hold_action:{action:"navigate",navigation_path:"lights"}}}constructor(e){super(),this.configuration={...this.configuration,...a.getDefaultConfig(),...e}}}const o=a},3708:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});var n=i(4818);class r extends n.default{static getDefaultConfig(){return{type:"custom:mushroom-entity-card",icon:void 0,tap_action:{action:"toggle"}}}constructor(e,t){super(e),this.configuration={...this.configuration,...r.getDefaultConfig(),...t}}}const s=r},4137:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>r});class n{static getDefaultConfig(){return{type:"custom:mushroom-title-card",iconOn:"mdi:power-on",iconOff:"mdi:power-off",onService:"none",offService:"none"}}constructor(e,t){this.target=e,this.configuration={...n.getDefaultConfig(),...t}}createCard(){const e=[{type:"custom:mushroom-title-card",title:this.configuration.title,subtitle:this.configuration.subtitle}];return this.configuration.showControls&&e.push({type:"horizontal-stack",cards:[{type:"custom:mushroom-template-card",icon:this.configuration.iconOff,layout:"vertical",icon_color:"red",tap_action:{action:"call-service",service:this.configuration.offService,target:this.target,data:{}}},{type:"custom:mushroom-template-card",icon:this.configuration.iconOn,layout:"vertical",icon_color:"amber",tap_action:{action:"call-service",service:this.configuration.onService,target:this.target,data:{}}}]}),{type:"horizontal-stack",cards:e}}}const r=n},4301:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});var n=i(4818);class r extends n.default{static getDefaultConfig(){return{type:"custom:mushroom-template-card",primary:void 0,icon:"mdi:floor-plan",icon_color:"blue",tap_action:{action:"navigate",navigation_path:""},hold_action:{action:"none"}}}constructor(e,t){super(e);const i=r.getDefaultConfig();let n=t;i.primary=e.name,i.icon=e.icon||i.icon,i.tap_action&&"navigation_path"in i.tap_action&&(i.tap_action.navigation_path=e.area_id),n&&(n={...n,type:i.type}),this.configuration={...this.configuration,...i,...n}}}const s=r},4486:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});var n=i(4818);class r extends n.default{static getDefaultConfig(){return{type:"custom:mushroom-entity-card",icon_color:"blue-grey"}}constructor(e,t){super(e),this.configuration={...this.configuration,...r.getDefaultConfig(),...t}}}const s=r},4744:e=>{"use strict";var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===i}(e)}(e)},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?o((i=e,Array.isArray(i)?[]:{}),e,t):e;var i}function r(e,t,i){return e.concat(t).map((function(e){return n(e,i)}))}function s(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function a(e,t){try{return t in e}catch(e){return!1}}function o(e,i,c){(c=c||{}).arrayMerge=c.arrayMerge||r,c.isMergeableObject=c.isMergeableObject||t,c.cloneUnlessOtherwiseSpecified=n;var l=Array.isArray(i);return l===Array.isArray(e)?l?c.arrayMerge(e,i,c):function(e,t,i){var r={};return i.isMergeableObject(e)&&s(e).forEach((function(t){r[t]=n(e[t],i)})),s(t).forEach((function(s){(function(e,t){return a(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,s)||(a(e,s)&&i.isMergeableObject(t[s])?r[s]=function(e,t){if(!t.customMerge)return o;var i=t.customMerge(e);return"function"==typeof i?i:o}(s,i)(e[s],t[s],i):r[s]=n(t[s],i))})),r}(e,i,c):n(i,c)}o.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,i){return o(e,i,t)}),{})};var c=o;e.exports=c},4818:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});var n=i(1241),r=i(6964);const s=class{constructor(e){this.configuration={type:"custom:mushroom-entity-card",icon:"mdi:help-circle"},n.O.initialized||(0,r.OG)(r.ZY,"Registry not initialized!"),this.entity=e}getCard(){return{...this.configuration,entity:"entity_id"in this.entity?this.entity.entity_id:void 0}}}},5982:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});var n=i(4818);class r extends n.default{static getDefaultConfig(){return{type:"custom:mushroom-entity-card",icon:"mdi:information",animate:!0,line_color:"green"}}constructor(e,t){super(e),this.configuration={...this.configuration,...r.getDefaultConfig(),...t}}}const s=r},5987:(e,t,i)=>{"use strict";i.d(t,{A:()=>v,k:()=>y});const n=JSON.parse('{"camera":{"all_cameras":"Alle Kameras","cameras":"Kameras"},"climate":{"all_climates":"Alle Klimaanlagen","climates":"Klimaanlagen"},"cover":{"all_covers":"Alle Abdeckungen","covers":"Abdeckungen"},"fan":{"all_fans":"Alle Ventilatoren","fans":"Ventilatoren"},"generic":{"all":"Alle","areas":"Bereiche","busy":"Beschäftigt","good_afternoon":"Guten Nachmittag","good_evening":"Guten Abend","good_morning":"Guten Morgen","hello":"Hallo","home":"Start","miscellaneous":"Sonstiges","numbers":"Zahlen","off":"Aus","on":"Ein","open":"Offen","unavailable":"Nicht verfügbar","unclosed":"Nicht Geschlossen","undisclosed":"Sonstiges","unknown":"Unbekannt"},"input_select":{"input_selects":"Auswahl-Eingaben"},"light":{"all_lights":"Alle Leuchten","lights":"Leuchten"},"lock":{"locked":"Gesperrt","all_locks":"Alle Schlösser","locks":"Schlösser","unlocked":"Entsperrt"},"media_player":{"media_players":"Wiedergabegeräte"},"scene":{"scenes":"Szenen"},"select":{"selects":"Auswahlen"},"sensor":{"binary":"Binäre","sensors":"Sensoren"},"switch":{"all_switches":"Alle Schalter","switches":"Schalter"},"vacuum":{"all_vacuums":"Alle Staubsauger","vacuums":"Staubsauger"},"valve":{"all_valves":"Alle Ventile","valves":"Ventile","open":"Offen","opening":"Öffnet","closed":"Geschlossen","closing":"Schließt","stopped":"Gestoppt"}}');var r=i.t(n,2);const s=JSON.parse('{"camera":{"all_cameras":"All Cameras","cameras":"Cameras"},"climate":{"all_climates":"All Climates","climates":"Climates"},"cover":{"all_covers":"All Covers","covers":"Covers"},"fan":{"all_fans":"All Fans","fans":"Fans"},"generic":{"all":"All","areas":"Areas","busy":"Busy","good_afternoon":"Good afternoon","good_evening":"Good evening","good_morning":"Good morning","hello":"Hello","home":"Home","miscellaneous":"Miscellaneous","numbers":"Numbers","off":"Off","on":"On","open":"Open","unavailable":"Unavailable","unclosed":"Unclosed","undisclosed":"Other","unknown":"Unknown"},"input_select":{"input_selects":"Input Selects"},"light":{"all_lights":"All Lights","lights":"Lights"},"lock":{"all_locks":"All Locks","locked":"Locked","locks":"Locks","unlocked":"Unlocked"},"media_player":{"media_players":"Media Players"},"scene":{"scenes":"Scenes"},"select":{"selects":"Selects"},"sensor":{"binary":"Binary","sensors":"Sensors"},"switch":{"all_switches":"All Switches","switches":"Switches"},"vacuum":{"all_vacuums":"All Vacuums","vacuums":"Vacuums"},"valve":{"all_valves":"All Valves","valves":"Valves","open":"Open","opening":"Opening","closed":"Closed","closing":"Closing","stopped":"Stopped"}}');var a=i.t(s,2);const o=JSON.parse('{"camera":{"all_cameras":"Todas las Cámaras","cameras":"Cámaras"},"climate":{"all_climates":"Todos los Termostatos","climates":"Termostatos"},"cover":{"all_covers":"Todas las Cubiertas","covers":"Cubiertas"},"fan":{"all_fans":"Todos los Ventiladores","fans":"Ventiladores"},"generic":{"all":"Todo","areas":"Áreas","busy":"Ocupado","good_afternoon":"Buenas tardes","good_evening":"Buenas noches","good_morning":"Buenos días","hello":"Hola","home":"Inicio","miscellaneous":"Varios","numbers":"Números","off":"Apagado","on":"Encendido","open":"Abierto","unavailable":"No Disponible","unclosed":"Sin Cerrar","undisclosed":"Varios","unknown":"Desconocido"},"input_select":{"input_selects":"Selecciones de Entrada"},"light":{"all_lights":"Todas las Luces","lights":"Luces"},"lock":{"all_locks":"Todas las Candados","locked":"Locked","locks":"Candados","unlocked":"Desbloqueado"},"media_player":{"media_players":"Reproductores Multimedia"},"scene":{"scenes":"Scenas"},"select":{"selects":"Seleccionar"},"sensor":{"binary":"Binario","sensors":"Sensores"},"switch":{"all_switches":"Todos los Apagadores","switches":"Apagadores"},"vacuum":{"all_vacuums":"Todas las Aspiradoras","vacuums":"Aspiradoras"},"valve":{"all_valves":"Todas las válvulas","valves":"Válvulas","open":"Abierta","opening":"Abriendo","closed":"Cerrada","closing":"Cerrando","stopped":"Detenida"}}');var c=i.t(o,2);const l=JSON.parse('{"camera":{"all_cameras":"Alle Cameras","cameras":"Cameras"},"climate":{"all_climates":"Alle Klimaatregelingen","climates":"Klimaatregelingen"},"cover":{"all_covers":"Alle Bedekkingen","covers":"Bedekkingen"},"fan":{"all_fans":"Alle Ventilatoren","fans":"Ventilatoren"},"generic":{"all":"Alle","areas":"Ruimtes","busy":"Bezig","good_afternoon":"Goedemiddag","good_evening":"Goedeavond","good_morning":"Goedemorgen","hello":"Hallo","home":"Start","miscellaneous":"Overige","numbers":"Nummers","off":"Uit","on":"Aan","open":"Open","unavailable":"Onbeschikbaar","unclosed":"Niet Gesloten","undisclosed":"Overige","unknown":"Onbekend"},"input_select":{"input_selects":"Lijsten"},"light":{"all_lights":"Alle Lampen","lights":"Lampen"},"lock":{"all_locks":"Alle Sloten","locked":"Vergrendeld","locks":"Sloten","unlocked":"Ontgrendeld"},"media_player":{"media_players":"Mediaspelers"},"scene":{"scenes":"Scenes"},"select":{"selects":"Statuslijsten"},"sensor":{"binary":"Binaire","sensors":"Sensoren"},"switch":{"all_switches":"Alle Schakelaars","switches":"Schakelaars"},"vacuum":{"all_vacuums":"Alle Afzuiging","vacuums":"Afzuiging"},"valve":{"all_valves":"Alle kleppen","valves":"Kleppen","open":"Open","opening":"Openen","closed":"Gesloten","closing":"Sluiten","stopped":"Gestopt"}}');var u=i.t(l,2);const d=JSON.parse('{"camera":{"all_cameras":"Todas as câmeras","cameras":"Câmeras"},"climate":{"all_climates":"Todos os climatizadores","climates":"Climatizadores"},"cover":{"all_covers":"Todas as persianas","covers":"Persianas"},"fan":{"all_fans":"Todos os ventiladores","fans":"Ventiladores"},"generic":{"all":"Todos","areas":"Áreas","busy":"Ocupado","good_afternoon":"Boa tarde","good_evening":"Boa noite","good_morning":"Bom dia","hello":"Olá","home":"Início","miscellaneous":"Variados","numbers":"Números","off":"Desligado","on":"Ligado","open":"Aberto","unavailable":"Indisponível","unclosed":"Não fechado","undisclosed":"Outro","unknown":"Desconhecido"},"input_select":{"input_selects":"Seleção de entrada"},"light":{"all_lights":"Todas as luzes","lights":"Luzes"},"lock":{"all_locks":"Todas as fechaduras","locked":"Travado","locks":"Fechaduras","unlocked":"Destravado"},"media_player":{"media_players":"Reprodutores de mídia"},"scene":{"scenes":"Cenas"},"select":{"selects":"Seleção"},"sensor":{"binary":"Binário","sensors":"Sensores"},"switch":{"all_switches":"Todos os interruptores","switches":"Interruptores"},"vacuum":{"all_vacuums":"Todos os aspiradores","vacuums":"Aspiradores"},"valve":{"all_valves":"Todas as válvulas","valves":"Válvulas","open":"Aberto","opening":"Abrindo","closed":"Fechado","closing":"Fechando","stopped":"Parado"}}');var f=i.t(d,2),g=i(6964);const h={de:r,en:a,es:c,nl:u,"pt-BR":f},p="en";function m(e,t){try{return e.split(".").reduce(((e,t)=>e[t]),h[t])}catch{return}}let _;function v(e){const t=e?.locale.language??p;_=e=>m(e,t)??m(e,p)??e}function y(e){return _?_(e):((0,g.OG)(g.br,"localize is not initialized! Call setupCustomLocalize first."),e)}},6555:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});var n=i(4818);class r extends n.default{static getDefaultConfig(){return{type:"custom:mushroom-lock-card",icon:void 0}}constructor(e,t){super(e),this.configuration={...this.configuration,...r.getDefaultConfig(),...t}}}const s=r},6559:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>o});var n=i(1241),r=i(5987),s=i(1122);class a extends s.default{static getDefaultConfig(){return{title:(0,r.k)("climate.climates"),path:"climates",icon:"mdi:thermostat",subview:!1,headerCardConfiguration:{showControls:!1}}}static getViewHeaderCardConfig(){return{title:(0,r.k)("climate.all_climates"),subtitle:`${n.O.getCountTemplate(a.domain,"ne","off")} ${(0,r.k)("climate.climates")} `+(0,r.k)("generic.busy")}}constructor(e){super(),this.initializeViewConfig(a.getDefaultConfig(),e,a.getViewHeaderCardConfig())}}a.domain="climate";const o=a},6964:(e,t,i)=>{"use strict";i.d(t,{OG:()=>g,QC:()=>s,Ux:()=>f,ZY:()=>u,br:()=>c,nR:()=>l,tm:()=>o});var n,r=i(3007);!function(e){e[e.Off=0]="Off",e[e.Debug=1]="Debug",e[e.Info=2]="Info",e[e.Warn=3]="Warn",e[e.Error=4]="Error",e[e.Fatal=5]="Fatal"}(n||(n={}));const{Off:s,Debug:a,Info:o,Warn:c,Error:l,Fatal:u}=n;let d=n.Fatal;function f(e){d=e}function g(e,t,...i){if(d===n.Off||e>d)return;const s="Mushroom Strategy - An error occurred. Check the console (F12) for details.",a=`[${n[e].toUpperCase()}]`,o=i.map(r.G),c=`[at ${function(e){if(!e)return"unknown";const t=e.split("\n").filter(Boolean);for(let e=1;e{"use strict";i.r(t),i.d(t,{default:()=>a});var n=i(5987),r=i(1122);class s extends r.default{static getDefaultConfig(){return{title:(0,n.k)("scene.scenes"),path:"scenes",icon:"mdi:palette",subview:!1,headerCardConfiguration:{showControls:!1}}}static getViewHeaderCardConfig(){return{}}constructor(e){super(),this.initializeViewConfig(s.getDefaultConfig(),e,s.getViewHeaderCardConfig())}}s.domain="scene";const a=s},7212:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});var n=i(4818);class r extends n.default{static getDefaultConfig(){return{type:"custom:mushroom-select-card",icon:void 0}}constructor(e,t){super(e),this.configuration={...this.configuration,...r.getDefaultConfig(),...t}}}const s=r},7430:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});const n=["on_off","start_pause","stop","locate","clean_spot","return_home"];var r=i(4818);class s extends r.default{static getDefaultConfig(){return{type:"custom:mushroom-vacuum-card",icon:void 0,icon_animation:!0,commands:[...n],tap_action:{action:"more-info"}}}constructor(e,t){super(e),this.configuration={...this.configuration,...s.getDefaultConfig(),...t}}}const a=s},7547:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>o});var n=i(1241),r=i(5987),s=i(1122);class a extends s.default{static getDefaultConfig(){return{title:(0,r.k)("cover.covers"),path:"covers",icon:"mdi:window-open",subview:!1,headerCardConfiguration:{iconOn:"mdi:arrow-up",iconOff:"mdi:arrow-down",onService:"cover.open_cover",offService:"cover.close_cover"}}}static getViewHeaderCardConfig(){return{title:(0,r.k)("cover.all_covers"),subtitle:`${n.O.getCountTemplate(a.domain,"search","(open|opening|closing)")} ${(0,r.k)("cover.covers")} ${(0,r.k)("generic.unclosed")}`}}constructor(e){super(),this.initializeViewConfig(a.getDefaultConfig(),e,a.getViewHeaderCardConfig())}}a.domain="cover";const o=a},7688:(e,t,i)=>{"use strict";i.d(t,{ConfigurationDefaults:()=>r});var n=i(5987);const r={areas:{undisclosed:{aliases:[],area_id:"undisclosed",created_at:0,floor_id:null,hidden:!1,humidity_entity_id:null,icon:"mdi:floor-plan",labels:[],modified_at:0,name:(0,n.k)("generic.undisclosed"),picture:null,temperature_entity_id:null}},card_options:{},chips:{weather_entity:"auto",light_count:!0,fan_count:!0,cover_count:!0,switch_count:!0,climate_count:!0,extra_chips:[]},debug:!1,domains:{_:{hide_config_entities:void 0,hide_diagnostic_entities:void 0,showControls:!0},binary_sensor:{title:`${(0,n.k)("sensor.binary")} `+(0,n.k)("sensor.sensors"),showControls:!1,hidden:!1},camera:{title:(0,n.k)("camera.cameras"),showControls:!1,hidden:!1},climate:{title:(0,n.k)("climate.climates"),showControls:!1,hidden:!1},cover:{title:(0,n.k)("cover.covers"),iconOn:"mdi:arrow-up",iconOff:"mdi:arrow-down",onService:"cover.open_cover",offService:"cover.close_cover",hidden:!1},default:{title:(0,n.k)("generic.miscellaneous"),showControls:!1,hidden:!1},fan:{title:(0,n.k)("fan.fans"),iconOn:"mdi:fan",iconOff:"mdi:fan-off",onService:"fan.turn_on",offService:"fan.turn_off",hidden:!1},input_select:{title:(0,n.k)("input_select.input_selects"),showControls:!1,hidden:!1},light:{title:(0,n.k)("light.lights"),iconOn:"mdi:lightbulb",iconOff:"mdi:lightbulb-off",onService:"light.turn_on",offService:"light.turn_off",hidden:!1},lock:{title:(0,n.k)("lock.locks"),showControls:!1,hidden:!1},media_player:{title:(0,n.k)("media_player.media_players"),showControls:!1,hidden:!1},number:{title:(0,n.k)("generic.numbers"),showControls:!1,hidden:!1},scene:{title:(0,n.k)("scene.scenes"),showControls:!1,onService:"scene.turn_on",hidden:!1},select:{title:(0,n.k)("select.selects"),showControls:!1,hidden:!1},sensor:{title:(0,n.k)("sensor.sensors"),showControls:!1,hidden:!1},switch:{title:(0,n.k)("switch.switches"),iconOn:"mdi:power-plug",iconOff:"mdi:power-plug-off",onService:"switch.turn_on",offService:"switch.turn_off",hidden:!1},vacuum:{title:(0,n.k)("vacuum.vacuums"),iconOn:"mdi:robot-vacuum",iconOff:"mdi:robot-vacuum-off",onService:"vacuum.start",offService:"vacuum.stop",hidden:!1}},extra_cards:[],extra_views:[],home_view:{hidden:[]},views:{camera:{order:7,hidden:!1},climate:{order:6,hidden:!1},cover:{order:4,hidden:!1},fan:{order:3,hidden:!1},home:{order:1,hidden:!1},light:{order:2,hidden:!1},lock:{order:10,hidden:!1},scene:{order:9,hidden:!1},switch:{order:5,hidden:!1},vacuum:{order:8,hidden:!1}},quick_access_cards:[]}},7757:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});var n=i(1241),r=i(8222);class s extends r.default{static getDefaultConfig(){return{type:"template",icon:"mdi:thermostat",icon_color:"orange",content:n.O.getCountTemplate("climate","ne","off"),tap_action:{action:"none"},hold_action:{action:"navigate",navigation_path:"climates"}}}constructor(e){super(),this.configuration={...this.configuration,...s.getDefaultConfig(),...e}}}const a=s},7935:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>o});var n=i(1241),r=i(5987),s=i(1122);class a extends s.default{static getDefaultConfig(){return{title:(0,r.k)("locks.locks"),path:"locks",icon:"mdi:lock-open",subview:!1,headerCardConfiguration:{iconOn:"mdi:lock-open",iconOff:"mdi:lock",onService:"lock.lock",offService:"lock.unlock"}}}static getViewHeaderCardConfig(){return{title:(0,r.k)("lock.all_locks"),subtitle:`${n.O.getCountTemplate(a.domain,"ne","locked")} ${(0,r.k)("lock.locks")} `+(0,r.k)("lock.unlocked")}}constructor(e){super(),this.initializeViewConfig(a.getDefaultConfig(),e,a.getViewHeaderCardConfig())}}a.domain="lock";const o=a},8033:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});var n=i(4818);class r extends n.default{static getDefaultConfig(){return{type:"custom:mushroom-cover-card",icon:void 0,show_buttons_control:!0,show_position_control:!0,show_tilt_position_control:!0}}constructor(e,t){super(e),this.configuration={...this.configuration,...r.getDefaultConfig(),...t}}}const s=r},8222:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});var n=i(1241),r=i(6964);const s=class{constructor(){this.configuration={type:"template"},n.O.initialized||(0,r.OG)(r.ZY,"Registry not initialized!")}getChipConfiguration(){return this.configuration}}},8254:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});var n=i(2700),r=i(4818);class s extends r.default{static getDefaultConfig(){return{type:"custom:mushroom-light-card",icon:void 0,show_brightness_control:!0,show_color_control:!0,show_color_temp_control:!0,use_light_color:!0,double_tap_action:{action:"call-service",perform_action:"light.turn_on",target:{entity_id:void 0},data:{rgb_color:[255,255,255]}}}}constructor(e,t){super(e);const i=s.getDefaultConfig();(0,n.eq)(i.double_tap_action)&&(i.double_tap_action.target={entity_id:e.entity_id}),this.configuration={...this.configuration,...i,...t}}}const a=s},8499:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>o});var n=i(1241),r=i(5987),s=i(1122);class a extends s.default{static getDefaultConfig(){return{title:(0,r.k)("vacuum.vacuums"),path:"vacuums",icon:"mdi:robot-vacuum",subview:!1,headerCardConfiguration:{iconOn:"mdi:robot-vacuum",iconOff:"mdi:robot-vacuum-off",onService:"vacuum.start",offService:"vacuum.stop"}}}static getViewHeaderCardConfig(){return{title:(0,r.k)("vacuum.all_vacuums"),subtitle:n.O.getCountTemplate(a.domain,"in","[cleaning, returning]")+` ${(0,r.k)("vacuum.vacuums")} ${(0,r.k)("generic.busy")}`}}constructor(e){super(),this.initializeViewConfig(a.getDefaultConfig(),e,a.getViewHeaderCardConfig())}}a.domain="vacuum";const o=a},8721:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});var n=i(4818);class r extends n.default{static getDefaultConfig(){return{type:"custom:mushroom-climate-card",icon:void 0,hvac_modes:["off","cool","heat","fan_only"],show_temperature_control:!0}}constructor(e,t){super(e),this.configuration={...this.configuration,...r.getDefaultConfig(),...t}}}const s=r},8868:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});var n=i(5987),r=i(4818);class s extends r.default{static getDefaultConfig(){return{type:"custom:mushroom-template-card",icon:"mdi:valve",icon_color:"blue",double_tap_action:{action:"toggle"}}}constructor(e,t){super(e);const i=s.getDefaultConfig();i.entity=e.entity_id,i.icon=e.icon??i.icon,i.primary=e.name??e.original_name??"?",i.secondary=`{% \n set mapping = {\n 'open': '${(0,n.k)("valve.open")}',\n 'opening': '${(0,n.k)("valve.opening")}',\n 'closed': '${(0,n.k)("valve.closed")}',\n 'closing': '${(0,n.k)("valve.closing")}',\n 'stopped': '${(0,n.k)("valve.stopped")}',\n 'unavailable': '${(0,n.k)("generic.unavailable")}'\n }\n %}\n {{ mapping.get(states('${e.entity_id}'), '${(0,n.k)("generic.unknown")}') }}`,this.configuration={...this.configuration,...i,...t}}}const a=s},9031:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>f});var n=i(1241),r=i(2700),s=i(3007),a=i(6964),o=i(5987),c=i(1122),l=i(2682),u=i(2737);class d extends c.default{static getDefaultConfig(){return{title:(0,o.k)("generic.home"),icon:"mdi:home-assistant",path:"home",subview:!1}}constructor(e){super(),this.baseConfiguration={...this.baseConfiguration,...d.getDefaultConfig(),...e}}async createCardConfigurations(){const e=[];let t,i,r;try{[t,i,r]=await Promise.all([this.createChipsSection(),this.createPersonsSection(),this.createAreasSection()])}catch(t){return(0,a.OG)(a.nR,"Error importing created sections!",t),e}return t&&e.push(t),i&&e.push(i),n.O.strategyOptions.home_view.hidden.includes("greeting")||e.push({type:"custom:mushroom-template-card",primary:`{% set time = now().hour %}\n {% if (time >= 18) %}\n ${(0,o.k)("generic.good_evening")},{{user}}!\n {% elif (time >= 12) %}\n ${(0,o.k)("generic.good_afternoon")}, {{user}}!\n {% elif (time >= 6) %}\n ${(0,o.k)("generic.good_morning")}, {{user}}!\n {% else %}\n ${(0,o.k)("generic.hello")}, {{user}}! {% endif %}`,icon:"mdi:hand-wave",icon_color:"orange",tap_action:{action:"none"},double_tap_action:{action:"none"},hold_action:{action:"none"}}),n.O.strategyOptions.quick_access_cards&&e.push(...n.O.strategyOptions.quick_access_cards),r&&e.push(r),n.O.strategyOptions.extra_cards&&e.push(...n.O.strategyOptions.extra_cards),e}async createChipsSection(){if(n.O.strategyOptions.home_view.hidden.includes("chips"))return;const e=[],t=n.O.getExposedNames("chip");let o;const c="auto"===n.O.strategyOptions.chips.weather_entity?n.O.entities.find((e=>e.entity_id.startsWith("weather.")))?.entity_id:n.O.strategyOptions.chips.weather_entity;if(c)try{o=(await Promise.resolve().then(i.bind(i,1778))).default;const t=new o(c);e.push(t.getChipConfiguration())}catch(e){(0,a.OG)(a.nR,"Error importing chip weather!",e)}else(0,a.OG)(a.tm,"Weather chip has no entities available.");for(const c of t){if(!(0,r.ln)(c)||!new l.A(n.O.entities).whereDomain(c).count()){(0,a.OG)(a.tm,`Chip for domain ${c} is unsupported or has no entities available.`);continue}const t=(0,s.p)(c+"Chip");try{o=(await i(1216)(`./${t}`)).default;const n=new o;e.push(n.getChipConfiguration())}catch(e){(0,a.OG)(a.nR,`Error importing chip ${c}!`,e)}}return n.O.strategyOptions.chips?.extra_chips&&e.push(...n.O.strategyOptions.chips.extra_chips),{type:"custom:mushroom-chips-card",alignment:"center",chips:e}}async createPersonsSection(){if(n.O.strategyOptions.home_view.hidden.includes("persons"))return;const e=[],t=(await Promise.resolve().then(i.bind(i,845))).default;return e.push(...n.O.entities.filter((e=>e.entity_id.startsWith("person."))).map((e=>new t(e).getCard()))),{type:"vertical-stack",cards:(0,u.P)(e)}}async createAreasSection(){if(n.O.strategyOptions.home_view.hidden.includes("areas"))return;const e=[];for(const t of n.O.areas){const r=n.O.strategyOptions.areas[t.area_id]?.type??n.O.strategyOptions.areas._?.type??"default";let s;try{s=(await i(2560)(`./${r}`)).default}catch(e){s=(await Promise.resolve().then(i.bind(i,4301))).default,n.O.strategyOptions.debug&&"default"!==r&&(0,a.OG)(a.nR,`Error importing ${r}: card!`,e)}e.push(new s(t,{...n.O.strategyOptions.areas._,...n.O.strategyOptions.areas[t.area_id]}).getCard())}return{type:"vertical-stack",title:n.O.strategyOptions.home_view.hidden.includes("areasTitle")?void 0:(0,o.k)("generic.areas"),cards:(0,u.P)(e,{area:1,"custom:mushroom-template-card":2})}}}d.domain="home";const f=d},9042:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});var n=i(4818);class r extends n.default{static getDefaultConfig(){return{type:"area",area:""}}constructor(e,t){super(e);const i=r.getDefaultConfig();i.area=e.area_id,i.navigation_path=i.area,this.configuration={...this.configuration,...i,...t,type:i.type}}}const s=r},9304:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>o});var n=i(1241),r=i(5987),s=i(1122);class a extends s.default{static getDefaultConfig(){return{title:(0,r.k)("light.lights"),path:"lights",icon:"mdi:lightbulb-group",subview:!1,headerCardConfiguration:{iconOn:"mdi:lightbulb",iconOff:"mdi:lightbulb-off",onService:"light.turn_on",offService:"light.turn_off"}}}static getViewHeaderCardConfig(){return{title:(0,r.k)("light.all_lights"),subtitle:`${n.O.getCountTemplate(a.domain,"eq","on")} ${(0,r.k)("light.lights")} `+(0,r.k)("generic.on")}}constructor(e){super(),this.initializeViewConfig(a.getDefaultConfig(),e,a.getViewHeaderCardConfig())}}a.domain="light";const o=a},9555:(e,t,i)=>{var n={"./AbstractView":[1122,792],"./AbstractView.ts":[1122,792],"./CameraView":[1255,792],"./CameraView.ts":[1255,792],"./ClimateView":[6559,792],"./ClimateView.ts":[6559,792],"./CoverView":[7547,792],"./CoverView.ts":[7547,792],"./FanView":[245,792],"./FanView.ts":[245,792],"./HomeView":[9031,792],"./HomeView.ts":[9031,792],"./LightView":[9304,792],"./LightView.ts":[9304,792],"./LockView":[7935,792],"./LockView.ts":[7935,792],"./SceneView":[7204,792],"./SceneView.ts":[7204,792],"./SwitchView":[2464,792],"./SwitchView.ts":[2464,792],"./VacuumView":[8499,792],"./VacuumView.ts":[8499,792]};function r(e){if(!i.o(n,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=n[e],r=t[0];return i.e(t[1]).then((()=>i(r)))}r.keys=()=>Object.keys(n),r.id=9555,e.exports=r},9589:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});var n=i(1241),r=i(8222);class s extends r.default{static getDefaultConfig(){return{type:"template",icon:"mdi:window-open",icon_color:"cyan",content:n.O.getCountTemplate("cover","search","(open|opening|closing)"),tap_action:{action:"none"},hold_action:{action:"navigate",navigation_path:"covers"}}}constructor(e){super(),this.configuration={...this.configuration,...s.getDefaultConfig(),...e}}}const a=s},9879:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});var n=i(4818);class r extends n.default{static getDefaultConfig(){return{type:"custom:mushroom-media-player-card",use_media_info:!0,media_controls:["on_off","play_pause_stop"],show_volume_level:!0,volume_controls:["volume_mute","volume_set","volume_buttons"]}}constructor(e,t){super(e),this.configuration={...this.configuration,...r.getDefaultConfig(),...t}}}const s=r},9908:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>o});var n=i(1241),r=i(8222),s=i(2682);class a extends r.default{static getDefaultConfig(){return{type:"template",icon:"mdi:dip-switch",icon_color:"blue",content:n.O.getCountTemplate("switch","eq","on"),tap_action:{action:"perform-action",perform_action:"switch.turn_off",target:{entity_id:new s.A(n.O.entities).whereDomain("switch").getValuesByProperty("entity_id")}},hold_action:{action:"navigate",navigation_path:"switches"}}}constructor(e){super(),this.configuration={...this.configuration,...a.getDefaultConfig(),...e}}}const o=a}},n={};function r(e){var t=n[e];if(void 0!==t)return t.exports;var s=n[e]={exports:{}};return i[e](s,s.exports,r),s.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(i,n){if(1&n&&(i=this(i)),8&n)return i;if("object"==typeof i&&i){if(4&n&&i.__esModule)return i;if(16&n&&"function"==typeof i.then)return i}var s=Object.create(null);r.r(s);var a={};e=e||[null,t({}),t([]),t(t)];for(var o=2&n&&i;"object"==typeof o&&!~e.indexOf(o);o=t(o))Object.getOwnPropertyNames(o).forEach((e=>a[e]=()=>i[e]));return a.default=()=>i,r.d(s,a),s},r.d=(e,t)=>{for(var i in t)r.o(t,i)&&!r.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},r.e=()=>Promise.resolve(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e=r(4137),t=r(5982),i=r(1241),n=r(2700),s=r(3007),a=r(6964),o=r(2682),c=r(2737);class l extends HTMLTemplateElement{static async generateDashboard(e){await i.O.initialize(e);const t=[],o=i.O.getExposedNames("view").filter(n.uS).map((async e=>{try{const t=(0,s.p)(`${e}View`),n=new(0,(await r(9555)(`./${t}`)).default)(i.O.strategyOptions.views[e]),a=await n.getView();if(a.cards.length)return a}catch(t){(0,a.OG)(a.nR,`Error importing ${e} view!`,t)}return null})),c=(await Promise.all(o)).filter(Boolean);return t.push(...c),t.push(...i.O.areas.map((e=>({title:e.name,path:e.area_id,subview:!0,strategy:{type:"custom:mushroom-strategy",options:{area:e}}})))),i.O.strategyOptions.extra_views&&t.push(...i.O.strategyOptions.extra_views),{views:t}}static async generateView(l){const u=i.O.getExposedNames("domain"),d=l.view.strategy?.options?.area??{},f=new o.A(i.O.entities).whereAreaId(d.area_id).toList(),g=[...d.extra_cards??[]],h={area_id:[d.area_id]},p=u.filter(n.dQ).map((async n=>{const l=(0,s.p)(n+"Card"),u=new o.A(f).whereDomain(n).where((e=>!("switch"===n&&e.entity_id.endsWith("_stateful_scene")))).toList();if(!u.length)return null;const d=new e.default({entity_id:u.map((e=>e.entity_id))},{...i.O.strategyOptions.domains._,...i.O.strategyOptions.domains[n]}).createCard();try{const e=(await r(2560)(`./${l}`)).default;if("sensor"===n){const e=u.filter((e=>i.O.hassStates[e.entity_id]?.attributes.unit_of_measurement)).map((e=>{const n={...e.device_id&&i.O.strategyOptions.card_options?.[e.device_id],...i.O.strategyOptions.card_options?.[e.entity_id],type:"custom:mini-graph-card",entities:[e.entity_id]};return new t.default(e,n).getCard()}));return e.length?{type:"vertical-stack",cards:[d,...e]}:null}let s=u.map((t=>{const n={...t.device_id&&i.O.strategyOptions.card_options?.[t.device_id],...i.O.strategyOptions.card_options?.[t.entity_id]};return new e(t,n).getCard()}));return"binary_sensor"===n&&(s=(0,c.P)(s)),s.length?{type:"vertical-stack",cards:[d,...s]}:null}catch(e){return(0,a.OG)(a.nR,`Error creating card configurations for domain ${n}`,e),null}})),m=(await Promise.all(p)).filter(Boolean);if(g.push(...m),!i.O.strategyOptions.domains.default.hidden){const t=new o.A(f).not().where((e=>(0,n.dQ)(e.entity_id.split(".",1)[0]))).toList();if(t.length)try{const n=(await Promise.resolve().then(r.bind(r,4486))).default,s=[new e.default(h,i.O.strategyOptions.domains.default).createCard(),...t.map((e=>new n(e,i.O.strategyOptions.card_options?.[e.entity_id]).getCard()))];g.push({type:"vertical-stack",cards:s})}catch(e){(0,a.OG)(a.nR,"Error creating card configurations for domain `miscellaneous`",e)}}return{cards:g}}}customElements.define("ll-strategy-mushroom-strategy",l),console.info("%c Mushroom Strategy %c ".concat("v2.3.2"," "),"color: white; background: coral; font-weight: 700;","color: coral; background: white; font-weight: 700;")})()})(); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 7ef7b63..72bdd5f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,17 +6,17 @@ "packages": { "": { "name": "mushroom-strategy", - "version": "2.3.0-alpha.1", + "version": "2.3.2", "license": "MIT", "dependencies": { "deepmerge": "^4" }, "devDependencies": { - "@typescript-eslint/eslint-plugin": "^8.31.0", - "@typescript-eslint/parser": "^8.31.0", - "eslint": "^9.25.1", - "eslint-config-prettier": "^10.1.2", - "eslint-plugin-prettier": "^5.2.6", + "@typescript-eslint/eslint-plugin": "^8.32.1", + "@typescript-eslint/parser": "^8.32.1", + "eslint": "^9.27.0", + "eslint-config-prettier": "^10.1.5", + "eslint-plugin-prettier": "^5.4.0", "home-assistant-js-websocket": "^9.5.0", "prettier": "^3.5.3", "superstruct": "^2.0.2", @@ -24,7 +24,7 @@ "ts-node": "^10.9.2", "typescript": "^5.8.3", "version-bump-prompt": "^6", - "webpack": "^5.99.7", + "webpack": "^5.99.8", "webpack-cli": "^6.0.1" }, "funding": { @@ -65,9 +65,9 @@ } }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.6.1.tgz", - "integrity": "sha512-KTsJMmobmbrFLe3LDh0PC2FXpcSYJt/MLjlkh/9LEnmKYLSYmT/0EW9JWANjeoemiuZrmogti0tW5Ch+qNUYDw==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz", + "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==", "dev": true, "license": "MIT", "dependencies": { @@ -143,9 +143,9 @@ } }, "node_modules/@eslint/core": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.13.0.tgz", - "integrity": "sha512-yfkgDw1KR66rkT5A8ci4irzDysN7FRpq3ttJolR88OqQikAWqwA8j5VZyas+vjyBNFIJ7MfybJ9plMILI2UrCw==", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.14.0.tgz", + "integrity": "sha512-qIbV0/JZr7iSDjqAc60IqbLdsj9GDt16xQtWD+B78d/HAlvysGdZZ6rpJHGAc2T0FQx1X6thsSPdnoiGKdNtdg==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -204,13 +204,16 @@ } }, "node_modules/@eslint/js": { - "version": "9.25.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.25.1.tgz", - "integrity": "sha512-dEIwmjntEx8u3Uvv+kr3PDeeArL8Hw07H9kyYxCjnM9pBjfEhk6uLXSchxxzgiwtRhhzVzqmUSDFBOi1TuZ7qg==", + "version": "9.27.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.27.0.tgz", + "integrity": "sha512-G5JD9Tu5HJEu4z2Uo4aHY2sLV64B7CDMXxFzqzjl3NKd6RVzSXNoE80jk7Y0lJkTTkjiIhBAqmlYwjuBY3tvpA==", "dev": true, "license": "MIT", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" } }, "node_modules/@eslint/object-schema": { @@ -224,13 +227,13 @@ } }, "node_modules/@eslint/plugin-kit": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.8.tgz", - "integrity": "sha512-ZAoA40rNMPwSm+AeHpCq8STiNAwzWLJuP8Xv4CHIc9wv/PSuExjMrmjfYNj682vW0OOiZ1HKxzvjQr9XZIisQA==", + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.1.tgz", + "integrity": "sha512-0J+zgWxHN+xXONWIyPWKFMgVuJoZuGiIFu8yxk7RJjxkzpGmyja5wRFqZIVtjDVOQpV+Rw0iOAjYPE2eQyjr0w==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@eslint/core": "^0.13.0", + "@eslint/core": "^0.14.0", "levn": "^0.4.1" }, "engines": { @@ -520,21 +523,21 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.31.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.31.0.tgz", - "integrity": "sha512-evaQJZ/J/S4wisevDvC1KFZkPzRetH8kYZbkgcTRyql3mcKsf+ZFDV1BVWUGTCAW5pQHoqn5gK5b8kn7ou9aFQ==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.32.1.tgz", + "integrity": "sha512-6u6Plg9nP/J1GRpe/vcjjabo6Uc5YQPAMxsgQyGC/I0RuukiG1wIe3+Vtg3IrSCVJDmqK3j8adrtzXSENRtFgg==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.31.0", - "@typescript-eslint/type-utils": "8.31.0", - "@typescript-eslint/utils": "8.31.0", - "@typescript-eslint/visitor-keys": "8.31.0", + "@typescript-eslint/scope-manager": "8.32.1", + "@typescript-eslint/type-utils": "8.32.1", + "@typescript-eslint/utils": "8.32.1", + "@typescript-eslint/visitor-keys": "8.32.1", "graphemer": "^1.4.0", - "ignore": "^5.3.1", + "ignore": "^7.0.0", "natural-compare": "^1.4.0", - "ts-api-utils": "^2.0.1" + "ts-api-utils": "^2.1.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -549,17 +552,27 @@ "typescript": ">=4.8.4 <5.9.0" } }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.4.tgz", + "integrity": "sha512-gJzzk+PQNznz8ysRrC0aOkBNVRBDtE1n53IqyqEf3PXrYwomFs5q4pGMizBMJF+ykh03insJ27hB8gSrD2Hn8A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, "node_modules/@typescript-eslint/parser": { - "version": "8.31.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.31.0.tgz", - "integrity": "sha512-67kYYShjBR0jNI5vsf/c3WG4u+zDnCTHTPqVMQguffaWWFs7artgwKmfwdifl+r6XyM5LYLas/dInj2T0SgJyw==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.32.1.tgz", + "integrity": "sha512-LKMrmwCPoLhM45Z00O1ulb6jwyVr2kr3XJp+G+tSEZcbauNnScewcQwtJqXDhXeYPDEjZ8C1SjXm015CirEmGg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.31.0", - "@typescript-eslint/types": "8.31.0", - "@typescript-eslint/typescript-estree": "8.31.0", - "@typescript-eslint/visitor-keys": "8.31.0", + "@typescript-eslint/scope-manager": "8.32.1", + "@typescript-eslint/types": "8.32.1", + "@typescript-eslint/typescript-estree": "8.32.1", + "@typescript-eslint/visitor-keys": "8.32.1", "debug": "^4.3.4" }, "engines": { @@ -575,14 +588,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.31.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.31.0.tgz", - "integrity": "sha512-knO8UyF78Nt8O/B64i7TlGXod69ko7z6vJD9uhSlm0qkAbGeRUSudcm0+K/4CrRjrpiHfBCjMWlc08Vav1xwcw==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.32.1.tgz", + "integrity": "sha512-7IsIaIDeZn7kffk7qXC3o6Z4UblZJKV3UBpkvRNpr5NSyLji7tvTcvmnMNYuYLyh26mN8W723xpo3i4MlD33vA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.31.0", - "@typescript-eslint/visitor-keys": "8.31.0" + "@typescript-eslint/types": "8.32.1", + "@typescript-eslint/visitor-keys": "8.32.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -593,16 +606,16 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.31.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.31.0.tgz", - "integrity": "sha512-DJ1N1GdjI7IS7uRlzJuEDCgDQix3ZVYVtgeWEyhyn4iaoitpMBX6Ndd488mXSx0xah/cONAkEaYyylDyAeHMHg==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.32.1.tgz", + "integrity": "sha512-mv9YpQGA8iIsl5KyUPi+FGLm7+bA4fgXaeRcFKRDRwDMu4iwrSHeDPipwueNXhdIIZltwCJv+NkxftECbIZWfA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.31.0", - "@typescript-eslint/utils": "8.31.0", + "@typescript-eslint/typescript-estree": "8.32.1", + "@typescript-eslint/utils": "8.32.1", "debug": "^4.3.4", - "ts-api-utils": "^2.0.1" + "ts-api-utils": "^2.1.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -617,9 +630,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.31.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.31.0.tgz", - "integrity": "sha512-Ch8oSjVyYyJxPQk8pMiP2FFGYatqXQfQIaMp+TpuuLlDachRWpUAeEu1u9B/v/8LToehUIWyiKcA/w5hUFRKuQ==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.32.1.tgz", + "integrity": "sha512-YmybwXUJcgGqgAp6bEsgpPXEg6dcCyPyCSr0CAAueacR/CCBi25G3V8gGQ2kRzQRBNol7VQknxMs9HvVa9Rvfg==", "dev": true, "license": "MIT", "engines": { @@ -631,20 +644,20 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.31.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.31.0.tgz", - "integrity": "sha512-xLmgn4Yl46xi6aDSZ9KkyfhhtnYI15/CvHbpOy/eR5NWhK/BK8wc709KKwhAR0m4ZKRP7h07bm4BWUYOCuRpQQ==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.32.1.tgz", + "integrity": "sha512-Y3AP9EIfYwBb4kWGb+simvPaqQoT5oJuzzj9m0i6FCY6SPvlomY2Ei4UEMm7+FXtlNJbor80ximyslzaQF6xhg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.31.0", - "@typescript-eslint/visitor-keys": "8.31.0", + "@typescript-eslint/types": "8.32.1", + "@typescript-eslint/visitor-keys": "8.32.1", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", "minimatch": "^9.0.4", "semver": "^7.6.0", - "ts-api-utils": "^2.0.1" + "ts-api-utils": "^2.1.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -658,16 +671,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.31.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.31.0.tgz", - "integrity": "sha512-qi6uPLt9cjTFxAb1zGNgTob4x9ur7xC6mHQJ8GwEzGMGE9tYniublmJaowOJ9V2jUzxrltTPfdG2nKlWsq0+Ww==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.32.1.tgz", + "integrity": "sha512-DsSFNIgLSrc89gpq1LJB7Hm1YpuhK086DRDJSNrewcGvYloWW1vZLHBTIvarKZDcAORIy/uWNx8Gad+4oMpkSA==", "dev": true, "license": "MIT", "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.31.0", - "@typescript-eslint/types": "8.31.0", - "@typescript-eslint/typescript-estree": "8.31.0" + "@eslint-community/eslint-utils": "^4.7.0", + "@typescript-eslint/scope-manager": "8.32.1", + "@typescript-eslint/types": "8.32.1", + "@typescript-eslint/typescript-estree": "8.32.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -682,13 +695,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.31.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.31.0.tgz", - "integrity": "sha512-QcGHmlRHWOl93o64ZUMNewCdwKGU6WItOU52H0djgNmn1EOrhVudrDzXz4OycCRSCPwFCDrE2iIt5vmuUdHxuQ==", + "version": "8.32.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.32.1.tgz", + "integrity": "sha512-ar0tjQfObzhSaW3C3QNmTc5ofj0hDoNQ5XWrCy6zDyabdr0TWhCkClp+rywGNj/odAFBVzzJrK4tEq5M4Hmu4w==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.31.0", + "@typescript-eslint/types": "8.32.1", "eslint-visitor-keys": "^4.2.0" }, "engines": { @@ -1481,9 +1494,9 @@ } }, "node_modules/eslint": { - "version": "9.25.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.25.1.tgz", - "integrity": "sha512-E6Mtz9oGQWDCpV12319d59n4tx9zOTXSTmc8BLVxBx+G/0RdM5MvEEJLU9c0+aleoePYYgVTOsRblx433qmhWQ==", + "version": "9.27.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.27.0.tgz", + "integrity": "sha512-ixRawFQuMB9DZ7fjU3iGGganFDp3+45bPOdaRurcFHSXO1e/sYwUX/FtQZpLZJR6SjMoJH8hR2pPEAfDyCoU2Q==", "dev": true, "license": "MIT", "dependencies": { @@ -1491,10 +1504,10 @@ "@eslint-community/regexpp": "^4.12.1", "@eslint/config-array": "^0.20.0", "@eslint/config-helpers": "^0.2.1", - "@eslint/core": "^0.13.0", + "@eslint/core": "^0.14.0", "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "9.25.1", - "@eslint/plugin-kit": "^0.2.8", + "@eslint/js": "9.27.0", + "@eslint/plugin-kit": "^0.3.1", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", @@ -1542,22 +1555,25 @@ } }, "node_modules/eslint-config-prettier": { - "version": "10.1.2", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.1.2.tgz", - "integrity": "sha512-Epgp/EofAUeEpIdZkW60MHKvPyru1ruQJxPL+WIycnaPApuseK0Zpkrh/FwL9oIpQvIhJwV7ptOy0DWUjTlCiA==", + "version": "10.1.5", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.1.5.tgz", + "integrity": "sha512-zc1UmCpNltmVY34vuLRV61r1K27sWuX39E+uyUnY8xS2Bex88VV9cugG+UZbRSRGtGyFboj+D8JODyme1plMpw==", "dev": true, "license": "MIT", "bin": { "eslint-config-prettier": "bin/cli.js" }, + "funding": { + "url": "https://opencollective.com/eslint-config-prettier" + }, "peerDependencies": { "eslint": ">=7.0.0" } }, "node_modules/eslint-plugin-prettier": { - "version": "5.2.6", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.6.tgz", - "integrity": "sha512-mUcf7QG2Tjk7H055Jk0lGBjbgDnfrvqjhXh9t2xLMSCjZVcw9Rb1V6sVNXO0th3jgeO7zllWPTNRil3JW94TnQ==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.4.0.tgz", + "integrity": "sha512-BvQOvUhkVQM1i63iMETK9Hjud9QhqBnbtT1Zc642p9ynzBuCe5pybkOnvqZIBypXmMlsGcnU4HZ8sCTPfpAexA==", "dev": true, "license": "MIT", "dependencies": { @@ -3612,9 +3628,9 @@ } }, "node_modules/webpack": { - "version": "5.99.7", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.99.7.tgz", - "integrity": "sha512-CNqKBRMQjwcmKR0idID5va1qlhrqVUKpovi+Ec79ksW8ux7iS1+A6VqzfZXgVYCFRKl7XL5ap3ZoMpwBJxcg0w==", + "version": "5.99.8", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.99.8.tgz", + "integrity": "sha512-lQ3CPiSTpfOnrEGeXDwoq5hIGzSjmwD72GdfVzF7CQAI7t47rJG9eDWvcEkEn3CUQymAElVvDg3YNTlCYj+qUQ==", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 4c63a72..151e387 100644 --- a/package.json +++ b/package.json @@ -30,11 +30,11 @@ "deepmerge": "^4" }, "devDependencies": { - "@typescript-eslint/eslint-plugin": "^8.31.0", - "@typescript-eslint/parser": "^8.31.0", - "eslint": "^9.25.1", - "eslint-config-prettier": "^10.1.2", - "eslint-plugin-prettier": "^5.2.6", + "@typescript-eslint/eslint-plugin": "^8.32.1", + "@typescript-eslint/parser": "^8.32.1", + "eslint": "^9.27.0", + "eslint-config-prettier": "^10.1.5", + "eslint-plugin-prettier": "^5.4.0", "home-assistant-js-websocket": "^9.5.0", "prettier": "^3.5.3", "superstruct": "^2.0.2", @@ -42,7 +42,7 @@ "ts-node": "^10.9.2", "typescript": "^5.8.3", "version-bump-prompt": "^6", - "webpack": "^5.99.7", + "webpack": "^5.99.8", "webpack-cli": "^6.0.1" }, "scripts": { diff --git a/src/types/homeassistant/README.md b/src/types/homeassistant/README.md index 5f3f9e7..7d657e1 100644 --- a/src/types/homeassistant/README.md +++ b/src/types/homeassistant/README.md @@ -13,7 +13,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/types/lovelace-mushroom/README.md b/src/types/lovelace-mushroom/README.md index c53b62a..cdb9038 100644 --- a/src/types/lovelace-mushroom/README.md +++ b/src/types/lovelace-mushroom/README.md @@ -13,7 +13,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, diff --git a/src/views/VacuumView.ts b/src/views/VacuumView.ts index 050a58e..cf8b46e 100644 --- a/src/views/VacuumView.ts +++ b/src/views/VacuumView.ts @@ -36,8 +36,8 @@ class VacuumView extends AbstractView { return { title: localize('vacuum.all_vacuums'), subtitle: - `${Registry.getCountTemplate(VacuumView.domain, 'in', '[cleaning, returning]')} ${localize('vacuum.vacuums')} ` + - localize('generic.busy'), + Registry.getCountTemplate(VacuumView.domain, 'in', '[cleaning, returning]') + + ` ${localize('vacuum.vacuums')} ${localize('generic.busy')}`, }; }