From 47eeae52bc972246d02896d966022393a0faa7e7 Mon Sep 17 00:00:00 2001 From: Juicy Date: Mon, 2 Dec 2024 01:11:31 +0000 Subject: [PATCH] Fix naviagation path --- .../linus_dashboard/www/linus-strategy.js | 36 +++++-------------- .../linus_dashboard/www/linus-strategy.js.map | 2 +- src/Helper.ts | 2 +- src/chips/FanChip.ts | 2 +- src/chips/LightChip.ts | 2 +- src/chips/MediaPlayerChip.ts | 2 +- src/chips/SwitchChip.ts | 2 +- src/linus-strategy.ts | 11 +++--- src/views/AggregateView.ts | 1 - src/views/AreaView.ts | 1 - src/views/CameraView.ts | 1 - src/views/ClimateView.ts | 1 - src/views/CoverView.ts | 1 - src/views/FanView.ts | 1 - src/views/FloorView.ts | 1 - src/views/HomeView.ts | 1 - src/views/LightView.ts | 1 - src/views/MediaPlayerView.ts | 1 - src/views/SceneView.ts | 1 - src/views/SecurityDetailsView.ts | 1 - src/views/SecurityView.ts | 1 - src/views/SensorView.ts | 1 - src/views/SwitchView.ts | 1 - src/views/UnavailableView.ts | 1 - src/views/VacuumView.ts | 1 - 25 files changed, 20 insertions(+), 56 deletions(-) diff --git a/custom_components/linus_dashboard/www/linus-strategy.js b/custom_components/linus_dashboard/www/linus-strategy.js index e2347d2..ebab089 100644 --- a/custom_components/linus_dashboard/www/linus-strategy.js +++ b/custom_components/linus_dashboard/www/linus-strategy.js @@ -470,7 +470,7 @@ class Helper { __classPrivateFieldGet(this, _a, "f", _Helper_strategyOptions).domains = Object.fromEntries(Object.entries(__classPrivateFieldGet(this, _a, "f", _Helper_strategyOptions).domains).sort(([, a], [, b]) => { return (a.order ?? Infinity) - (b.order ?? Infinity) || (a.title ?? "undefined").localeCompare(b.title ?? "undefined"); })); - console.log('this.#areas', __classPrivateFieldGet(this, _a, "f", _Helper_areas), __classPrivateFieldGet(this, _a, "f", _Helper_magicAreasDevices)); + // console.log('this.#areas', this.#areas, this.#magicAreasDevices) __classPrivateFieldSet(this, _a, true, "f", _Helper_initialized); } /** @@ -3469,7 +3469,7 @@ class FanChip extends _AbstractChip__WEBPACK_IMPORTED_MODULE_1__.AbstractChip { content: _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.getCountTemplate("fan", "eq", "on"), tap_action: { action: "navigate", - navigation_path: "fans", + navigation_path: "fan", }, }); if (options?.show_content) { @@ -3537,7 +3537,7 @@ class LightChip extends _AbstractChip__WEBPACK_IMPORTED_MODULE_1__.AbstractChip content: "", tap_action: { action: "navigate", - navigation_path: "lights", + navigation_path: "light", }, }); if (options?.show_content) { @@ -3608,7 +3608,7 @@ class MediaPlayerChip extends _AbstractChip__WEBPACK_IMPORTED_MODULE_1__.Abstrac content: "", tap_action: { action: "navigate", - navigation_path: "media_players", + navigation_path: "media_player", }, }); if (options?.show_content) { @@ -3968,7 +3968,7 @@ class SwitchChip extends _AbstractChip__WEBPACK_IMPORTED_MODULE_1__.AbstractChip content: "", tap_action: { action: "navigate", - navigation_path: "switches", + navigation_path: "switch", }, }); if (options?.show_content) { @@ -4530,7 +4530,7 @@ class LinusStrategy extends HTMLTemplateElement { static async generateDashboard(info) { if (!_Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.isInitialized()) await _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.initialize(info); - console.log('info', info); + // console.log('info', info); const views = info.config?.views ?? []; LinusStrategy.createDomainSubviews(views); LinusStrategy.createUnavailableEntitiesSubview(views); @@ -4564,11 +4564,10 @@ class LinusStrategy extends HTMLTemplateElement { device_class = viewId; } views.push({ - title: viewId, - icon: _variables__WEBPACK_IMPORTED_MODULE_1__.VIEWS_ICONS[viewId] ?? _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.icons[domain]?.[device_class]?.default, + title: _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.localize((0,_utils__WEBPACK_IMPORTED_MODULE_3__.getDomainTranslationKey)(domain, device_class)), + icon: _variables__WEBPACK_IMPORTED_MODULE_1__.VIEWS_ICONS[viewId] ?? _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.icons[device_class === "battery" ? "binary_sensor" : domain]?.[device_class]?.default, path: viewId, - // subview: !Object.keys(ResourceKeys).includes(viewId), - subview: false, + subview: !Object.keys(_variables__WEBPACK_IMPORTED_MODULE_1__.VIEWS_ICONS).includes(viewId), strategy: { type: "custom:linus-strategy", options: { viewId }, @@ -6090,7 +6089,6 @@ class AggregateView extends _AbstractView__WEBPACK_IMPORTED_MODULE_2__.AbstractV */ _AggregateView_defaultConfig.set(this, { title: "Aggregates", - path: "aggregates", icon: "mdi:fan", subview: true, }); @@ -6157,7 +6155,6 @@ class AreaView { this.config = { icon: "mdi:home-assistant", type: "sections", - path: "home", subview: true, }; this.area = area; @@ -6371,7 +6368,6 @@ class CameraView extends _AbstractView__WEBPACK_IMPORTED_MODULE_1__.AbstractView */ _CameraView_defaultConfig.set(this, { title: "Cameras", - path: "cameras", icon: "mdi:cctv", subview: false, }); @@ -6455,7 +6451,6 @@ class ClimateView extends _AbstractView__WEBPACK_IMPORTED_MODULE_2__.AbstractVie */ _ClimateView_defaultConfig.set(this, { title: "Climates", - path: "climates", icon: "mdi:thermostat", subview: false, }); @@ -6539,7 +6534,6 @@ class CoverView extends _AbstractView__WEBPACK_IMPORTED_MODULE_2__.AbstractView */ _CoverView_defaultConfig.set(this, { title: "Covers", - path: "cover", icon: "mdi:window-open", subview: false, }); @@ -6623,7 +6617,6 @@ class FanView extends _AbstractView__WEBPACK_IMPORTED_MODULE_2__.AbstractView { */ _FanView_defaultConfig.set(this, { title: "Fans", - path: "fans", icon: "mdi:fan", subview: false, }); @@ -6706,7 +6699,6 @@ class FloorView { this.config = { icon: "mdi:home-assistant", type: "sections", - path: "home", subview: true, }; /** @@ -6949,7 +6941,6 @@ class HomeView { title: "Home", icon: "mdi:home-assistant", type: "sections", - path: "home", subview: false, }; if (!_Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.isInitialized()) { @@ -7273,7 +7264,6 @@ class LightView extends _AbstractView__WEBPACK_IMPORTED_MODULE_2__.AbstractView * @private */ _LightView_defaultConfig.set(this, { - path: "lights", icon: "mdi:lightbulb-group", subview: false, }); @@ -7357,7 +7347,6 @@ class MediaPlayerView extends _AbstractView__WEBPACK_IMPORTED_MODULE_2__.Abstrac */ _MediaPlayerView_defaultConfig.set(this, { title: "MediaPlayers", - path: "media_players", icon: "mdi:cast", subview: false, }); @@ -7441,7 +7430,6 @@ class SceneView extends _AbstractView__WEBPACK_IMPORTED_MODULE_2__.AbstractView */ _SceneView_defaultConfig.set(this, { title: "Scenes", - path: "scenes", icon: "mdi:palette", subview: false, }); @@ -7515,7 +7503,6 @@ class SecurityDetailsView { */ this.config = { title: _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.localize("component.binary_sensor.entity_component.safety.name"), - path: "security-details", icon: "mdi:security", subview: true, }; @@ -7622,7 +7609,6 @@ class SecurityView { * @private */ this.config = { - path: "security", title: _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.localize("component.binary_sensor.entity_component.safety.name"), icon: "mdi:security", type: "sections", @@ -7873,7 +7859,6 @@ class SensorView extends _AbstractView__WEBPACK_IMPORTED_MODULE_2__.AbstractView */ _SensorView_defaultConfig.set(this, { title: "Sensors", - path: "scenes", icon: "mdi:palette", subview: false, }); @@ -7957,7 +7942,6 @@ class SwitchView extends _AbstractView__WEBPACK_IMPORTED_MODULE_2__.AbstractView */ _SwitchView_defaultConfig.set(this, { title: "Switches", - path: "switches", icon: "mdi:dip-switch", subview: false, }); @@ -8034,7 +8018,6 @@ class UnavailableView { * @type {views.ViewConfig} */ this.config = { - path: "unavailable", title: _Helper__WEBPACK_IMPORTED_MODULE_1__.Helper.localize("state.default.unavailable"), icon: "mdi:view-dashboard", type: "sections", @@ -8175,7 +8158,6 @@ class VacuumView extends _AbstractView__WEBPACK_IMPORTED_MODULE_2__.AbstractView */ _VacuumView_defaultConfig.set(this, { title: "Vacuums", - path: "vacuums", icon: "mdi:robot-vacuum", subview: false, }); diff --git a/custom_components/linus_dashboard/www/linus-strategy.js.map b/custom_components/linus_dashboard/www/linus-strategy.js.map index c061c5b..0b11255 100644 --- a/custom_components/linus_dashboard/www/linus-strategy.js.map +++ b/custom_components/linus_dashboard/www/linus-strategy.js.map @@ -1 +1 @@ -{"version":3,"file":"linus-strategy.js","mappings":";;;;;;;;;;AAAa;;AAEb;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,EAAE;AACF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAE,IAAI;AACN;;AAEA;;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACpIgE;AAE9B;AAU8D;AACR;AAKxF;;;;GAIG;AACH,MAAM,MAAM;IAyGV;;;;;;;OAOG;IACH;QACE,MAAM,IAAI,KAAK,CAAC,yFAAyF,CAAC,CAAC;IAC7G,CAAC;IAED;;;;;OAKG;IACH,MAAM,KAAK,eAAe;QACxB,OAAO,2BAAI,mCAAiB,CAAC;IAC/B,CAAC;IAED;;;;;OAKG;IACH,MAAM,KAAK,iBAAiB;QAC1B,OAAO,2BAAI,qCAAmB,CAAC;IACjC,CAAC;IAED;;;;;OAKG;IACH,MAAM,KAAK,KAAK;Q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ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;;;;;;;;;AC5LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;;;;;;;;;AChJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;;;;;UC9JA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;WACA;WACA;WACA;;;;;WCHA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;UENA;UACA;UACA;UACA","sources":["webpack://linus-dashboard/./node_modules/deepmerge/dist/cjs.js","webpack://linus-dashboard/./src/Helper.ts","webpack://linus-dashboard/./src/cards/AbstractCard.ts","webpack://linus-dashboard/./src/cards/AggregateCard.ts","webpack://linus-dashboard/./src/cards/AlarmCard.ts","webpack://linus-dashboard/./src/cards/BinarySensorCard.ts","webpack://linus-dashboard/./src/cards/CameraCard.ts","webpack://linus-dashboard/./src/cards/ClimateCard.ts","webpack://linus-dashboard/./src/cards/ControllerCard.ts","webpack://linus-dashboard/./src/cards/CoverCard.ts","webpack://linus-dashboard/./src/cards/FanCard.ts","webpack://linus-dashboard/./src/cards/HomeAreaCard.ts","webpack://linus-dashboard/./src/cards/ImageAreaCard.ts","webpack://linus-dashboard/./src/cards/LightCard.ts","webpack://linus-dashboard/./src/cards/LockCard.ts","webpack://linus-dashboard/./src/cards/MediaPlayerCard.ts","webpack://linus-dashboard/./src/cards/MiscellaneousCard.ts","webpack://linus-dashboard/./src/cards/NumberCard.ts","webpack://linus-dashboard/./src/cards/PersonCard.ts","webpack://linus-dashboard/./src/cards/SceneCard.ts","webpack://linus-dashboard/./src/cards/SensorCard.ts","webpack://linus-dashboard/./src/cards/SwipeCard.ts","webpack://linus-dashboard/./src/cards/SwitchCard.ts","webpack://linus-dashboard/./src/cards/VacuumCard.ts","webpack://linus-dashboard/./src/chips/AbstractChip.ts","webpack://linus-dashboard/./src/chips/AggregateChip.ts","webpack://linus-dashboard/./src/chips/AlarmChip.ts","webpack://linus-dashboard/./src/chips/AreaScenesChips.ts","webpack://linus-dashboard/./src/chips/AreaStateChip.ts","webpack://linus-dashboard/./src/chips/ClimateChip.ts","webpack://linus-dashboard/./src/chips/ConditionalChip.ts","webpack://linus-dashboard/./src/chips/ControlChip.ts","webpack://linus-dashboard/./src/chips/CoverChip.ts","webpack://linus-dashboard/./src/chips/FanChip.ts","webpack://linus-dashboard/./src/chips/LightChip.ts","webpack://linus-dashboard/./src/chips/MediaPlayerChip.ts","webpack://linus-dashboard/./src/chips/SafetyChip.ts","webpack://linus-dashboard/./src/chips/SettingsChip.ts","webpack://linus-dashboard/./src/chips/SpotifyChip.ts","webpack://linus-dashboard/./src/chips/SwitchChip.ts","webpack://linus-dashboard/./src/chips/ToggleSceneChip.ts","webpack://linus-dashboard/./src/chips/UnavailableChip.ts","webpack://linus-dashboard/./src/chips/WeatherChip.ts","webpack://linus-dashboard/./src/configurationDefaults.ts","webpack://linus-dashboard/./src/linus-strategy.ts","webpack://linus-dashboard/./src/popups/AbstractPopup.ts","webpack://linus-dashboard/./src/popups/AreaInformationsPopup.ts","webpack://linus-dashboard/./src/popups/LightSettingsPopup.ts","webpack://linus-dashboard/./src/popups/SceneSettingsPopup.ts","webpack://linus-dashboard/./src/popups/SettingsPopup.ts","webpack://linus-dashboard/./src/popups/WeatherPopup.ts","webpack://linus-dashboard/./src/types/lovelace-mushroom/cards/vacuum-card-config.ts","webpack://linus-dashboard/./src/types/strategy/generic.ts","webpack://linus-dashboard/./src/utils.ts","webpack://linus-dashboard/./src/variables.ts","webpack://linus-dashboard/./src/views/AbstractView.ts","webpack://linus-dashboard/./src/views/AggregateView.ts","webpack://linus-dashboard/./src/views/AreaView.ts","webpack://linus-dashboard/./src/views/CameraView.ts","webpack://linus-dashboard/./src/views/ClimateView.ts","webpack://linus-dashboard/./src/views/CoverView.ts","webpack://linus-dashboard/./src/views/FanView.ts","webpack://linus-dashboard/./src/views/FloorView.ts","webpack://linus-dashboard/./src/views/HomeView.ts","webpack://linus-dashboard/./src/views/LightView.ts","webpack://linus-dashboard/./src/views/MediaPlayerView.ts","webpack://linus-dashboard/./src/views/SceneView.ts","webpack://linus-dashboard/./src/views/SecurityDetailsView.ts","webpack://linus-dashboard/./src/views/SecurityView.ts","webpack://linus-dashboard/./src/views/SensorView.ts","webpack://linus-dashboard/./src/views/SwitchView.ts","webpack://linus-dashboard/./src/views/UnavailableView.ts","webpack://linus-dashboard/./src/views/VacuumView.ts","webpack://linus-dashboard/./src/cards/ lazy ^\\.\\/.*$ namespace object","webpack://linus-dashboard/./src/chips/ lazy ^\\.\\/.*$ namespace object","webpack://linus-dashboard/./src/views/ lazy ^\\.\\/.*$ namespace object","webpack://linus-dashboard/webpack/bootstrap","webpack://linus-dashboard/webpack/runtime/compat get default export","webpack://linus-dashboard/webpack/runtime/define property getters","webpack://linus-dashboard/webpack/runtime/ensure chunk","webpack://linus-dashboard/webpack/runtime/hasOwnProperty shorthand","webpack://linus-dashboard/webpack/runtime/make namespace object","webpack://linus-dashboard/webpack/before-startup","webpack://linus-dashboard/webpack/startup","webpack://linus-dashboard/webpack/after-startup"],"sourcesContent":["'use strict';\n\nvar isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n\treturn Array.isArray(val) ? [] : {}\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n\treturn (options.clone !== false && options.isMergeableObject(value))\n\t\t? deepmerge(emptyTarget(value), value, options)\n\t\t: value\n}\n\nfunction defaultArrayMerge(target, source, options) {\n\treturn target.concat(source).map(function(element) {\n\t\treturn cloneUnlessOtherwiseSpecified(element, options)\n\t})\n}\n\nfunction getMergeFunction(key, options) {\n\tif (!options.customMerge) {\n\t\treturn deepmerge\n\t}\n\tvar customMerge = options.customMerge(key);\n\treturn typeof customMerge === 'function' ? customMerge : deepmerge\n}\n\nfunction getEnumerableOwnPropertySymbols(target) {\n\treturn Object.getOwnPropertySymbols\n\t\t? Object.getOwnPropertySymbols(target).filter(function(symbol) {\n\t\t\treturn Object.propertyIsEnumerable.call(target, symbol)\n\t\t})\n\t\t: []\n}\n\nfunction getKeys(target) {\n\treturn Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))\n}\n\nfunction propertyIsOnObject(object, property) {\n\ttry {\n\t\treturn property in object\n\t} catch(_) {\n\t\treturn false\n\t}\n}\n\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n\treturn propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n\t\t&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n\t\t\t&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.\n}\n\nfunction mergeObject(target, source, options) {\n\tvar destination = {};\n\tif (options.isMergeableObject(target)) {\n\t\tgetKeys(target).forEach(function(key) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n\t\t});\n\t}\n\tgetKeys(source).forEach(function(key) {\n\t\tif (propertyIsUnsafe(target, key)) {\n\t\t\treturn\n\t\t}\n\n\t\tif (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\n\t\t\tdestination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n\t\t} else {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n\t\t}\n\t});\n\treturn destination\n}\n\nfunction deepmerge(target, source, options) {\n\toptions = options || {};\n\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge;\n\toptions.isMergeableObject = options.isMergeableObject || isMergeableObject;\n\t// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n\t// implementations can use it. The caller may not replace it.\n\toptions.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n\n\tvar sourceIsArray = Array.isArray(source);\n\tvar targetIsArray = Array.isArray(target);\n\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n\tif (!sourceAndTargetTypesMatch) {\n\t\treturn cloneUnlessOtherwiseSpecified(source, options)\n\t} else if (sourceIsArray) {\n\t\treturn options.arrayMerge(target, source, options)\n\t} else {\n\t\treturn mergeObject(target, source, options)\n\t}\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n\tif (!Array.isArray(array)) {\n\t\tthrow new Error('first argument should be an array')\n\t}\n\n\treturn array.reduce(function(prev, next) {\n\t\treturn deepmerge(prev, next, options)\n\t}, {})\n};\n\nvar deepmerge_1 = deepmerge;\n\nmodule.exports = deepmerge_1;\n","import { configurationDefaults } from \"./configurationDefaults\";\nimport { HassEntities, HassEntity } from \"home-assistant-js-websocket\";\nimport deepmerge from \"deepmerge\";\nimport { DeviceRegistryEntry } from \"./types/homeassistant/data/device_registry\";\nimport { AreaRegistryEntry } from \"./types/homeassistant/data/area_registry\";\nimport { generic } from \"./types/strategy/generic\";\nimport StrategyArea = generic.StrategyArea;\nimport StrategyFloor = generic.StrategyFloor;\nimport StrategyEntity = generic.StrategyEntity;\nimport StrategyDevice = generic.StrategyDevice;\nimport MagicAreaRegistryEntry = generic.MagicAreaRegistryEntry;\nimport { FloorRegistryEntry } from \"./types/homeassistant/data/floor_registry\";\nimport { DEVICE_CLASSES, MAGIC_AREAS_DOMAIN, MAGIC_AREAS_NAME, UNDISCLOSED } from \"./variables\";\nimport { getMAEntity, getMagicAreaSlug, groupEntitiesByDomain, slugify } from \"./utils\";\nimport { EntityRegistryEntry } from \"./types/homeassistant/data/entity_registry\";\nimport { FrontendEntityComponentIconResources, IconResources } from \"./types/homeassistant/data/frontend\";\nimport { LinusDashboardConfig } from \"./types/homeassistant/data/linus_dashboard\";\n\n/**\n * Helper Class\n *\n * Contains the objects of Home Assistant's registries and helper methods.\n */\nclass Helper {\n /**\n * An array of entities from Home Assistant's entity registry.\n *\n * @type {Record}\n * @private\n */\n static #entities: Record;\n\n /**\n * An array of entities from Home Assistant's entity registry.\n *\n * @type {Record = {};\n\n /**\n * An array of entities from Home Assistant's device registry.\n *\n * @type {Record}\n * @private\n */\n static #devices: Record;\n\n /**\n * An array of entities from Home Assistant's area registry.\n *\n * @type {Record}\n * @private\n */\n static #areas: Record = {};\n\n /**\n * An array of entities from Home Assistant's area registry.\n *\n * @type {Record}\n * @private\n */\n static #floors: Record = {};\n\n /**\n * An array of state entities from Home Assistant's Hass object.\n *\n * @type {HassEntities}\n * @private\n */\n static #hassStates: HassEntities;\n\n /**\n * Translation method.\n *\n * @type {any}\n * @private\n */\n static #hassLocalize: any;\n\n /**\n * Indicates whether this module is initialized.\n *\n * @type {boolean} True if initialized.\n * @private\n */\n static #initialized: boolean = false;\n\n /**\n * The Custom strategy configuration.\n *\n * @type {generic.StrategyConfig}\n * @private\n */\n static #strategyOptions: generic.StrategyConfig;\n\n /**\n * The magic areas devices.\n *\n * @type {Record}\n * @private\n */\n static #magicAreasDevices: Record = {};\n\n /**\n * Set to true for more verbose information in the console.\n *\n * @type {boolean}\n * @private\n */\n static #debug: boolean;\n\n /**\n * Set to true for more verbose information in the console.\n *\n * @type {IconResources}\n * @private\n */\n static #icons: IconResources;\n\n /**\n * Set to true for more verbose information in the console.\n *\n * @type {LinusDashboardConfig}\n * @private\n */\n static #linus_dashboard_config: LinusDashboardConfig;\n\n /**\n * Class constructor.\n *\n * This class shouldn't be instantiated directly.\n * Instead, it should be initialized with method initialize().\n *\n * @throws {Error} If trying to instantiate this class.\n */\n constructor() {\n throw new Error(\"This class should be invoked with method initialize() instead of using the keyword new!\");\n }\n\n /**\n * Custom strategy configuration.\n *\n * @returns {generic.StrategyConfig}\n * @static\n */\n static get strategyOptions(): generic.StrategyConfig {\n return this.#strategyOptions;\n }\n\n /**\n * Custom strategy configuration.\n *\n * @returns {Record}\n * @static\n */\n static get magicAreasDevices(): Record {\n return this.#magicAreasDevices;\n }\n\n /**\n * Get the entities from Home Assistant's area registry.\n *\n * @returns {Record}\n * @static\n */\n static get areas(): Record {\n return this.#areas;\n }\n\n /**\n * Get the entities from Home Assistant's floor registry.\n *\n * @returns {StrategyArea[]}\n * @static\n */\n static get orderedAreas(): StrategyArea[] {\n return Object.values(this.#areas).sort((a, b) => {\n // Check if 'level' is undefined in either object\n if (a.order === undefined) return 1; // a should come after b\n if (b.order === undefined) return -1; // b should come after a\n\n // Both 'order' values are defined, compare them\n return a.order - b.order;\n });\n }\n\n /**\n * Get the entities from Home Assistant's floor registry.\n *\n * @returns {Record}\n * @static\n */\n static get floors(): Record {\n return this.#floors\n }\n\n /**\n * Get the entities from Home Assistant's floor registry.\n *\n * @returns {StrategyFloor[]}\n * @static\n */\n static get orderedFloors(): StrategyFloor[] {\n return Object.values(this.#floors).sort((a, b) => {\n // Check if 'level' is undefined in either object\n if (a.level === undefined) return 1; // a should come after b\n if (b.level === undefined) return -1; // b should come after a\n\n // Both 'level' values are defined, compare them\n return a.level - b.level;\n });\n }\n\n /**\n * Get the devices from Home Assistant's device registry.\n *\n * @returns {Record}\n * @static\n */\n static get devices(): Record {\n return this.#devices;\n }\n\n /**\n * Get the entities from Home Assistant's entity registry.\n *\n * @returns {Record}\n * @static\n */\n static get entities(): Record {\n return this.#entities;\n }\n\n /**\n * Get the domains from Home Assistant's entity registry.\n *\n * @returns {Record}\n * @static\n */\n static get domains(): Record {\n return this.#domains;\n }\n\n /**\n * Get the icons from Home Assistant's frontend.\n *\n * @returns {IconResources}\n * @static\n */\n static get icons(): IconResources {\n return this.#icons;\n }\n\n /**\n * Get the linus_dashboard_config from Home Assistant's frontend.\n *\n * @returns {LinusDashboardConfig}\n * @static\n */\n static get linus_dashboard_config(): LinusDashboardConfig {\n return this.#linus_dashboard_config;\n }\n\n /**\n * Get the current debug mode of the mushroom strategy.\n *\n * @returns {boolean}\n * @static\n */\n static get debug(): boolean {\n return this.#debug;\n }\n\n /**\n * Initialize this module.\n *\n * @param {generic.DashBoardInfo} info Strategy information object.\n * @returns {Promise}\n * @static\n */\n static async initialize(info: generic.DashBoardInfo): Promise {\n // Initialize properties.\n this.#hassStates = info.hass.states;\n this.#hassLocalize = info.hass.localize;\n this.#strategyOptions = deepmerge(configurationDefaults, info.config?.strategy?.options ?? {});\n this.#debug = this.#strategyOptions.debug;\n\n let homeAssistantRegistries = []\n\n try {\n // Query the registries of Home Assistant.\n\n homeAssistantRegistries = await Promise.all([\n info.hass.callWS({ type: \"config/entity_registry/list\" }) as Promise,\n info.hass.callWS({ type: \"config/device_registry/list\" }) as Promise,\n info.hass.callWS({ type: \"config/area_registry/list\" }) as Promise,\n info.hass.callWS({ type: \"config/floor_registry/list\" }) as Promise,\n info.hass.callWS({ type: \"frontend/get_icons\", category: \"entity_component\" }) as Promise,\n info.hass.callWS({ type: \"frontend/get_icons\", category: \"services\" }) as Promise,\n info.hass.callWS({ type: \"linus_dashboard/get_config\" }) as Promise,\n ]);\n\n } catch (e) {\n Helper.logError(\"An error occurred while querying Home assistant's registries!\", e);\n throw 'Check the console for details';\n }\n\n const [entities, devices, areas, floors, entity_component_icons, services_icons, linus_dashboard_config] = homeAssistantRegistries;\n\n this.#icons = deepmerge(entity_component_icons.resources, services_icons.resources);\n this.#linus_dashboard_config = linus_dashboard_config;\n\n // Dictionnaires pour un accès rapide\n const areasById = Object.fromEntries(areas.map(a => [a.area_id, a]));\n const floorsById = Object.fromEntries(floors.map(f => [f.floor_id, f]));\n const devicesByAreaIdMap = Object.fromEntries(devices.map(device => [device.id, device.area_id]));\n const entitiesByDeviceId: Record = {};\n const entitiesByAreaId: Record = {};\n const devicesByAreaId: Record = {};\n\n this.#entities = entities.reduce((acc, entity) => {\n\n if (!(entity.entity_id in this.#hassStates)) return acc;\n\n const area = entity.area_id ? areasById[entity.area_id] : {} as StrategyArea;\n const floor = area.floor_id ? floorsById[area.floor_id] : {} as StrategyFloor;\n const enrichedEntity = {\n ...entity,\n floor_id: floor.floor_id || null,\n };\n\n acc[entity.entity_id] = enrichedEntity;\n\n if (entity.platform !== MAGIC_AREAS_DOMAIN) {\n const areaId = entity.area_id ?? devicesByAreaIdMap[entity.device_id ?? \"\"] ?? UNDISCLOSED;\n if (!entitiesByAreaId[areaId]) entitiesByAreaId[areaId] = [];\n entitiesByAreaId[areaId].push(enrichedEntity);\n }\n\n if (entity.device_id) {\n if (!entitiesByDeviceId[entity.device_id]) entitiesByDeviceId[entity.device_id] = [];\n entitiesByDeviceId[entity.device_id].push(enrichedEntity);\n }\n\n\n let domain = this.getEntityDomain(entity.entity_id)\n if (Object.keys(DEVICE_CLASSES).includes(domain)) {\n const entityState = Helper.getEntityState(entity.entity_id);\n if (entityState?.attributes?.device_class) domain = entityState.attributes.device_class\n }\n if (!this.#domains[domain]) this.#domains[domain] = [];\n if (entity.platform !== MAGIC_AREAS_DOMAIN) this.#domains[domain].push(enrichedEntity);\n\n return acc;\n }, {} as Record);\n\n // Enrichir les appareils\n this.#devices = devices.reduce((acc, device) => {\n const entitiesInDevice = entitiesByDeviceId[device.id] || [];\n const area = device.area_id ? areasById[device.area_id] : {} as StrategyArea;\n const floor = area.floor_id ? floorsById[area.floor_id] : {} as StrategyFloor;\n\n const enrichedDevice = {\n ...device,\n floor_id: floor.floor_id || null,\n entities: entitiesInDevice.map(entity => entity.entity_id),\n };\n\n acc[device.id] = enrichedDevice;\n\n if (device.manufacturer !== MAGIC_AREAS_NAME) {\n const areaId = device.area_id ?? UNDISCLOSED;\n if (!devicesByAreaId[areaId]) devicesByAreaId[areaId] = [];\n devicesByAreaId[areaId].push(enrichedDevice);\n }\n\n if (device.manufacturer === MAGIC_AREAS_NAME) {\n this.#magicAreasDevices[getMagicAreaSlug(device as MagicAreaRegistryEntry)] = {\n ...device,\n area_name: device.name!,\n entities: entitiesInDevice\n .reduce((entities: Record, entity) => {\n entities[entity.translation_key!] = entity;\n return entities;\n }, {})\n }\n }\n\n return acc;\n }, {} as Record);\n\n\n // Create and add the undisclosed area if not hidden in the strategy options.\n if (!this.#strategyOptions.areas.undisclosed?.hidden) {\n\n this.#strategyOptions.areas.undisclosed = {\n ...configurationDefaults.areas.undisclosed,\n ...this.#strategyOptions.areas.undisclosed,\n };\n\n areas.push(this.#strategyOptions.areas.undisclosed);\n }\n\n // Enrichir les zones\n this.#areas = areas.reduce((acc, area) => {\n\n const areaEntities = entitiesByAreaId[area.area_id]?.map(entity => entity.entity_id) || [];\n\n const slug = area.area_id === UNDISCLOSED ? area.area_id : slugify(area.name);\n\n const enrichedArea = {\n ...area,\n floor_id: area.floor_id || UNDISCLOSED,\n slug,\n domains: groupEntitiesByDomain(areaEntities) ?? {},\n devices: devicesByAreaId[area.area_id]?.map(device => device.id) || [],\n magicAreaDevice: Object.values(this.#devices).find(device => device.manufacturer === MAGIC_AREAS_NAME && device.name === area.name),\n entities: areaEntities,\n };\n\n acc[slug] = enrichedArea;\n return acc;\n }, {} as Record);\n\n\n // Create and add the undisclosed floor if not hidden in the strategy options.\n if (!this.#strategyOptions.areas.undisclosed?.hidden) {\n\n this.#strategyOptions.floors.undisclosed = {\n ...configurationDefaults.floors.undisclosed,\n ...this.#strategyOptions.floors.undisclosed,\n };\n\n floors.push(this.#strategyOptions.floors.undisclosed);\n }\n\n // Enrichir les étages\n this.#floors = floors.reduce((acc, floor) => {\n const areasInFloor = Object.values(this.#areas).filter(area => area.floor_id === floor.floor_id);\n\n acc[floor.floor_id] = {\n ...floor,\n areas_slug: areasInFloor.map(area => area.slug),\n };\n\n return acc;\n }, {} as Record);\n\n\n // Sort custom and default views of the strategy options by order first and then by title.\n this.#strategyOptions.views = Object.fromEntries(\n Object.entries(this.#strategyOptions.views).sort(([, a], [, b]) => {\n return (a.order ?? Infinity) - (b.order ?? Infinity) || (a.title ?? \"undefined\").localeCompare(b.title ?? \"undefined\");\n }),\n );\n\n // Sort custom and default domains of the strategy options by order first and then by title.\n this.#strategyOptions.domains = Object.fromEntries(\n Object.entries(this.#strategyOptions.domains).sort(([, a], [, b]) => {\n return (a.order ?? Infinity) - (b.order ?? Infinity) || (a.title ?? \"undefined\").localeCompare(b.title ?? \"undefined\");\n }),\n );\n\n console.log('this.#areas', this.#areas, this.#magicAreasDevices)\n\n this.#initialized = true;\n }\n\n /**\n * Get the initialization status of the Helper class.\n *\n * @returns {boolean} True if this module is initialized.\n * @static\n */\n static isInitialized(): boolean {\n return this.#initialized;\n }\n\n /**\n * Get a template string to define the number of a given domain's entities with a certain state.\n *\n * States are compared against a given value by a given operator.\n *\n * @param {string} domain The domain of the entities.\n * @param {string} operator The Comparison operator between state and value.\n * @param {string} value The value to which the state is compared against.\n * @param {string} area_id\n *\n * @return {string} The template string.\n * @static\n */\n static getCountTemplate(domain: string, operator: string, value: string | string[], area_slug?: string | string[]): string {\n const states: string[] = [];\n\n if (!this.isInitialized()) {\n console.warn(\"Helper class should be initialized before calling this method!\");\n }\n\n const areaSlugs = Array.isArray(area_slug) ? area_slug : [area_slug];\n\n for (const slug of areaSlugs) {\n if (slug) {\n const newStates = domain === \"all\"\n ? this.#areas[slug]?.entities.map((entity_id) => `states['${entity_id}']`)\n : this.#areas[slug]?.domains[domain]?.map((entity_id) => `states['${entity_id}']`);\n if (newStates) {\n states.push(...newStates);\n }\n } else {\n for (const area of Object.values(this.#areas)) {\n if (area.area_id === UNDISCLOSED) continue;\n\n const newStates = domain === \"all\"\n ? area.entities.map((entity_id) => `states['${entity_id}']`)\n : area.domains[domain]?.map((entity_id) => `states['${entity_id}']`);\n if (newStates) {\n states.push(...newStates);\n }\n }\n }\n }\n\n const formatedValue = Array.isArray(value) ? JSON.stringify(value).replaceAll('\"', \"'\") : `'${value}'`;\n\n return `{% set entities = [${states}] %}{{ entities | selectattr('state','${operator}',${formatedValue}) | list | count }}`;\n }\n\n /**\n * Get a template string to define the number of a given device_class's entities with a certain state.\n *\n * States are compared against a given value by a given operator.\n *\n * @param {string} domain The domain of the entities.\n * @param {string} device_class The device class of the entities.\n * @param {string} operator The Comparison operator between state and value.\n * @param {string} value The value to which the state is compared against.\n * @param {string} area_id\n *\n * @return {string} The template string.\n * @static\n */\n static getDeviceClassCountTemplate(device_class: string, operator: string, value: string, area_slug: string | string[] = \"global\"): string {\n const states: string[] = [];\n\n if (!this.isInitialized()) {\n console.warn(\"Helper class should be initialized before calling this method!\");\n }\n\n const area_slugs = Array.isArray(area_slug) ? area_slug : [area_slug];\n\n for (const slug of area_slugs) {\n const newStates = slug === \"global\"\n ? this.domains[device_class]?.map((entity) => `states['${entity.entity_id}']`) ?? []\n : this.#areas[slug]?.domains[device_class]?.map((entity_id) => `states['${entity_id}']`) ?? [];\n states.push(...newStates);\n }\n\n const formattedValue = Array.isArray(value) ? JSON.stringify(value).replace(/\"/g, \"'\") : `'${value}'`;\n return `{% set entities = [${states}] %}{{ entities | selectattr('attributes.device_class', 'defined') | selectattr('attributes.device_class', 'eq', '${device_class}') | selectattr('state','${operator}',${formattedValue}) | list | count }}`;\n }\n\n /**\n * Get a template string to define the average state of sensor entities with a given device class.\n *\n * States are compared against a given value by a given operator.\n *\n * @param {string} device_class The device class of the entities.\n * @param {string} area_id\n *\n * @return {string} The template string.\n * @static\n */\n /**\n * Get a template string to define the average state of sensor entities with a given device class.\n *\n * @param {string} device_class The device class of the entities.\n * @param {string | string[]} area_slug The area slug(s) to filter entities by.\n *\n * @return {string} The template string.\n * @static\n */\n static getAverageStateTemplate(device_class: string, area_slug: string | string[] = \"global\"): string {\n const states: string[] = [];\n\n if (!this.isInitialized()) {\n console.warn(\"Helper class should be initialized before calling this method!\");\n }\n\n const areaSlugs = Array.isArray(area_slug) ? area_slug : [area_slug];\n\n for (const slug of areaSlugs) {\n const magic_entity = getMAEntity(slug!, \"sensor\", device_class);\n const newStates = magic_entity\n ? [`states['${magic_entity.entity_id}']`]\n : slug\n ? this.#areas[slug]?.domains[device_class]?.map((entity_id) => `states['${entity_id}']`) || []\n : [];\n states.push(...newStates);\n }\n\n return `{% set entities = [${states}] %}{{ (entities | selectattr('attributes.device_class', 'defined') | selectattr('attributes.device_class', 'eq', '${device_class}') | map(attribute='state') | map('float') | sum / entities | length) | round(1) }} {{ ${states[0]}.attributes.unit_of_measurement }}`;\n }\n\n /**\n * Get device entities from the entity registry, filtered by area and domain.\n *\n * The entity registry is a registry where Home-Assistant keeps track of all entities.\n * A device is represented in Home Assistant via one or more entities.\n *\n * The result excludes hidden and disabled entities.\n *\n * @param {AreaRegistryEntry} area Area entity.\n * @param {string} domain The domain of the entity-id.\n *\n * @return {StrategyEntity[]} Array of device entities.\n * @static\n */\n static getAreaEntities(area: StrategyArea, domain?: string): StrategyEntity[] {\n\n if (!this.isInitialized()) {\n console.warn(\"Helper class should be initialized before calling this method!\");\n }\n\n if (domain) {\n return area.domains[domain]?.map(entity_id => this.#entities[entity_id]) ?? []\n } else {\n return area.entities.map(entity_id => this.#entities[entity_id]) ?? []\n }\n }\n\n /**\n * Get state entities, filtered by area and domain.\n *\n * The result excludes hidden and disabled entities.\n *\n * @param {StrategyArea} area Area entity.\n * @param {string} domain Domain of the entity-id.\n *\n * @return {HassEntity[]} Array of state entities.\n */\n static getStateEntities(area: StrategyArea, domain: string): HassEntity[] {\n if (!this.isInitialized()) {\n console.warn(\"Helper class should be initialized before calling this method!\");\n }\n\n // Get states whose entity-id starts with the given string.\n const stateEntities = this.#areas[area.slug].domains[domain]?.map(entity_id => this.#hassStates[entity_id]);\n\n return stateEntities;\n }\n\n /**\n * Sanitize a classname.\n *\n * The name is sanitized by capitalizing the first character of the name or after an underscore.\n * Underscores are removed.\n *\n * @param {string} className Name of the class to sanitize.\n * @returns {string} The sanitized classname.\n */\n static sanitizeClassName(className: string): string {\n className = className.charAt(0).toUpperCase() + className.slice(1);\n\n return className.replace(/([-_][a-z])/g, (group) => group\n .toUpperCase()\n .replace(\"-\", \"\")\n .replace(\"_\", \"\"),\n );\n }\n\n /**\n * Get the ids of the views which aren't set to hidden in the strategy options.\n *\n * @return {string[]} An array of view ids.\n */\n static getExposedViewIds(): string[] {\n if (!this.isInitialized()) {\n console.warn(\"Helper class should be initialized before calling this method!\");\n }\n\n return this.#getObjectKeysByPropertyValue(this.#strategyOptions.views, \"hidden\", false);\n }\n\n /**\n * Get the ids of the domain ids which aren't set to hidden in the strategy options.\n *\n * @return {string[]} An array of domain ids.\n */\n static getExposedDomainIds(): string[] {\n if (!this.isInitialized()) {\n console.warn(\"Helper class should be initialized before calling this method!\");\n }\n\n return this.#getObjectKeysByPropertyValue(this.#strategyOptions.domains, \"hidden\", false);\n }\n\n /**\n * Get the keys of nested objects by its property value.\n *\n * @param {Object} object An object of objects.\n * @param {string|number} property The name of the property to evaluate.\n * @param {*} value The value which the property should match.\n *\n * @return {string[]} An array with keys.\n */\n static #getObjectKeysByPropertyValue(\n object: { [k: string]: any },\n property: string, value: any\n ): string[] {\n const keys: string[] = [];\n\n for (const key of Object.keys(object)) {\n if (object[key][property] === value) {\n keys.push(key);\n }\n }\n\n return keys;\n }\n\n /**\n * Logs an error message to the console.\n *\n * @param {string} userMessage - The error message to display.\n * @param {unknown} [e] - (Optional) The error object or additional information.\n *\n * @return {void}\n */\n static logError(userMessage: string, e?: unknown): void {\n if (Helper.debug) {\n console.error(userMessage, e);\n\n return;\n }\n\n console.error(userMessage);\n }\n\n /**\n * Get entity state.\n *\n * @return {HassEntity}\n */\n static getEntityState(entity_id: string): HassEntity {\n return this.#hassStates[entity_id]\n }\n\n /**\n * Get entity domain.\n *\n * @return {string}\n */\n static getEntityDomain(entityId: string): string {\n return entityId.split(\".\")[0];\n }\n\n /**\n * Get translation.\n *\n * @return {string}\n */\n static localize(translationKey: string): string {\n return this.#hassLocalize(translationKey) ?? \"translation not found\";\n }\n\n /**\n * Get valid entity.\n *\n * @return {StrategyEntity}\n */\n static getValidEntity(entity: StrategyEntity): Boolean {\n return entity.disabled_by === null && entity.hidden_by === null\n }\n\n static getFromDomainState({ domain, operator, value, ifReturn, elseReturn, area_slug }: { domain: string, operator?: string, value?: string | string[], ifReturn?: string, elseReturn?: string, area_slug?: string | string[] }): string {\n const states: string[] = [];\n\n if (!this.isInitialized()) {\n console.warn(\"Helper class should be initialized before calling this method!\");\n }\n\n const areaSlugs = Array.isArray(area_slug) ? area_slug : [area_slug];\n\n for (const slug of areaSlugs) {\n if (slug) {\n const magic_entity = getMAEntity(slug!, domain);\n const newStates = domain === \"all\"\n ? this.#areas[slug]?.entities.map((entity_id) => `states['${entity_id}']`)\n : magic_entity\n ? [`states['${magic_entity.entity_id}']`] : area_slug === \"global\"\n ? this.domains[domain]?.map((entity) => `states['${entity.entity_id}']`)\n : this.#areas[slug]?.domains[domain]?.map((entity_id) => `states['${entity_id}']`);\n if (newStates) {\n states.push(...newStates);\n }\n } else {\n // Get the ID of the devices which are linked to the given area.\n for (const area of Object.values(this.#areas)) {\n if (area.area_id === UNDISCLOSED) continue\n\n const newStates = domain === \"all\"\n ? this.#areas[area.slug]?.entities.map((entity_id) => `states['${entity_id}']`)\n : this.#areas[area.slug]?.domains[domain]?.map((entity_id) => `states['${entity_id}']`);\n if (newStates) {\n states.push(...newStates);\n }\n }\n }\n }\n\n if (domain === \"light\") {\n ifReturn = ifReturn ?? \"amber\";\n }\n if (domain === \"climate\") {\n operator = operator ?? \"ne\";\n value = value ?? \"off\";\n ifReturn = ifReturn ?? \"orange\";\n }\n if (domain === \"cover\") {\n value = value ?? \"open\";\n ifReturn = ifReturn ?? \"cyan\";\n }\n if (domain === \"fan\") {\n ifReturn = ifReturn ?? \"green\";\n }\n if (domain === \"media_player\") {\n value = value ?? \"playing\";\n ifReturn = ifReturn ?? \"dark-blue\";\n }\n if (domain === \"switch\") {\n ifReturn = ifReturn ?? \"blue\";\n }\n\n const formatedValue = Array.isArray(value) ? JSON.stringify(value).replaceAll('\"', \"'\") : `'${value ?? 'on'}'`;\n\n return `{% set entities = [${states}] %}{{ '${ifReturn ?? 'white'}' if entities | selectattr('state','${operator ?? 'eq'}', ${formatedValue}) | list | count > 0 else '${elseReturn ?? 'grey'}' }}`;\n }\n\n static getBinarySensorColorFromState(device_class: string, operator: string, value: string, ifReturn: string, elseReturn: string, area_slug: string | string[] = \"global\"): string {\n const states: string[] = [];\n\n if (!this.isInitialized()) {\n console.warn(\"Helper class should be initialized before calling this method!\");\n }\n\n const areaSlugs = Array.isArray(area_slug) ? area_slug : [area_slug];\n\n for (const slug of areaSlugs) {\n const magic_entity = getMAEntity(slug!, \"binary_sensor\", device_class);\n\n const newStates = magic_entity\n ? [`states['${magic_entity.entity_id}']`]\n : area_slug === \"global\"\n ? this.domains[device_class]?.map((entity) => `states['${entity.entity_id}']`)\n : this.#areas[slug]?.domains[device_class]?.map((entity_id) => `states['${entity_id}']`);\n\n if (newStates) states.push(...newStates);\n }\n\n return `\n {% set entities = [${states}] %}\n {{ '${ifReturn}' if entities | selectattr('attributes.device_class', 'defined') | selectattr('attributes.device_class', 'eq', '${device_class}') | selectattr('state','${operator}','${value}') | list | count else '${elseReturn}' }}`;\n }\n\n static getSensorColorFromState(device_class: string, area_slug: string | string[] = \"global\"): string | undefined {\n const states: string[] = [];\n\n if (!this.isInitialized()) {\n console.warn(\"Helper class should be initialized before calling this method!\");\n }\n\n const areaSlugs = Array.isArray(area_slug) ? area_slug : [area_slug];\n\n\n for (const slug of areaSlugs) {\n const magic_entity = getMAEntity(slug!, \"binary_sensor\", device_class);\n\n const newStates = magic_entity\n ? [`states['${magic_entity.entity_id}']`]\n : area_slug === \"global\"\n ? this.domains[device_class]?.map((entity) => `states['${entity.entity_id}']`)\n : this.#areas[slug]?.domains[device_class]?.map((entity_id) => `states['${entity_id}']`);\n\n if (newStates) states.push(...newStates);\n }\n\n if (device_class === \"battery\") {\n return `\n {% set entities = [${states}] %}\n {% set bl = entities | selectattr('attributes.device_class', 'defined') | selectattr('attributes.device_class', 'eq', '${device_class}') | map(attribute='state') | map('float') | sum / entities | length %}\n {% if bl < 20 %}\n red\n {% elif bl < 30 %}\n orange\n {% elif bl >= 30 %}\n green\n {% else %}\n disabled\n {% endif %}\n `;\n }\n\n if (device_class === \"temperature\") {\n return `\n {% set entities = [${states}] %}\n {% set bl = entities | selectattr('attributes.device_class', 'defined') | selectattr('attributes.device_class', 'eq', '${device_class}') | map(attribute='state') | map('float') | sum / entities | length %}\n {% if bl < 20 %}\n blue\n {% elif bl < 30 %}\n orange\n {% elif bl >= 30 %}\n red\n {% else %}\n disabled\n {% endif %}\n `;\n }\n\n if (device_class === \"humidity\") {\n return `\n {% set entities = [${states}] %}\n {% set humidity = entities | selectattr('attributes.device_class', 'defined') | selectattr('attributes.device_class', 'eq', '${device_class}') | map(attribute='state') | map('float') | sum / entities | length %}\n {% if humidity < 30 %}\n blue\n {% elif humidity >= 30 and humidity <= 60 %}\n green\n {% else %}\n red\n {% endif %}\n `;\n }\n\n return undefined;\n }\n\n static getSensorIconFromState(device_class: string, area_slug: string | string[] = \"global\"): string | undefined {\n const states: string[] = [];\n\n if (!this.isInitialized()) {\n console.warn(\"Helper class should be initialized before calling this method!\");\n }\n\n const areaSlugs = Array.isArray(area_slug) ? area_slug : [area_slug];\n\n for (const slug of areaSlugs) {\n const magic_entity = getMAEntity(slug!, \"sensor\", device_class);\n const newStates = magic_entity\n ? [`states['${magic_entity.entity_id}']`]\n : slug\n ? this.#areas[slug]?.domains[device_class]?.map((entity_id) => `states['${entity_id}']`) || []\n : [];\n states.push(...newStates);\n }\n\n if (device_class === \"battery\") {\n return `\n {% set entities = [${states}] %}\n {% set bl = entities | selectattr('attributes.device_class', 'defined') | selectattr('attributes.device_class', 'eq', '${device_class}') | map(attribute='state') | map('float') | sum / entities | length %}\n {% if bl == 'unknown' or bl == 'unavailable' %}\n {% elif bl < 10 %} mdi:battery-outline\n {% elif bl < 20 %} mdi:battery-10\n {% elif bl < 30 %} mdi:battery-20\n {% elif bl < 40 %} mdi:battery-30\n {% elif bl < 50 %} mdi:battery-40\n {% elif bl < 60 %} mdi:battery-50\n {% elif bl < 70 %} mdi:battery-60\n {% elif bl < 80 %} mdi:battery-70\n {% elif bl < 90 %} mdi:battery-80\n {% elif bl < 100 %} mdi:battery-90\n {% elif bl == 100 %} mdi:battery\n {% else %} mdi:battery{% endif %}\n `;\n }\n\n if (device_class === \"temperature\") {\n return `\n {% set entities = [${states}] %}\n {% set bl = entities | selectattr('attributes.device_class', 'defined') | selectattr('attributes.device_class', 'eq', '${device_class}') | map(attribute='state') | map('float') | sum / entities | length %}\n {% if bl < 20 %}\n mdi:thermometer-low\n {% elif bl < 30 %}\n mdi:thermometer\n {% elif bl >= 30 %}\n mdi:thermometer-high\n {% else %}\n disabled\n {% endif %}\n `;\n }\n\n return undefined;\n }\n}\n\nexport { Helper };\n","import { Helper } from \"../Helper\";\nimport { cards } from \"../types/strategy/cards\";\nimport { generic } from \"../types/strategy/generic\";\nimport { EntityCardConfig } from \"../types/lovelace-mushroom/cards/entity-card-config\";\n\n/**\n * Abstract Card Class\n *\n * To create a new card, extend the new class with this one.\n *\n * @class\n * @abstract\n */\nabstract class AbstractCard {\n /**\n * Entity to create the card for.\n *\n * @type {generic.RegistryEntry}\n */\n entity: generic.RegistryEntry;\n\n /**\n * Configuration of the card.\n *\n * @type {EntityCardConfig}\n */\n config: EntityCardConfig = {\n type: \"custom:mushroom-entity-card\",\n icon: \"mdi:help-circle\",\n };\n\n /**\n * Class constructor.\n *\n * @param {generic.RegistryEntry} entity The hass entity to create a card for.\n * @throws {Error} If the Helper module isn't initialized.\n */\n protected constructor(entity: generic.RegistryEntry) {\n if (!Helper.isInitialized()) {\n throw new Error(\"The Helper module must be initialized before using this one.\");\n }\n\n this.entity = entity;\n }\n\n /**\n * Get a card.\n *\n * @return {cards.AbstractCardConfig} A card object.\n */\n getCard(): cards.AbstractCardConfig {\n return {\n ...this.config,\n entity: this.entity && \"entity_id\" in this.entity ? this.entity.entity_id : undefined,\n };\n }\n}\n\nexport { AbstractCard };\n","import { StackCardConfig } from \"../types/homeassistant/lovelace/cards/types\";\nimport { LovelaceCardConfig } from \"../types/homeassistant/data/lovelace\";\nimport { getAggregateEntity, getAreaName, getFloorName, getStateContent, groupBy } from \"../utils\";\nimport { Helper } from \"../Helper\";\nimport { TemplateCardConfig } from \"../types/lovelace-mushroom/cards/template-card-config\";\nimport { UNDISCLOSED } from \"../variables\";\n\ninterface AggregateCardConfig {\n title?: string;\n subtitle?: string;\n device_name?: string;\n device_class?: string | string[];\n}\n\n/**\n * Aggregate Card class.\n *\n * Used for creating a Title Card with controls.\n *\n * @class\n */\nclass AggregateCard {\n /**\n * @type {string} The domain to control the entities of.\n * @private\n */\n readonly #domain: string;\n\n /**\n * Default configuration of the card.\n *\n * @type {AggregateCardConfig}\n * @private\n */\n readonly #defaultConfig: AggregateCardConfig = {\n device_name: \"Global\",\n };\n\n /**\n * Class constructor.\n *\n * @param {string} domain The domain to control the entities of.\n * @param {AggregateCardConfig} options Aggregate Card options.\n */\n constructor(domain: string, options: AggregateCardConfig = {}) {\n this.#domain = domain;\n this.#defaultConfig = {\n ...this.#defaultConfig,\n ...options,\n };\n }\n\n /**\n * Create a Aggregate card.\n *\n * @return {StackCardConfig} A Aggregate card.\n */\n createCard(): StackCardConfig {\n\n const domains = typeof (this.#domain) === \"string\" ? [this.#domain] : this.#domain;\n const deviceClasses = this.#defaultConfig.device_class && typeof (this.#defaultConfig.device_class) === \"string\" ? [this.#defaultConfig.device_class] : this.#defaultConfig.device_class;\n\n const cards: LovelaceCardConfig[] = [];\n\n const globalEntities = getAggregateEntity(Helper.magicAreasDevices[\"global\"], domains, deviceClasses)[0] ?? false\n\n if (globalEntities) {\n cards.push({\n type: \"tile\",\n entity: globalEntities.entity_id,\n state_content: getStateContent(globalEntities.entity_id),\n color: globalEntities.entity_id.startsWith('binary_sensor.') ? 'red' : false,\n icon_tap_action: this.#domain === \"light\" ? \"more-info\" : \"toggle\",\n });\n }\n\n\n\n for (const floor of Helper.orderedFloors) {\n if (floor.areas_slug.length === 0) continue\n\n let floorCards: (TemplateCardConfig)[] = [];\n floorCards.push({\n type: \"custom:mushroom-title-card\",\n subtitle: getFloorName(floor),\n card_mod: {\n style: `\n ha-card.header {\n padding-top: 8px;\n }\n `,\n }\n });\n\n let areaCards: (TemplateCardConfig)[] = [];\n\n for (const [i, area] of floor.areas_slug.map(area_slug => Helper.areas[area_slug]).entries()) {\n\n if (Helper.strategyOptions.areas[area?.slug]?.hidden) continue\n\n if (area.slug !== UNDISCLOSED) {\n const areaEntities = getAggregateEntity(Helper.magicAreasDevices[area.slug], domains, deviceClasses).map(e => e.entity_id).filter(Boolean)\n\n for (const areaEntity of areaEntities) {\n areaCards.push({\n type: \"tile\",\n entity: areaEntity,\n primary: getAreaName(area),\n state_content: getStateContent(areaEntity),\n color: areaEntity.startsWith('binary_sensor.') ? 'red' : false,\n });\n }\n }\n\n // Horizontally group every two area cards if all cards are created.\n if (i === floor.areas_slug.length - 1) {\n for (let i = 0; i < areaCards.length; i += 2) {\n floorCards.push({\n type: \"horizontal-stack\",\n cards: areaCards.slice(i, i + 2),\n });\n }\n }\n\n }\n\n if (areaCards.length === 0) floorCards.pop()\n\n if (floorCards.length > 1) cards.push(...floorCards)\n\n }\n\n return {\n type: \"vertical-stack\",\n cards: cards,\n };\n }\n}\n\nexport { AggregateCard };\n","import { AbstractCard } from \"./AbstractCard\";\nimport { EntityRegistryEntry } from \"../types/homeassistant/data/entity_registry\";\nimport { TileCardConfig } from \"../types/homeassistant/lovelace/cards/types\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Alarm Card Class\n *\n * Used to create a card for controlling an entity of the fan domain.\n *\n * @class\n * @extends AbstractCard\n */\nclass AlarmCard extends AbstractCard {\n /**\n * Default configuration of the card.\n *\n * @type {TileCardConfig}\n * @private\n */\n #defaultConfig: TileCardConfig = {\n type: \"tile\",\n entity: undefined,\n icon: undefined,\n features: [\n {\n type: \"alarm-modes\",\n modes: [\"armed_home\", \"armed_away\", \"armed_night\", \"armed_vacation\", \"armed_custom_bypass\", \"disarmed\"]\n }\n ]\n };\n\n /**\n * Class constructor.\n *\n * @param {EntityRegistryEntry} entity The hass entity to create a card for.\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor(entity: EntityRegistryEntry) {\n super(entity);\n\n this.config = Object.assign(this.config, this.#defaultConfig);\n }\n}\n\nexport { AlarmCard };\n","import { SensorCard } from \"./SensorCard\";\nimport { cards } from \"../types/strategy/cards\";\nimport { EntityRegistryEntry } from \"../types/homeassistant/data/entity_registry\";\nimport { EntityCardConfig } from \"../types/lovelace-mushroom/cards/entity-card-config\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Sensor Card Class\n *\n * Used to create a card for controlling an entity of the binary_sensor domain.\n *\n * @class\n * @extends SensorCard\n */\nclass BinarySensorCard extends SensorCard {\n /**\n * Default configuration of the card.\n *\n * @type {EntityCardConfig}\n * @private\n */\n #defaultConfig: EntityCardConfig = {\n type: \"tile\",\n icon: undefined,\n state_content: \"last_changed\",\n vertical: false,\n };\n\n /**\n * Class constructor.\n *\n * @param {EntityRegistryEntry} entity The hass entity to create a card for.\n * @param {cards.EntityCardOptions} [options={}] Options for the card.\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor(entity: EntityRegistryEntry, options: cards.EntityCardOptions = {}) {\n super(entity);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport { BinarySensorCard };\n","import {AbstractCard} from \"./AbstractCard\";\nimport {cards} from \"../types/strategy/cards\";\nimport {EntityRegistryEntry} from \"../types/homeassistant/data/entity_registry\";\nimport {PictureEntityCardConfig} from \"../types/homeassistant/panels/lovelave/cards/types\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Camera Card Class\n *\n * Used to create a card for controlling an entity of the camera domain.\n *\n * @class\n * @extends AbstractCard\n */\nclass CameraCard extends AbstractCard {\n /**\n * Default configuration of the card.\n *\n * @type {PictureEntityCardConfig}\n * @private\n */\n #defaultConfig: PictureEntityCardConfig = {\n entity: \"\",\n type: \"picture-entity\",\n show_name: false,\n show_state: false,\n camera_view: \"live\",\n };\n\n /**\n * Class constructor.\n *\n * @param {EntityRegistryEntry} entity The hass entity to create a card for.\n * @param {cards.PictureEntityCardOptions} [options={}] Options for the card.\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor(entity: EntityRegistryEntry, options: cards.PictureEntityCardOptions = {}) {\n super(entity);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport {CameraCard};\n","import { AbstractCard } from \"./AbstractCard\";\nimport { cards } from \"../types/strategy/cards\";\nimport { EntityRegistryEntry } from \"../types/homeassistant/data/entity_registry\";\nimport { ClimateCardConfig } from \"../types/lovelace-mushroom/cards/climate-card-config\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Climate Card Class\n *\n * Used to create a card for controlling an entity of the climate domain.\n *\n * @class\n * @extends AbstractCard\n */\nclass ClimateCard extends AbstractCard {\n /**\n * Default configuration of the card.\n *\n * @type {ClimateCardConfig}\n * @private\n */\n #defaultConfig: ClimateCardConfig = {\n type: \"thermostat\",\n icon: undefined,\n show_current_as_primary: true,\n vertical: false,\n features: [\n {\n type: \"target-temperature\"\n },\n {\n type: \"climate-preset-modes\",\n style: \"icons\",\n preset_modes: [\"home\", \"eco\", \"comfort\", \"away\", \"boost\"]\n },\n {\n type: \"climate-hvac-modes\",\n hvac_modes: [\n \"auto\",\n \"heat_cool\",\n \"heat\",\n \"cool\",\n \"dry\",\n \"fan_only\",\n \"off\",\n ]\n },\n {\n type: \"climate-fan-modes\",\n style: \"icons\",\n fan_modes: [\n \"off\",\n \"low\",\n \"medium\",\n \"high\",\n ]\n }\n ],\n\n layout_options: {\n grid_columns: 2,\n grid_rows: 1,\n },\n };\n\n /**\n * Class constructor.\n *\n * @param {EntityRegistryEntry} entity The hass entity to create a card for.\n * @param {cards.ClimateCardOptions} [options={}] Options for the card.\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor(entity: EntityRegistryEntry, options: cards.ClimateCardOptions = {}) {\n super(entity);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport { ClimateCard };\n","import { cards } from \"../types/strategy/cards\";\nimport { LovelaceBadgeConfig, LovelaceCardConfig } from \"../types/homeassistant/data/lovelace\";\nimport { Helper } from \"../Helper\";\nimport { getMAEntity, navigateTo } from \"../utils\";\nimport { HassServiceTarget } from \"home-assistant-js-websocket\";\n\n/**\n * Controller Card class.\n *\n * Used for creating a Title Card with controls.\n *\n * @class\n */\nclass ControllerCard {\n /**\n * @type {ExtendedHassServiceTarget} The target to control the entities of.\n * @private\n */\n readonly #target: HassServiceTarget;\n\n /**\n * @type {string} The target to control the entities of.\n * @private\n */\n readonly #domain: string;\n\n /**\n * @type {string} The target to control the entities of.\n * @private\n */\n readonly #magic_device_id: string;\n\n /**\n * Default configuration of the card.\n *\n * @type {cards.ControllerCardConfig}\n * @private\n */\n readonly #defaultConfig: cards.ControllerCardConfig = {\n type: \"custom:mushroom-title-card\",\n showControls: true,\n iconOn: \"mdi:power-on\",\n iconOff: \"mdi:power-off\",\n onService: \"none\",\n offService: \"none\",\n };\n\n /**\n * Class constructor.\n *\n * @param {HassServiceTarget} target The target to control the entities of.\n * @param {cards.ControllerCardOptions} options Controller Card options.\n */\n constructor(target: HassServiceTarget, options: cards.ControllerCardOptions = {}, domain: string, magic_device_id: string = \"global\") {\n this.#target = target;\n this.#domain = domain;\n this.#magic_device_id = magic_device_id;\n this.#defaultConfig = {\n ...this.#defaultConfig,\n ...options,\n };\n }\n\n /**\n * Create a Controller card.\n *\n * @return {LovelaceCardConfig[]} A Controller card.\n */\n createCard(): LovelaceCardConfig[] {\n const cards: LovelaceCardConfig[] = [];\n\n if (this.#defaultConfig.title) {\n cards.push({\n type: \"heading\",\n heading: this.#defaultConfig.title ?? \"No title\",\n icon: this.#defaultConfig.titleIcon,\n heading_style: \"title\",\n badges: [],\n layout_options: {\n grid_columns: \"full\",\n grid_rows: 1\n },\n ...(this.#defaultConfig.titleNavigate && {\n tap_action: navigateTo(this.#defaultConfig.titleNavigate)\n })\n })\n }\n\n if (this.#defaultConfig.subtitle) {\n cards.push({\n type: \"heading\",\n heading_style: \"subtitle\",\n badges: [],\n heading: this.#defaultConfig.subtitle,\n icon: this.#defaultConfig.subtitleIcon,\n layout_options: {\n grid_columns: \"full\",\n grid_rows: 1\n },\n ...(this.#defaultConfig.subtitleNavigate && {\n tap_action: navigateTo(this.#defaultConfig.subtitleNavigate),\n })\n })\n }\n\n if (this.#defaultConfig.showControls || this.#defaultConfig.extraControls) {\n\n const magic_device = Helper.magicAreasDevices[this.#magic_device_id ?? \"\"]\n const badges: LovelaceBadgeConfig[] = [];\n\n if (this.#defaultConfig.showControls) {\n\n const chipModule = Helper.strategyOptions.domains[this.#domain]?.controlChip;\n const chipOptions = {\n show_content: true,\n magic_device_id: this.#magic_device_id,\n tap_action: { action: \"more-info\" },\n ...this.#defaultConfig.controlChipOptions,\n };\n const chip = typeof chipModule === 'function' && new chipModule(chipOptions).getChip();\n\n badges.push({\n type: \"custom:mushroom-chips-card\",\n chips: [chip],\n card_mod: {\n style: `\n ha-card {\n min-width: 80px;\n }\n `,\n }\n });\n }\n\n if (magic_device && this.#defaultConfig.extraControls) {\n badges.push(...this.#defaultConfig.extraControls(magic_device)?.map((chip: any) => {\n return {\n type: \"custom:mushroom-chips-card\",\n chips: [chip]\n }\n }));\n }\n\n if (cards[0]?.badges && badges.length) {\n cards[0].badges = badges;\n }\n }\n\n return cards;\n }\n}\n\nexport { ControllerCard };\n","import {AbstractCard} from \"./AbstractCard\";\nimport {cards} from \"../types/strategy/cards\";\nimport {EntityRegistryEntry} from \"../types/homeassistant/data/entity_registry\";\nimport {CoverCardConfig} from \"../types/lovelace-mushroom/cards/cover-card-config\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Cover Card Class\n *\n * Used to create a card for controlling an entity of the cover domain.\n *\n * @class\n * @extends AbstractCard\n */\nclass CoverCard extends AbstractCard {\n /**\n * Default configuration of the card.\n *\n * @type {CoverCardConfig}\n * @private\n */\n #defaultConfig: CoverCardConfig = {\n type: \"tile\",\n icon: undefined,\n features: [\n {\n type: \"cover-open-close\"\n }\n ]\n };\n\n /**\n * Class constructor.\n *\n * @param {EntityRegistryEntry} entity The hass entity to create a card for.\n * @param {cards.CoverCardOptions} [options={}] Options for the card.\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor(entity: EntityRegistryEntry, options: cards.CoverCardOptions = {}) {\n super(entity);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport {CoverCard};\n","import {AbstractCard} from \"./AbstractCard\";\nimport {cards} from \"../types/strategy/cards\";\nimport {EntityRegistryEntry} from \"../types/homeassistant/data/entity_registry\";\nimport {FanCardConfig} from \"../types/lovelace-mushroom/cards/fan-card-config\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Fan Card Class\n *\n * Used to create a card for controlling an entity of the fan domain.\n *\n * @class\n * @extends AbstractCard\n */\nclass FanCard extends AbstractCard {\n /**\n * Default configuration of the card.\n *\n * @type {FanCardConfig}\n * @private\n */\n #defaultConfig: FanCardConfig = {\n type: \"tile\",\n icon: undefined,\n features:[\n {\n type: \"fan-speed\"\n }\n ]\n };\n\n /**\n * Class constructor.\n *\n * @param {EntityRegistryEntry} entity The hass entity to create a card for.\n * @param {cards.FanCardOptions} [options={}] Options for the card.\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor(entity: EntityRegistryEntry, options: cards.FanCardOptions = {}) {\n super(entity);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport {FanCard};\n","import { AbstractCard } from \"./AbstractCard\";\nimport { cards } from \"../types/strategy/cards\";\nimport { TemplateCardConfig } from \"../types/lovelace-mushroom/cards/template-card-config\";\nimport { Helper } from \"../Helper\";\nimport { ControlChip } from \"../chips/ControlChip\";\nimport { AggregateChip } from \"../chips/AggregateChip\";\nimport { AreaStateChip } from \"../chips/AreaStateChip\";\nimport { generic } from \"../types/strategy/generic\";\nimport StrategyArea = generic.StrategyArea;\nimport MagicAreaRegistryEntry = generic.MagicAreaRegistryEntry;\nimport { getAreaName, getMAEntity, slugify } from \"../utils\";\nimport { EntityRegistryEntry } from \"../types/homeassistant/data/entity_registry\";\nimport { ClimateChip } from \"../chips/ClimateChip\";\nimport { LightChip } from \"../chips/LightChip\";\nimport { ConditionalChip } from \"../chips/ConditionalChip\";\nimport { UNAVAILABLE, UNDISCLOSED } from \"../variables\";\n\n// Utility function to generate badge icon and color\nconst getBadgeIcon = (entityId: string) => `\n {% set bl = states('${entityId}') %}\n {% if bl == 'unknown' or bl == 'unavailable' %}\n {% elif bl | int() < 10 %} mdi:battery-outline\n {% elif bl | int() < 20 %} mdi:battery-10\n {% elif bl | int() < 30 %} mdi:battery-20\n {% elif bl | int() < 40 %} mdi:battery-30\n {% elif bl | int() < 50 %} mdi:battery-40\n {% elif bl | int() < 60 %} mdi:battery-50\n {% elif bl | int() < 70 %} mdi:battery-60\n {% elif bl | int() < 80 %} mdi:battery-70\n {% elif bl | int() < 90 %} mdi:battery-80\n {% elif bl | int() < 100 %} mdi:battery-90\n {% elif bl | int() == 100 %} mdi:battery\n {% else %} mdi:battery-unknown\n {% endif %}\n`;\n\nconst getBadgeColor = (entityId: string) => `\n {% set bl = states('${entityId}') %}\n {% if bl == 'unknown' or bl == 'unavailable' %} disabled\n {% elif bl | int() < 10 %} red\n {% elif bl | int() < 20 %} red\n {% elif bl | int() < 30 %} red\n {% elif bl | int() < 40 %} orange\n {% elif bl | int() < 50 %} orange\n {% elif bl | int() < 60 %} green\n {% elif bl | int() < 70 %} green\n {% elif bl | int() < 80 %} green\n {% elif bl | int() < 90 %} green\n {% elif bl | int() == 100 %} green\n {% else %} disabled\n {% endif %}\n`;\n\nclass HomeAreaCard extends AbstractCard {\n constructor(options: cards.HomeAreaCardOptions) {\n\n const magicAreasEntity: EntityRegistryEntry = getMAEntity(options.area_slug, \"area_state\") as EntityRegistryEntry;\n\n const area = Helper.areas[options.area_slug];\n\n super(magicAreasEntity);\n const defaultConfig = options?.area_slug === UNDISCLOSED ? this.getUndisclosedAreaConfig(area) : this.getDefaultConfig(area);\n this.config = { ...this.config, ...defaultConfig, ...options };\n }\n\n getDefaultConfig(area: StrategyArea): TemplateCardConfig {\n\n const device = Helper.magicAreasDevices[area.slug];\n\n const { area_state, all_lights, aggregate_temperature, aggregate_battery, aggregate_health, aggregate_window, aggregate_door, aggregate_cover, aggregate_climate, light_control } = device?.entities || {};\n const icon = area.icon || \"mdi:home-outline\";\n\n const cards = [\n this.getMainCard(area, icon, aggregate_temperature, aggregate_battery, area_state),\n ];\n\n if (device) {\n cards.push(this.getChipsCard(area, device, area_state, aggregate_health, aggregate_window, aggregate_door, aggregate_cover, aggregate_climate, all_lights, light_control))\n }\n\n if (all_lights) {\n cards.push(this.getLightCard(all_lights));\n }\n\n return {\n type: \"custom:stack-in-card\",\n cards: cards\n };\n }\n\n getUndisclosedAreaConfig(area: StrategyArea): TemplateCardConfig {\n return {\n type: \"custom:mushroom-template-card\",\n primary: getAreaName(area),\n icon: \"mdi:devices\",\n icon_color: \"grey\",\n fill_container: true,\n layout: \"horizontal\",\n tap_action: { action: \"navigate\", navigation_path: area.slug },\n card_mod: { style: this.getCardModStyle() }\n };\n }\n\n getMainCard(area: StrategyArea, icon: string, aggregate_temperature: EntityRegistryEntry, aggregate_battery: EntityRegistryEntry, area_state: EntityRegistryEntry): any {\n return {\n type: \"custom:mushroom-template-card\",\n primary: getAreaName(area),\n secondary: aggregate_temperature && this.getTemperatureTemplate(aggregate_temperature),\n icon: icon,\n icon_color: this.getIconColorTemplate(area_state),\n fill_container: true,\n layout: \"horizontal\",\n badge_icon: getBadgeIcon(aggregate_battery?.entity_id),\n badge_color: getBadgeColor(aggregate_battery?.entity_id),\n tap_action: { action: \"navigate\", navigation_path: slugify(area.name) },\n card_mod: { style: this.getCardModStyle() }\n };\n }\n\n getChipsCard(area: StrategyArea, device: MagicAreaRegistryEntry, area_state: EntityRegistryEntry, aggregate_health: EntityRegistryEntry, aggregate_window: EntityRegistryEntry, aggregate_door: EntityRegistryEntry, aggregate_cover: EntityRegistryEntry, aggregate_climate: EntityRegistryEntry, all_lights: EntityRegistryEntry, light_control: EntityRegistryEntry): any {\n return {\n type: \"custom:mushroom-chips-card\",\n alignment: \"end\",\n chips: [\n new ConditionalChip(\n [{ entity: area_state?.entity_id, state_not: UNAVAILABLE }],\n new AreaStateChip(device).getChip()\n ).getChip(),\n new ConditionalChip(\n [{ entity: aggregate_health?.entity_id, state_not: \"on\" }],\n new AggregateChip({ device_class: \"health\" }).getChip()\n ).getChip(),\n new ConditionalChip(\n [{ entity: aggregate_window?.entity_id, state: \"on\" }],\n new AggregateChip({ magic_device_id: area.slug, area_slug: area.slug, device_class: \"window\", show_content: false }).getChip()\n ).getChip(),\n new ConditionalChip(\n [{ entity: aggregate_door?.entity_id, state: \"on\" }],\n new AggregateChip({ magic_device_id: area.slug, area_slug: area.slug, device_class: \"door\", show_content: false }).getChip()\n ).getChip(),\n new ConditionalChip(\n [{ entity: aggregate_cover?.entity_id, state: \"on\" }],\n new AggregateChip({ magic_device_id: area.slug, area_slug: area.slug, device_class: \"cover\", show_content: false }).getChip()\n ).getChip(),\n new ConditionalChip(\n [{ entity: aggregate_climate?.entity_id, state_not: UNAVAILABLE }],\n new ClimateChip({ magic_device_id: area.slug, area_slug: area.slug }).getChip()\n ).getChip(),\n new ConditionalChip(\n [{ entity: all_lights?.entity_id, state_not: UNAVAILABLE, }],\n new LightChip({ area_slug: area.slug, magic_device_id: area.slug, tap_action: { action: \"toggle\" } }).getChip()\n ).getChip(),\n new ConditionalChip(\n [{ entity: all_lights?.entity_id, state_not: UNAVAILABLE }],\n new ControlChip(\"light\", light_control?.entity_id).getChip()\n ).getChip()\n ].filter(Boolean),\n card_mod: { style: this.getChipsCardModStyle() }\n };\n }\n\n getLightCard(all_lights: EntityRegistryEntry): any {\n return {\n type: \"tile\",\n features: [{ type: \"light-brightness\" }],\n hide_state: true,\n entity: all_lights.entity_id,\n card_mod: { style: this.getLightCardModStyle() }\n };\n }\n\n getTemperatureTemplate(aggregate_temperature: EntityRegistryEntry): string {\n if (!aggregate_temperature) return Helper.getAverageStateTemplate(\"temperature\");\n return `\n {% set t = states('${aggregate_temperature?.entity_id}') %}\n {% if t != 'unknown' and t != 'unavailable' %}\n {{ t | float | round(1) }}{{ state_attr('${aggregate_temperature?.entity_id}', 'unit_of_measurement')}}\n {% endif %}\n `;\n }\n\n getIconColorTemplate(area_state: EntityRegistryEntry): string {\n return `\n {{ \"indigo\" if \"dark\" in state_attr('${area_state?.entity_id}', 'states') else \"amber\" }}\n `;\n }\n\n getCardModStyle(): string {\n return `\n :host {\n background: #1f1f1f;\n height: 66px;\n }\n mushroom-badge-icon {\n left: 24px;\n top: 0px;\n }\n ha-card {\n box-shadow: none!important;\n border: none;\n }\n ha-state-icon {\n --icon-symbol-size: 40px;\n }\n\n `;\n }\n\n getChipsCardModStyle(): string {\n return `\n ha-card {\n --chip-box-shadow: none;\n --chip-spacing: 0px;\n width: -webkit-fill-available;\n margin-top: -12px;\n }\n `;\n }\n\n getLightCardModStyle(): string {\n return `\n ha-card {\n box-shadow: none!important;\n border: none;\n margin-top: -12px;\n }\n ha-tile-icon {\n display: none;\n }\n ha-tile-info {\n display: none;\n }\n `;\n }\n}\n\nexport { HomeAreaCard };\n","import { cards } from \"../types/strategy/cards\";\nimport { LovelaceCardConfig } from \"../types/homeassistant/data/lovelace\";\n\n\nexport interface ImageAreaCardConfig extends LovelaceCardConfig {\n type: \"area\";\n area: string;\n show_camera: boolean;\n alert_classes?: string[];\n sensor_classes?: string[];\n card_mod?: {\n style: string;\n };\n}\n\n/**\n * Scene Card Class\n *\n * Used to create a card for an entity of the Scene domain.\n *\n * @class\n */\nclass ImageAreaCard {\n /**\n * Configuration of the card.\n *\n * @type {EntityCardConfig}\n */\n config: ImageAreaCardConfig = {\n type: \"area\",\n area: \"\",\n show_camera: true,\n alert_classes: [],\n sensor_classes: [],\n card_mod: {\n style: `\n .sensors {\n display: none;\n }\n .buttons {\n display: none;\n }\n `\n }\n };\n\n /**\n * Class constructor.\n *\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor(area_slug: string) {\n\n this.config.area = area_slug;\n }\n\n /**\n * Get a card.\n *\n * @return {cards.AbstractCardConfig} A card object.\n */\n getCard(): cards.AbstractCardConfig {\n return this.config;\n }\n}\n\nexport { ImageAreaCard };\n","import {AbstractCard} from \"./AbstractCard\";\nimport {cards} from \"../types/strategy/cards\";\nimport {EntityRegistryEntry} from \"../types/homeassistant/data/entity_registry\";\nimport {LightCardConfig} from \"../types/lovelace-mushroom/cards/light-card-config\";\nimport {generic} from \"../types/strategy/generic\";\nimport isCallServiceActionConfig = generic.isCallServiceActionConfig;\nimport isCallServiceActionTarget = generic.isCallServiceActionTarget;\n\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Light Card Class\n *\n * Used to create a card for controlling an entity of the light domain.\n *\n * @class\n * @extends AbstractCard\n */\nclass LightCard extends AbstractCard {\n /**\n * Default configuration of the card.\n *\n * @type {LightCardConfig}\n * @private\n */\n #defaultConfig: LightCardConfig = {\n type: \"tile\",\n icon: undefined,\n vertical: false,\n };\n\n /**\n * Class constructor.\n *\n * @param {EntityRegistryEntry} entity The hass entity to create a card for.\n * @param {cards.LightCardOptions} [options={}] Options for the card.\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor(entity: EntityRegistryEntry, options: cards.LightCardOptions = {}) {\n super(entity);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport {LightCard};\n","import {AbstractCard} from \"./AbstractCard\";\nimport {cards} from \"../types/strategy/cards\";\nimport {EntityRegistryEntry} from \"../types/homeassistant/data/entity_registry\";\nimport {LockCardConfig} from \"../types/lovelace-mushroom/cards/lock-card-config\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Lock Card Class\n *\n * Used to create a card for controlling an entity of the lock domain.\n *\n * @class\n * @extends AbstractCard\n */\nclass LockCard extends AbstractCard {\n /**\n * Default configuration of the card.\n *\n * @type {LockCardConfig}\n * @private\n */\n #defaultConfig: LockCardConfig = {\n type: \"custom:mushroom-lock-card\",\n icon: undefined,\n };\n\n /**\n * Class constructor.\n *\n * @param {EntityRegistryEntry} entity The hass entity to create a card for.\n * @param {cards.LockCardOptions} [options={}] Options for the card.\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor(entity: EntityRegistryEntry, options: cards.LockCardOptions = {}) {\n super(entity);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport {LockCard};\n","import {AbstractCard} from \"./AbstractCard\";\nimport {cards} from \"../types/strategy/cards\";\nimport {EntityRegistryEntry} from \"../types/homeassistant/data/entity_registry\";\nimport {MediaPlayerCardConfig} from \"../types/lovelace-mushroom/cards/media-player-card-config\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Mediaplayer Card Class\n *\n * Used to create a card for controlling an entity of the media_player domain.\n *\n * @class\n * @extends AbstractCard\n */\nclass MediaPlayerCard extends AbstractCard {\n /**\n * Default configuration of the card.\n *\n * @type {MediaPlayerCardConfig}\n * @private\n */\n #defaultConfig: MediaPlayerCardConfig = {\n type: \"custom:mushroom-media-player-card\",\n use_media_info: true,\n media_controls: [\n \"on_off\",\n \"play_pause_stop\",\n ],\n show_volume_level: true,\n volume_controls: [\n \"volume_mute\",\n \"volume_set\",\n \"volume_buttons\",\n ],\n };\n\n /**\n * Class constructor.\n *\n * @param {EntityRegistryEntry} entity The hass entity to create a card for.\n * @param {cards.MediaPlayerCardOptions} [options={}] Options for the card.\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor(entity: EntityRegistryEntry, options: cards.MediaPlayerCardOptions = {}) {\n super(entity);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport {MediaPlayerCard};\n","import {AbstractCard} from \"./AbstractCard\";\nimport {cards} from \"../types/strategy/cards\";\nimport {EntityRegistryEntry} from \"../types/homeassistant/data/entity_registry\";\nimport {EntityCardConfig} from \"../types/lovelace-mushroom/cards/entity-card-config\";\n\n/**\n * Miscellaneous Card Class\n *\n * Used to create a card an entity of any domain.\n *\n * @class\n * @extends AbstractCard\n */\nclass MiscellaneousCard extends AbstractCard {\n /**\n * Default configuration of the card.\n *\n * @type {EntityCardConfig}\n * @private\n */\n #defaultConfig: EntityCardConfig = {\n type: \"tile\",\n icon: undefined,\n vertical: false,\n };\n\n /**\n * Class constructor.\n *\n * @param {EntityRegistryEntry} entity The hass entity to create a card for.\n * @param {cards.EntityCardOptions} [options={}] Options for the card.\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor(entity: EntityRegistryEntry, options: cards.EntityCardOptions = {}) {\n super(entity);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport {MiscellaneousCard};\n","import {AbstractCard} from \"./AbstractCard\";\nimport {cards} from \"../types/strategy/cards\";\nimport {EntityRegistryEntry} from \"../types/homeassistant/data/entity_registry\";\nimport {NumberCardConfig} from \"../types/lovelace-mushroom/cards/number-card-config\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported\n/**\n * Number Card Class\n *\n * Used to create a card for controlling an entity of the number domain.\n *\n * @class\n * @extends AbstractCard\n */\nclass NumberCard extends AbstractCard {\n /**\n * Default configuration of the card.\n *\n * @type {NumberCardConfig}\n * @private\n */\n #defaultConfig: NumberCardConfig = {\n type: \"custom:mushroom-number-card\",\n icon: undefined,\n };\n\n /**\n * Class constructor.\n *\n * @param {EntityRegistryEntry} entity The hass entity to create a card for.\n * @param {cards.NumberCardOptions} [options={}] Options for the card.\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor(entity: EntityRegistryEntry, options: cards.NumberCardOptions = {}) {\n super(entity);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport {NumberCard};\n","import { AbstractCard } from \"./AbstractCard\";\nimport { cards } from \"../types/strategy/cards\";\nimport { EntityRegistryEntry } from \"../types/homeassistant/data/entity_registry\";\nimport { PersonCardConfig } from \"../types/lovelace-mushroom/cards/person-card-config\";\n\n/**\n * Person Card Class\n *\n * Used to create a card for an entity of the Person domain.\n *\n * @class\n * @extends AbstractCard\n */\nclass PersonCard extends AbstractCard {\n /**\n * Default configuration of the card.\n *\n * @type {PersonCardConfig}\n * @private\n */\n #defaultConfig: PersonCardConfig = {\n type: \"custom:mushroom-person-card\",\n icon_type: \"entity-picture\",\n };\n\n /**\n * Class constructor.\n *\n * @param {EntityRegistryEntry} entity The hass entity to create a card for.\n * @param {cards.PersonCardOptions} [options={}] Options for the card.\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor(entity: EntityRegistryEntry, options: cards.PersonCardOptions = {}) {\n super(entity);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport { PersonCard };\n","import {AbstractCard} from \"./AbstractCard\";\nimport {cards} from \"../types/strategy/cards\";\nimport {EntityRegistryEntry} from \"../types/homeassistant/data/entity_registry\";\nimport { SceneCardConfig } from \"../types/lovelace-mushroom/cards/scene-card-config\";\n\n/**\n * Scene Card Class\n *\n * Used to create a card for an entity of the Scene domain.\n *\n * @class\n * @extends AbstractCard\n */\nclass SceneCard extends AbstractCard {\n /**\n * Default configuration of the card.\n *\n * @type {SceneCardConfig}\n * @private\n */\n #defaultConfig: SceneCardConfig = {\n type: \"tile\",\n icon: undefined,\n vertical: false,\n icon_type: \"entity-picture\",\n };\n\n /**\n * Class constructor.\n *\n * @param {EntityRegistryEntry} entity The hass entity to create a card for.\n * @param {cards.SceneCardOptions} [options={}] Options for the card.\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor(entity: EntityRegistryEntry, options: cards.SceneCardOptions = {}) {\n super(entity);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport {SceneCard};\n","import {AbstractCard} from \"./AbstractCard\";\nimport {cards} from \"../types/strategy/cards\";\nimport {EntityRegistryEntry} from \"../types/homeassistant/data/entity_registry\";\nimport {EntityCardConfig} from \"../types/lovelace-mushroom/cards/entity-card-config\";\n\n/**\n * Sensor Card Class\n *\n * Used to create a card for controlling an entity of the sensor domain.\n *\n * @class\n * @extends AbstractCard\n */\nclass SensorCard extends AbstractCard {\n /**\n * Default configuration of the card.\n *\n * @type {EntityCardConfig}\n * @private\n */\n #defaultConfig: EntityCardConfig = {\n type: \"custom:mushroom-entity-card\",\n icon: \"mdi:information\",\n animate: true,\n line_color: \"green\",\n };\n\n /**\n * Class constructor.\n *\n * @param {EntityRegistryEntry} entity The hass entity to create a card for.\n * @param {cards.EntityCardOptions} [options={}] Options for the card.\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor(entity: EntityRegistryEntry, options: cards.EntityCardOptions = {}) {\n super(entity);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport {SensorCard};\n","import {AbstractCard} from \"./AbstractCard\";\nimport { SwipeCardConfig } from \"../types/lovelace-mushroom/cards/swipe-card-config\";\nimport { SwiperOptions } from \"swiper/types/swiper-options\";\nimport { EntityCardConfig } from \"../types/lovelace-mushroom/cards/entity-card-config\";\n\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Swipe Card Class\n *\n * Used to create a card for controlling an entity of the light domain.\n *\n * @class\n * @extends AbstractCard\n */\nclass SwipeCard {\n\n /**\n * Configuration of the card.\n *\n * @type {SwipeCardConfig}\n */\n config: SwipeCardConfig = {\n type: \"custom:swipe-card\",\n start_card: 1,\n parameters: {\n centeredSlides: false,\n followFinger: true,\n spaceBetween: 16,\n grabCursor: true,\n },\n cards: [],\n };\n\n /**\n * Class constructor.\n *\n * @param {AbstractCard[]} cards The hass entity to create a card for.\n * @param {SwiperOptions} [options={}] Options for the card.\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor(cards: (AbstractCard | EntityCardConfig)[], options?: SwiperOptions) {\n\n this.config.cards = cards;\n\n const multipleSlicesPerView = 2.2\n const slidesPerView = cards.length > 2 ? multipleSlicesPerView : cards.length ?? 1\n\n this.config.parameters = {...this.config.parameters, slidesPerView, ...options};\n }\n\n /**\n * Get a card.\n *\n * @return {SwipeCardConfig} A card object.\n */\n getCard(): SwipeCardConfig {\n return {\n ...this.config,\n };\n }\n}\n\nexport {SwipeCard};\n","import {AbstractCard} from \"./AbstractCard\";\nimport {cards} from \"../types/strategy/cards\";\nimport {EntityRegistryEntry} from \"../types/homeassistant/data/entity_registry\";\nimport {EntityCardConfig} from \"../types/lovelace-mushroom/cards/entity-card-config\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Switch Card Class\n *\n * Used to create a card for controlling an entity of the switch domain.\n *\n * @class\n * @extends AbstractCard\n */\nclass SwitchCard extends AbstractCard {\n /**\n * Default configuration of the card.\n *\n * @type {EntityCardConfig}\n * @private\n */\n #defaultConfig: EntityCardConfig = {\n type: \"tile\",\n icon: undefined,\n vertical: false,\n tap_action: {\n action: \"toggle\",\n },\n };\n\n /**\n * Class constructor.\n *\n * @param {EntityRegistryEntry} entity The hass entity to create a card for.\n * @param {cards.EntityCardOptions} [options={}] Options for the card.\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor(entity: EntityRegistryEntry, options: cards.EntityCardOptions = {}) {\n super(entity);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport {SwitchCard};\n","import {AbstractCard} from \"./AbstractCard\";\nimport {cards} from \"../types/strategy/cards\";\nimport {EntityRegistryEntry} from \"../types/homeassistant/data/entity_registry\";\nimport {VACUUM_COMMANDS, VacuumCardConfig} from \"../types/lovelace-mushroom/cards/vacuum-card-config\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Vacuum Card Class\n *\n * Used to create a card for controlling an entity of the vacuum domain.\n *\n * @class\n * @extends AbstractCard\n */\nclass VacuumCard extends AbstractCard {\n /**\n * Default configuration of the card.\n *\n * @type {VacuumCardConfig}\n * @private\n */\n #defaultConfig: VacuumCardConfig = {\n type: \"custom:mushroom-vacuum-card\",\n icon: undefined,\n icon_animation: true,\n commands: [...VACUUM_COMMANDS],\n tap_action: {\n action: \"more-info\",\n }\n };\n\n /**\n * Class constructor.\n *\n * @param {EntityRegistryEntry} entity The hass entity to create a card for.\n * @param {cards.VacuumCardOptions} [options={}] Options for the card.\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor(entity: EntityRegistryEntry, options: cards.VacuumCardOptions = {}) {\n super(entity);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport {VacuumCard};\n","import { HassServiceTarget } from \"home-assistant-js-websocket\";\nimport { LovelaceChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { Helper } from \"../Helper\";\nimport { generic } from \"../types/strategy/generic\";\nimport isCallServiceActionConfig = generic.isCallServiceActionConfig;\n\n/**\n * Abstract Chip class.\n *\n * To create a new chip, extend this one.\n *\n * @class\n * @abstract\n */\nabstract class AbstractChip {\n /**\n * Configuration of the chip.\n *\n * @type {LovelaceChipConfig}\n */\n config: LovelaceChipConfig = {\n type: \"template\"\n };\n\n /**\n * Class Constructor.\n */\n protected constructor() {\n if (!Helper.isInitialized()) {\n throw new Error(\"The Helper module must be initialized before using this one.\");\n }\n }\n\n // noinspection JSUnusedGlobalSymbols Method is called on dymanically imported classes.\n /**\n * Get the chip.\n *\n * @returns {LovelaceChipConfig} A chip.\n */\n getChip(): LovelaceChipConfig {\n return this.config;\n }\n\n /**\n * Set the target to switch.\n *\n * @param {HassServiceTarget} target Target to switch.\n */\n setTapActionTarget(target: HassServiceTarget) {\n if (\"tap_action\" in this.config && isCallServiceActionConfig(this.config.tap_action)) {\n this.config.tap_action.target = target;\n\n return;\n }\n\n if (Helper.debug) {\n console.warn(\n this.constructor.name\n + \" - Target not set: Invalid target or tap action.\");\n }\n }\n}\n\nexport { AbstractChip };\n","import { chips } from \"../types/strategy/chips\";\nimport { DEVICE_CLASSES } from \"../variables\";\nimport { AbstractChip } from \"./AbstractChip\";\nimport { Helper } from \"../Helper\";\nimport { navigateTo } from \"../utils\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Climate Chip class.\n *\n * Used to create a chip to indicate climate level.\n */\nclass AggregateChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @type {TemplateChipConfig | undefined}\n *\n */\n getDefaultConfig({ device_class, show_content = true, magic_device_id = \"global\", area_slug, tap_action }: chips.AggregateChipOptions) {\n\n const domain = DEVICE_CLASSES.sensor.includes(device_class) ? \"sensor\" : \"binary_sensor\"\n let icon = Helper.icons[domain][device_class]?.default\n let icon_color = \"\"\n let content = \"\"\n\n const device = Helper.magicAreasDevices[magic_device_id]\n const magicEntity = device?.entities[`aggregate_${device_class}`]\n\n if (domain === \"binary_sensor\") {\n content = show_content ? Helper.getDeviceClassCountTemplate(device_class, \"eq\", \"on\", area_slug) : \"\"\n icon_color = Helper.getBinarySensorColorFromState(device_class, \"eq\", \"on\", \"red\", \"grey\", area_slug)\n }\n\n if (domain === \"sensor\") {\n\n content = show_content ? Helper.getAverageStateTemplate(device_class, area_slug) : \"\"\n icon_color = Helper.getSensorColorFromState(device_class, area_slug!) ?? \"white\"\n icon = Helper.getSensorIconFromState(device_class, area_slug!) ?? icon\n\n if (device_class === \"illuminance\") {\n if (magicEntity) {\n icon_color = `{{ 'blue' if 'dark' in state_attr('${device?.entities.area_state?.entity_id}', 'states') else 'amber' }}`\n }\n }\n }\n\n if (device_class === \"cover\") {\n\n if (magicEntity) {\n icon_color = `{{ 'red' if is_state('${magicEntity.entity_id}', 'open') else 'grey' }}`\n content = show_content ? Helper.getDeviceClassCountTemplate(device_class, \"eq\", \"open\", area_slug) : \"\"\n }\n }\n\n if (device_class === \"health\") {\n icon_color = `{{ 'red' if is_state(entity, 'on') else 'green' }}`\n }\n\n return {\n entity: magicEntity?.entity_id,\n icon_color,\n icon,\n content: content,\n tap_action: tap_action ?? navigateTo(device_class),\n }\n }\n\n /**\n * Class Constructor.\n *\n * @param {chips.AggregateChipOptions} options The chip options.\n */\n constructor(options: chips.AggregateChipOptions) {\n super();\n\n const defaultConfig = this.getDefaultConfig(options)\n\n this.config = Object.assign(this.config, defaultConfig);\n\n }\n}\n\nexport { AggregateChip };\n","import { chips } from \"../types/strategy/chips\";\nimport { AlarmChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { AbstractChip } from \"./AbstractChip\";\nimport { navigateTo } from \"../utils\";\n\n// noinspection JSUnusedGlobalSymbols False positive.\n/**\n * Alarm Chip class.\n *\n * Used to create a chip for showing the alarm.\n */\nclass AlarmChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @private\n * @readonly\n */\n readonly #defaultConfig: AlarmChipConfig = {\n type: \"alarm-control-panel\",\n tap_action: navigateTo('security')\n };\n\n /**\n * Class Constructor.\n *\n * @param {string} entityId Id of a alarm entity.\n * @param {chips.AlarmChipOptions} options Alarm Chip options.\n */\n constructor(entityId: string, options: chips.AlarmChipOptions = {}) {\n super();\n this.#defaultConfig = {\n ...this.#defaultConfig,\n ...{ entity: entityId },\n ...options,\n };\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport { AlarmChip };\n","\nimport { Helper } from \"../Helper\";\nimport { generic } from \"../types/strategy/generic\";\nimport MagicAreaRegistryEntry = generic.MagicAreaRegistryEntry;\nimport StrategyArea = generic.StrategyArea;\nimport { LovelaceChipConfig, TemplateChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { MAGIC_AREAS_DOMAIN, TOD_ORDER } from \"../variables\";\nimport { slugify } from \"../utils\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Area selects Chips class.\n *\n * Used to create a chip to indicate climate level.\n */\nclass AreaScenesChips {\n /**\n * Configuration of the chip.\n *\n * @type {LovelaceChipConfig[]}\n */\n config: LovelaceChipConfig[] = [];\n /**\n * Default configuration of the chip.\n *\n * @type {ConditionalChipConfig}\n *\n */\n getDefaultConfig(device: MagicAreaRegistryEntry, area: StrategyArea): TemplateChipConfig[] {\n\n const selects = TOD_ORDER.map(tod => Helper.getEntityState(device?.entities[`scene_${tod as 'morning'}`]?.entity_id)).filter(Boolean)\n\n const chips = [] as TemplateChipConfig[]\n\n if (selects.find(scene => scene?.state == \"Adaptive lighting\")) {\n chips.push({\n type: \"template\",\n icon: \"mdi:theme-light-dark\",\n content: \"AD\",\n tap_action: {\n action: \"call-service\",\n service: `${MAGIC_AREAS_DOMAIN}.area_light_adapt`,\n data: {\n area: slugify(device.name),\n }\n },\n })\n }\n\n selects.forEach((scene, index) => {\n if (scene?.state === \"Scène instantanée\") {\n const entity_id = `scene.${slugify(device.name)}_${TOD_ORDER[index]}_snapshot_scene`\n chips.push({\n type: \"template\",\n entity: scene?.entity_id,\n icon: scene?.attributes.icon,\n content: TOD_ORDER[index],\n tap_action: {\n action: \"call-service\",\n service: \"scene.turn_on\",\n data: { entity_id }\n },\n hold_action: {\n action: \"more-info\"\n }\n })\n } else if (scene?.state !== \"Adaptive lighting\") {\n const sceneEntity_id = Helper.getStateEntities(area, \"scene\").find(s => s.attributes.friendly_name === scene?.state)?.entity_id\n chips.push({\n type: \"template\",\n entity: scene?.entity_id,\n icon: scene?.attributes.icon,\n content: TOD_ORDER[index],\n tap_action: {\n action: \"call-service\",\n service: \"scene.turn_on\",\n data: {\n entity_id: sceneEntity_id,\n }\n },\n hold_action: {\n action: \"more-info\"\n }\n })\n }\n })\n\n return chips\n\n }\n\n /**\n * Class Constructor.\n *\n * @param {chips.TemplateChipOptions} options The chip options.\n */\n constructor(device: MagicAreaRegistryEntry, area: StrategyArea) {\n\n this.config = this.getDefaultConfig(device, area);\n\n }\n\n\n // noinspection JSUnusedGlobalSymbols Method is called on dymanically imported classes.\n /**\n * Get the chip.\n *\n * @returns {LovelaceChipConfig} A chip.\n */\n getChips(): LovelaceChipConfig[] {\n return this.config;\n }\n}\n\nexport { AreaScenesChips };\n","import { AreaInformations } from \"../popups/AreaInformationsPopup\";\nimport { generic } from \"../types/strategy/generic\";\nimport MagicAreaRegistryEntry = generic.MagicAreaRegistryEntry;\nimport { TemplateChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { AREA_STATE_ICONS, DEVICE_ICONS } from \"../variables\";\nimport { AbstractChip } from \"./AbstractChip\";\nimport { Helper } from \"../Helper\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Area state Chip class.\n *\n * Used to create a chip to indicate area state.\n */\nclass AreaStateChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @type {ConditionalChipConfig}\n *\n */\n getDefaultConfig(device: MagicAreaRegistryEntry, showContent: boolean = false): TemplateChipConfig {\n\n const { area_state, presence_hold, all_media_players, aggregate_motion } = device?.entities ?? {}\n return {\n type: \"template\",\n entity: area_state?.entity_id,\n icon_color: `\n {% set presence_hold = states('${presence_hold?.entity_id}')%}\n {% set motion = states('${aggregate_motion?.entity_id}')%}\n {% set media_player = states('${all_media_players?.entity_id}')%}\n {% set bl = state_attr('${area_state?.entity_id}', 'states')%}\n {% if motion == 'on' %}\n red\n {% elif media_player in ['on', 'playing'] %}\n blue\n {% elif presence_hold == 'on' %}\n red\n {% elif 'sleep' in bl %}\n blue\n {% elif 'extended' in bl %}\n orange\n {% elif 'occupied' in bl %}\n grey\n {% else %}\n transparent\n {% endif %}\n `,\n icon: `\n {% set presence_hold = states('${presence_hold?.entity_id}')%}\n {% set motion = states('${aggregate_motion?.entity_id}')%}\n {% set media_player = states('${all_media_players?.entity_id}')%}\n {% set bl = state_attr('${area_state?.entity_id}', 'states')%}\n {% if motion == 'on' %}\n ${Helper.icons.binary_sensor.motion?.default}\n {% elif media_player in ['on', 'playing'] %}\n ${Helper.icons.media_player._?.default}\n {% elif presence_hold == 'on' %}\n ${DEVICE_ICONS.presence_hold}\n {% elif 'sleep' in bl %}\n ${AREA_STATE_ICONS.sleep}\n {% elif 'extended' in bl %}\n ${AREA_STATE_ICONS.extended}\n {% elif 'occupied' in bl %}\n ${AREA_STATE_ICONS.occupied}\n {% else %}\n ${AREA_STATE_ICONS.clear}\n {% endif %}`,\n content: showContent ? `\n {% set presence_hold = states('${presence_hold?.entity_id}')%}\n {% set bl = state_attr('${area_state?.entity_id}', 'states')%}\n {% if presence_hold == 'on' %}\n presence_hold\n {% elif 'sleep' in bl %}\n sleep\n {% elif 'extended' in bl %}\n extended\n {% elif 'occupied' in bl %}\n occupied\n {% else %}\n clear\n {% endif %}` : \"\",\n tap_action: new AreaInformations(device, true).getPopup() as any\n }\n }\n\n /**\n * Class Constructor.\n *\n * @param {chips.TemplateChipOptions} options The chip options.\n */\n constructor(device: MagicAreaRegistryEntry, showContent: boolean = false) {\n super();\n\n const defaultConfig = this.getDefaultConfig(device, showContent)\n\n this.config = Object.assign(this.config, defaultConfig);\n\n }\n}\n\nexport { AreaStateChip };\n","import { Helper } from \"../Helper\";\nimport { AbstractChip } from \"./AbstractChip\";\nimport { chips } from \"../types/strategy/chips\";\nimport { TemplateChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { getMAEntity } from \"../utils\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Climate Chip class.\n *\n * Used to create a chip to indicate how many climates are operating.\n */\nclass ClimateChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @type {TemplateChipConfig}\n *\n * @readonly\n * @private\n */\n readonly #defaultConfig: TemplateChipConfig = {\n type: \"template\",\n icon: \"mdi:thermostat\",\n content: \"\",\n tap_action: {\n action: \"navigate\",\n navigation_path: \"climate\",\n },\n };\n\n /**\n * Class Constructor.\n *\n * @param {chips.ChipOptions} options The chip options.\n */\n constructor(options: chips.ChipOptions = {}) {\n super();\n\n if (options?.show_content) {\n this.#defaultConfig.content = Helper.getCountTemplate(\"climate\", \"ne\", \"off\", options?.area_slug);\n }\n\n this.#defaultConfig.icon_color = Helper.getFromDomainState({ domain: \"climate\", area_slug: options?.area_slug })\n\n const magicAreasEntity = getMAEntity(options.magic_device_id ?? \"global\", \"climate\");\n\n if (magicAreasEntity) {\n this.#defaultConfig.entity = magicAreasEntity.entity_id;\n }\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport { ClimateChip };\n","import { chips } from \"../types/strategy/chips\";\nimport { ConditionalChipConfig, LovelaceChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { getMAEntity } from \"../utils\";\nimport { generic } from \"../types/strategy/generic\";\nimport MagicAreaRegistryEntry = generic.MagicAreaRegistryEntry;\nimport { AbstractChip } from \"./AbstractChip\";\n\ntype ConditionalChipOptions = Omit\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Motion Chip class.\n *\n * Used to create a chip to indicate how many motions are operating.\n */\nclass ConditionalChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @type {ConditionalChipConfig}\n *\n * @readonly\n * @private\n */\n readonly #defaultConfig: ConditionalChipConfig = {\n type: \"conditional\",\n };\n\n /**\n * Class Constructor.\n *\n * @param {MagicAreaRegistryEntry} device The chip device.\n * @param {ConditionalChipOptions} options The chip options.\n */\n constructor(conditions: [{ entity: string; state_not: string; } | { entity: string; state: string; }], chip: LovelaceChipConfig) {\n super();\n\n this.#defaultConfig.conditions = conditions;\n this.#defaultConfig.chip = chip;\n\n\n this.config = Object.assign(this.config, this.#defaultConfig);\n }\n}\n\nexport { ConditionalChip };\n","import { AbstractChip } from \"./AbstractChip\";\nimport { TemplateChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { AREA_CONTROL_ICONS } from \"../variables\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Control Chip class.\n *\n * Used to create a chip to indicate how many lights are on and to turn all off.\n */\nclass ControlChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @type {TemplateChipConfig}\n *\n * @readonly\n * @private\n */\n readonly #defaultConfig: TemplateChipConfig = {\n type: \"template\",\n entity: undefined,\n content: \"\",\n icon: AREA_CONTROL_ICONS.media_player,\n icon_color: \"green\",\n tap_action: {\n action: \"more-info\"\n },\n };\n\n /**\n * Class Constructor.\n *\n * @param {chips.TemplateChipOptions} options The chip options.\n */\n constructor(domain: string, entity_id: string) {\n super();\n\n this.#defaultConfig.entity = entity_id\n this.#defaultConfig.icon = AREA_CONTROL_ICONS[domain as \"media_player\"]\n this.#defaultConfig.icon_color = `{{ \"green\" if states(\"${entity_id}\") == \"on\" else \"red\" }}`;\n\n this.config = Object.assign(this.config, this.#defaultConfig);\n\n }\n}\n\nexport { ControlChip };\n","import { Helper } from \"../Helper\";\nimport { chips } from \"../types/strategy/chips\";\nimport { AbstractChip } from \"./AbstractChip\";\nimport { TemplateChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Cover Chip class.\n *\n * Used to create a chip to indicate how many covers aren't closed.\n */\nclass CoverChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @type {TemplateChipConfig}\n *\n * @readonly\n * @private\n */\n readonly #defaultConfig: TemplateChipConfig = {\n type: \"template\",\n icon: \"mdi:window-open\",\n content: \"\",\n tap_action: {\n action: \"navigate\",\n navigation_path: \"cover\",\n },\n };\n\n /**\n * Class Constructor.\n *\n * @param {chips.ChipOptions} options The chip options.\n */\n constructor(options: chips.ChipOptions = {}) {\n super();\n\n if (options?.show_content) {\n this.#defaultConfig.content = Helper.getCountTemplate(\"cover\", \"eq\", \"open\", options?.area_slug);\n }\n\n this.#defaultConfig.icon_color = Helper.getFromDomainState({ domain: \"cover\", area_slug: options?.area_slug })\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport { CoverChip };\n","import { Helper } from \"../Helper\";\nimport { chips } from \"../types/strategy/chips\";\nimport { AbstractChip } from \"./AbstractChip\";\nimport { TemplateChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Fan Chip class.\n *\n * Used to create a chip to indicate how many fans are on and to turn all off.\n */\nclass FanChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @type {TemplateChipConfig}\n *\n * @readonly\n * @private\n */\n readonly #defaultConfig: TemplateChipConfig = {\n type: \"template\",\n icon: \"mdi:fan\",\n content: Helper.getCountTemplate(\"fan\", \"eq\", \"on\"),\n tap_action: {\n action: \"navigate\",\n navigation_path: \"fans\",\n },\n };\n\n /**\n * Class Constructor.\n *\n * @param {chips.ChipOptions} options The chip options.\n */\n constructor(options: chips.ChipOptions = {}) {\n super();\n\n if (options?.show_content) {\n this.#defaultConfig.content = Helper.getCountTemplate(\"fan\", \"eq\", \"on\", options?.area_slug);\n }\n\n this.#defaultConfig.icon_color = Helper.getFromDomainState({ domain: \"fan\", area_slug: options?.area_slug })\n\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport { FanChip };\n","import { Helper } from \"../Helper\";\nimport { chips } from \"../types/strategy/chips\";\nimport { AbstractChip } from \"./AbstractChip\";\nimport { TemplateChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { getMAEntity } from \"../utils\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Light Chip class.\n *\n * Used to create a chip to indicate how many lights are on and to turn all off.\n */\nclass LightChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @type {TemplateChipConfig}\n *\n * @readonly\n * @private\n */\n readonly #defaultConfig: TemplateChipConfig = {\n type: \"template\",\n icon: \"mdi:lightbulb-group\",\n icon_color: \"amber\",\n content: \"\",\n tap_action: {\n action: \"navigate\",\n navigation_path: \"lights\",\n },\n };\n\n /**\n * Class Constructor.\n *\n * @param {chips.ChipOptions} options The chip options.\n */\n constructor(options: chips.ChipOptions) {\n super();\n\n if (options?.show_content) {\n this.#defaultConfig.content = Helper.getCountTemplate(\"light\", \"eq\", \"on\", options?.area_slug);\n }\n\n this.#defaultConfig.icon_color = Helper.getFromDomainState({ domain: \"light\", area_slug: options?.area_slug })\n\n const magicAreasEntity = getMAEntity(options?.magic_device_id ?? \"global\", \"light\");\n\n if (magicAreasEntity) {\n this.#defaultConfig.entity = magicAreasEntity.entity_id;\n }\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport { LightChip };\n","import { Helper } from \"../Helper\";\nimport { AbstractChip } from \"./AbstractChip\";\nimport { chips } from \"../types/strategy/chips\";\nimport { TemplateChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { getMAEntity } from \"../utils\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * MediaPlayer Chip class.\n *\n * Used to create a chip to indicate how many climates are operating.\n */\nclass MediaPlayerChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @type {TemplateChipConfig}\n *\n * @readonly\n * @private\n */\n readonly #defaultConfig: TemplateChipConfig = {\n type: \"template\",\n icon: Helper.icons.media_player._.default,\n content: \"\",\n tap_action: {\n action: \"navigate\",\n navigation_path: \"media_players\",\n },\n };\n\n /**\n * Class Constructor.\n *\n * @param {chips.ChipOptions} options The chip options.\n */\n constructor(options: chips.ChipOptions) {\n super();\n\n if (options?.show_content) {\n this.#defaultConfig.content = Helper.getCountTemplate(\"media_player\", \"eq\", \"playing\", options?.area_slug);\n }\n\n this.#defaultConfig.icon_color = Helper.getFromDomainState({ domain: \"media_player\", area_slug: options?.area_slug })\n\n const magicAreasEntity = getMAEntity(options?.magic_device_id ?? \"global\", \"media_player\");\n\n if (magicAreasEntity) {\n this.#defaultConfig.entity = magicAreasEntity.entity_id;\n }\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport { MediaPlayerChip };\n","import { Helper } from \"../Helper\";\nimport { AbstractChip } from \"./AbstractChip\";\nimport { chips } from \"../types/strategy/chips\";\nimport { TemplateChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Safety Chip class.\n *\n * Used to create a chip to indicate how many safetys are operating.\n */\nclass SafetyChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @type {TemplateChipConfig}\n *\n * @readonly\n * @private\n */\n readonly #defaultConfig: TemplateChipConfig = {\n type: \"template\",\n icon: Helper.icons.binary_sensor.safety?.default,\n icon_color: \"grey\",\n content: Helper.getDeviceClassCountTemplate(\"safety\", \"ne\", \"off\"),\n tap_action: {\n action: \"none\",\n },\n hold_action: {\n action: \"navigate\",\n navigation_path: \"safety\",\n },\n };\n\n /**\n * Class Constructor.\n *\n * @param {chips.TemplateChipOptions} options The chip options.\n */\n constructor(options: chips.TemplateChipOptions = {}) {\n super();\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport { SafetyChip };\n","import {Helper} from \"../Helper\";\nimport {chips} from \"../types/strategy/chips\";\nimport {AbstractChip} from \"./AbstractChip\";\nimport {TemplateChipConfig} from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Settings Chip class.\n *\n * Used to create a chip to indicate how many fans are on and to turn all off.\n */\nclass SettingsChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @type {TemplateChipConfig}\n *\n * @readonly\n * @private\n */\n readonly #defaultConfig: TemplateChipConfig = {\n \"type\": \"template\",\n \"icon\": \"mdi:cog\",\n };\n\n /**\n * Class Constructor.\n *\n * @param {chips.TemplateChipOptions} options The chip options.\n */\n constructor(options: chips.TemplateChipOptions = {}) {\n super();\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport {SettingsChip};\n","import { Helper } from \"../Helper\";\nimport { TemplateChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { AbstractChip } from \"./AbstractChip\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Spotify Chip class.\n *\n * Used to create a chip to indicate climate level.\n */\nclass SpotifyChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @type {ConditionalChipConfig}\n *\n */\n getDefaultConfig(entityId: string): TemplateChipConfig {\n\n return {\n type: \"template\",\n entity: entityId,\n icon_color: `{{ 'green' if is_state('${entityId}', 'playing') else 'grey' }}`,\n content: '{{ states(entity) }}',\n icon: \"mdi:spotify\",\n // content: show_content ? `{{ states('${entityId}') if not states('${entityId}') == 'on' else '' }}` : \"\",\n tap_action: {\n action: \"fire-dom-event\",\n browser_mod: {\n service: \"browser_mod.popup\",\n data: {\n title: \"Spotify\",\n \"content\":\n {\n type: \"vertical-stack\",\n cards: [\n ...([entityId].map(x => {\n\n const entity = Helper.getEntityState(x)\n const source_list = entity.attributes.source_list\n const chunkSize = 3;\n const source_cards_chunk = []\n\n for (let i = 0; i < source_list.length; i += chunkSize) {\n const chunk = source_list.slice(i, i + chunkSize);\n source_cards_chunk.push(chunk)\n }\n\n return {\n type: \"custom:stack-in-card\",\n cards: [\n {\n type: \"custom:mushroom-media-player-card\",\n entity: \"media_player.spotify_juicy\",\n icon: \"mdi:spotify\",\n icon_color: \"green\",\n use_media_info: true,\n use_media_artwork: false,\n show_volume_level: false,\n media_controls: [\n \"play_pause_stop\",\n \"previous\",\n \"next\"\n ],\n volume_controls: [\n \"volume_buttons\",\n \"volume_set\"\n ],\n fill_container: false,\n card_mod: {\n style: \"ha-card {\\n --rgb-state-media-player: var(--rgb-green);\\n}\\n\"\n }\n },\n {\n type: \"custom:swipe-card\",\n parameters: null,\n spaceBetween: 8,\n scrollbar: null,\n start_card: 1,\n hide: false,\n draggable: true,\n snapOnRelease: true,\n slidesPerView: 2.2,\n cards: [\n ...(source_cards_chunk.map(source_cards => (\n {\n type: \"horizontal-stack\",\n cards: [\n ...(source_cards.map((source: string) => (\n {\n type: \"custom:mushroom-template-card\",\n icon: \"mdi:speaker-play\",\n icon_color: `{% if states[entity].attributes.source == '${source}' %}\\namber\\n{% else %}\\ngrey\\n{% endif %}`,\n primary: null,\n secondary: source,\n entity: entity.entity_id,\n multiline_secondary: false,\n tap_action: {\n action: \"call-service\",\n service: \"spotcast.start\",\n data: {\n device_name: source,\n force_playback: true\n }\n },\n layout: \"vertical\",\n style: \"mushroom-card \\n background-size: 42px 32px;\\nmushroom-shape-icon {\\n --shape-color: none !important;\\n} \\n ha-card { \\n background: rgba(#1a1a2a;, 1.25);\\n {% if is_state('media_player.cuisine_media_players', 'playing') %}\\n {% else %}\\n background: rgba(var(--rgb-primary-background-color), 0.8);\\n {% endif %} \\n width: 115px;\\n border-radius: 30px;\\n margin-top: 10px;\\n margin-left: auto;\\n margin-right: auto;\\n margin-bottom: 20px;\\n }\\n\",\n card_mode: {\n style: \":host {\\n background: rgba(var(--rgb-primary-background-color), 0.8);\\n border-radius: 50px;!important\\n} \\n\"\n },\n line_width: 8,\n line_color: \"#FF6384\",\n card_mod: {\n style: `\n :host {\n --mush-icon-symbol-size: 0.75em;\n }\n `\n }\n\n }))\n ).filter(Boolean),\n ]\n }))\n ).filter(Boolean),\n ]\n },\n {\n type: \"custom:spotify-card\",\n always_play_random_song: true,\n hide_currently_playing: true,\n hide_playback_controls: true,\n hide_top_header: true,\n hide_warning: true,\n hide_chromecast_devices: true,\n display_style: \"Grid\",\n grid_covers_per_row: 5,\n limit: 20\n }\n ],\n card_mod: {\n style: \"ha-card {\\n {% if not is_state('media_player.spotify_juicy', 'off') and not is_state('media_player.spotify_juicy', 'idle') %}\\n background: url( '{{ state_attr(\\\"media_player.spotify_juicy\\\", \\\"entity_picture\\\") }}' ), linear-gradient(to left, transparent, rgb(var(--rgb-card-background-color)) 100%);\\n\\n {% if state_attr('media_player.spotify_juicy', 'media_content_type') == 'tvshow' %}\\n background-size: auto 100%, cover;\\n {% else %}\\n background-size: 130% auto, cover;\\n {% endif %}\\n\\n background-position: top right;\\n background-repeat: no-repeat;\\n background-blend-mode: saturation;\\n {% endif %}\\n}\\n\"\n }\n }\n })\n ).filter(Boolean),\n ],\n card_mod: {\n style: \"ha-card {\\n background:#4a1a1a;\\n}\\n\"\n }\n }\n }\n }\n }\n }\n }\n\n /**\n * Class Constructor.\n *\n * @param {chips.TemplateChipOptions} options The chip options.\n */\n constructor(entityId: string) {\n super();\n\n const defaultConfig = this.getDefaultConfig(entityId)\n\n this.config = Object.assign(this.config, defaultConfig);\n\n }\n}\n\nexport { SpotifyChip };\n","import { Helper } from \"../Helper\";\nimport { chips } from \"../types/strategy/chips\";\nimport { AbstractChip } from \"./AbstractChip\";\nimport { TemplateChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Switch Chip class.\n *\n * Used to create a chip to indicate how many switches are on and to turn all off.\n */\nclass SwitchChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @type {TemplateChipConfig}\n *\n * @readonly\n * @private\n */\n readonly #defaultConfig: TemplateChipConfig = {\n type: \"template\",\n icon: \"mdi:dip-switch\",\n content: \"\",\n tap_action: {\n action: \"navigate\",\n navigation_path: \"switches\",\n },\n };\n\n /**\n * Class Constructor.\n *\n * @param {chips.ChipOptions} options The chip options.\n */\n constructor(options: chips.ChipOptions = {}) {\n super();\n\n if (options?.show_content) {\n this.#defaultConfig.content = Helper.getCountTemplate(\"switch\", \"eq\", \"on\", options?.area_slug);\n }\n this.#defaultConfig.icon_color = Helper.getFromDomainState({ domain: \"switch\", area_slug: options?.area_slug })\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport { SwitchChip };\n","import { generic } from \"../types/strategy/generic\";\nimport MagicAreaRegistryEntry = generic.MagicAreaRegistryEntry;\nimport { TemplateChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { MAGIC_AREAS_DOMAIN } from \"../variables\";\nimport { AbstractChip } from \"./AbstractChip\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Climate Chip class.\n *\n * Used to create a chip to indicate climate level.\n */\nclass ToggleSceneChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @type {ConditionalChipConfig}\n *\n */\n getDefaultConfig(device: MagicAreaRegistryEntry): TemplateChipConfig {\n return {\n type: \"template\",\n entity: device?.entities.light_control?.entity_id,\n icon: \"mdi:recycle-variant\",\n // icon_color: \"{% if is_state(config.entity, 'on') %}green{% else %}red{% endif %}\",\n tap_action: {\n action: \"call-service\",\n service: `${MAGIC_AREAS_DOMAIN}.area_scene_toggle`,\n data: {\n area: device?.name,\n }\n },\n hold_action: {\n action: \"more-info\"\n }\n }\n }\n\n /**\n * Class Constructor.\n *\n * @param {chips.TemplateChipOptions} options The chip options.\n */\n constructor(device: MagicAreaRegistryEntry) {\n super();\n\n const defaultConfig = this.getDefaultConfig(device)\n\n this.config = Object.assign(this.config, defaultConfig);\n\n }\n}\n\nexport { ToggleSceneChip };\n","import { AbstractChip } from \"./AbstractChip\";\nimport { TemplateChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { navigateTo } from \"../utils\";\nimport { Helper } from \"../Helper\";\nimport { chips } from \"../types/strategy/chips\";\nimport { UNAVAILABLE } from \"../variables\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Unavailable Chip class.\n *\n * Used to create a chip to indicate unable entities.\n */\nclass UnavailableChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @type {TemplateChipConfig}\n *\n * @readonly\n * @private\n */\n readonly #defaultConfig: TemplateChipConfig = {\n type: \"template\",\n icon: 'mdi:alert-circle-outline',\n icon_color: \"orange\",\n content: \"\",\n };\n\n /**\n * Class Constructor.\n *\n * @param {chips.ChipOptions} options The chip options.\n */\n constructor(options: chips.ChipOptions = {}) {\n super();\n\n this.#defaultConfig.content = Helper.getCountTemplate(\"all\", \"eq\", UNAVAILABLE, options?.area_slug);\n\n this.#defaultConfig.icon = Helper.getFromDomainState({\n domain: \"all\",\n operator: \"eq\",\n value: UNAVAILABLE,\n ifReturn: this.#defaultConfig.icon,\n elseReturn: \"mdi:alert-circle-check-outline\",\n area_slug: options?.area_slug\n });\n\n\n this.#defaultConfig.icon_color = Helper.getFromDomainState({\n domain: \"all\",\n operator: \"eq\",\n value: UNAVAILABLE,\n ifReturn: this.#defaultConfig.icon_color,\n elseReturn: \"green\",\n area_slug: options?.area_slug\n });\n\n this.#defaultConfig.tap_action = navigateTo(\"unavailable\")\n\n this.config = Object.assign(this.config, this.#defaultConfig);\n }\n}\n\nexport { UnavailableChip };\n","import {chips} from \"../types/strategy/chips\";\nimport {WeatherChipConfig} from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport {AbstractChip} from \"./AbstractChip\";\nimport { WeatherPopup } from \"../popups/WeatherPopup\";\n\n// noinspection JSUnusedGlobalSymbols False positive.\n/**\n * Weather Chip class.\n *\n * Used to create a chip for showing the weather.\n */\nclass WeatherChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @private\n * @readonly\n */\n readonly #defaultConfig: WeatherChipConfig = {\n type: \"weather\",\n show_temperature: true,\n show_conditions: true,\n };\n\n /**\n * Class Constructor.\n *\n * @param {string} entityId Id of a weather entity.\n * @param {chips.WeatherChipOptions} options Weather Chip options.\n */\n constructor(entityId: string, options: chips.WeatherChipOptions = {}) {\n super();\n this.#defaultConfig = {\n ...this.#defaultConfig,\n tap_action: new WeatherPopup(entityId).getPopup() as any,\n ...{entity: entityId},\n ...options,\n };\n\n this.#defaultConfig.tap_action = new WeatherPopup(entityId).getPopup()\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport {WeatherChip};\n","import { generic } from \"./types/strategy/generic\";\nimport StrategyDefaults = generic.StrategyDefaults;\nimport MagicAreaRegistryEntry = generic.MagicAreaRegistryEntry;\nimport { ControlChip } from \"./chips/ControlChip\";\nimport { SettingsChip } from \"./chips/SettingsChip\";\nimport { LightSettings } from \"./popups/LightSettingsPopup\";\nimport { ToggleSceneChip } from \"./chips/ToggleSceneChip\";\nimport { SceneSettings } from \"./popups/SceneSettingsPopup\";\nimport { UNDISCLOSED } from \"./variables\";\nimport { ClimateChip } from \"./chips/ClimateChip\";\nimport { AggregateChip } from \"./chips/AggregateChip\";\nimport { LightChip } from \"./chips/LightChip\";\nimport { MediaPlayerChip } from \"./chips/MediaPlayerChip\";\nimport { CoverChip } from \"./chips/CoverChip\";\nimport { FanChip } from \"./chips/FanChip\";\nimport { SwitchChip } from \"./chips/SwitchChip\";\n\n/**\n * Default configuration for the mushroom strategy.\n */\nexport const configurationDefaults: StrategyDefaults = {\n areas: {\n undisclosed: {\n slug: UNDISCLOSED,\n aliases: [],\n area_id: UNDISCLOSED,\n name: \"Non assigné\",\n picture: null,\n hidden: false,\n domains: {},\n devices: [],\n entities: [],\n }\n },\n floors: {\n undisclosed: {\n aliases: [],\n floor_id: UNDISCLOSED,\n name: \"Non assigné\",\n hidden: false,\n areas_slug: [UNDISCLOSED]\n }\n },\n debug: true,\n domains: {\n _: {\n hide_config_entities: false,\n },\n default: {\n showControls: false,\n hidden: false,\n },\n light: {\n showControls: true,\n controlChip: LightChip,\n extraControls: (device: MagicAreaRegistryEntry) => {\n const chips = [];\n if (device?.entities.light_control?.entity_id) {\n chips.push(new ControlChip(\"light\", device?.entities.light_control?.entity_id).getChip());\n }\n if (device?.entities.all_lights?.entity_id) {\n chips.push(new SettingsChip({ tap_action: new LightSettings(device).getPopup() }).getChip());\n }\n return chips\n },\n controllerCardOptions: {\n onService: \"light.turn_on\",\n offService: \"light.turn_off\",\n toggleService: \"light.toggle\",\n },\n hidden: false,\n order: 1\n },\n climate: {\n showControls: true,\n controlChip: ClimateChip,\n controllerCardOptions: {\n onService: \"climate.turn_on\",\n offService: \"climate.turn_off\",\n toggleService: \"climate.toggle\",\n },\n hidden: false,\n order: 2,\n extraControls: (device: MagicAreaRegistryEntry) => {\n const chips = [];\n if (device?.entities.climate_control?.entity_id) {\n chips.push(new ControlChip(\"climate\", device?.entities.climate_control?.entity_id).getChip());\n }\n return chips\n },\n },\n media_player: {\n showControls: true,\n controlChip: MediaPlayerChip,\n controllerCardOptions: {\n onService: \"media_player.turn_on\",\n offService: \"media_player.turn_off\",\n toggleService: \"media_player.toggle\",\n },\n hidden: false,\n order: 3,\n extraControls: (device: MagicAreaRegistryEntry) => {\n const chips = [];\n if (device?.entities.media_player_control?.entity_id) {\n chips.push(new ControlChip(\"media_player\", device?.entities.media_player_control?.entity_id).getChip());\n }\n return chips\n },\n },\n cover: {\n showControls: true,\n controlChip: CoverChip,\n controllerCardOptions: {\n onService: \"cover.open_cover\",\n offService: \"cover.close_cover\",\n toggleService: \"cover.toggle\",\n },\n hidden: false,\n order: 4\n },\n scene: {\n showControls: false,\n extraControls: (device: MagicAreaRegistryEntry) => {\n const chips = [];\n if (device?.entities.all_lights?.entity_id) {\n chips.push(new ToggleSceneChip(device).getChip());\n chips.push(new SettingsChip({ tap_action: new SceneSettings(device).getPopup() }).getChip());\n }\n return chips\n },\n onService: \"scene.turn_on\",\n offService: \"scene.turn_off\",\n hidden: false,\n order: 5\n },\n fan: {\n showControls: true,\n controlChip: FanChip,\n controllerCardOptions: {\n onService: \"fan.turn_on\",\n offService: \"fan.turn_off\",\n toggleService: \"fan.toggle\",\n },\n hidden: false,\n order: 6\n },\n switch: {\n showControls: true,\n controlChip: SwitchChip,\n controllerCardOptions: {\n onService: \"switch.turn_on\",\n offService: \"switch.turn_off\",\n toggleService: \"switch.toggle\",\n },\n hidden: false,\n order: 7\n },\n camera: {\n showControls: false,\n controllerCardOptions: {\n },\n hidden: false,\n order: 8\n },\n lock: {\n showControls: false,\n controllerCardOptions: {\n },\n hidden: false,\n order: 9\n },\n vacuum: {\n showControls: true,\n controllerCardOptions: {\n onService: \"vacuum.start\",\n offService: \"vacuum.stop\",\n },\n hidden: false,\n order: 10\n },\n sensor: {\n controlChip: AggregateChip,\n showControls: true,\n hidden: false,\n },\n binary_sensor: {\n controlChip: AggregateChip,\n showControls: true,\n hidden: false,\n },\n number: {\n showControls: false,\n hidden: false,\n },\n temperature: {\n showControls: true,\n hidden: false,\n },\n },\n home_view: {\n hidden: [],\n },\n views: {\n home: {\n order: 1,\n hidden: false,\n },\n security: {\n order: 2,\n hidden: false,\n },\n light: {\n order: 3,\n hidden: false,\n },\n climate: {\n order: 4,\n hidden: false,\n },\n media_player: {\n order: 5,\n hidden: false,\n },\n cover: {\n order: 6,\n hidden: false,\n },\n scene: {\n order: 7,\n hidden: false,\n },\n fan: {\n order: 8,\n hidden: false,\n },\n switch: {\n order: 9,\n hidden: false,\n },\n camera: {\n order: 10,\n hidden: false,\n },\n vacuum: {\n order: 11,\n hidden: false,\n },\n securityDetails: {\n hidden: false,\n },\n motion: {\n hidden: false,\n },\n window: {\n hidden: false,\n },\n door: {\n hidden: false,\n },\n battery: {\n hidden: false,\n },\n temperature: {\n hidden: false,\n },\n }\n};\n","import { Helper } from \"./Helper\";\nimport { generic } from \"./types/strategy/generic\";\nimport { LovelaceConfig, LovelaceViewConfig } from \"./types/homeassistant/data/lovelace\";\nimport { CUSTOM_VIEWS, DEVICE_CLASSES, DOMAINS_VIEWS, VIEWS_ICONS } from \"./variables\";\nimport { AreaView } from \"./views/AreaView\";\nimport { getAreaName, getFloorName } from \"./utils\";\nimport { FloorView } from \"./views/FloorView\";\nimport { ResourceKeys } from \"./types/homeassistant/data/frontend\";\n\n/**\n * Linus Dashboard Strategy.
\n *
\n * Linus dashboard strategy provides a strategy for Home-Assistant to create a dashboard automatically.
\n * The strategy makes use of Mushroom and Mini Graph cards to represent your entities.
\n *
\n * Features:
\n * 🛠 Automatically create a dashboard with minimal configuration.
\n * 😍 Built-in views for several standard domains.
\n * 🎨 Many options to customize to your needs.
\n *
\n * Check the [Repository]{@link https://github.com/AalianKhan/linus-strategy} for more information.\n */\nclass LinusStrategy extends HTMLTemplateElement {\n /**\n * Generate a dashboard.\n *\n * Called when opening a dashboard.\n *\n * @param {generic.DashBoardInfo} info Dashboard strategy information object.\n * @return {Promise}\n */\n static async generateDashboard(info: generic.DashBoardInfo): Promise {\n if (!Helper.isInitialized()) await Helper.initialize(info);\n\n console.log('info', info);\n\n const views: LovelaceViewConfig[] = info.config?.views ?? [];\n\n LinusStrategy.createDomainSubviews(views);\n LinusStrategy.createUnavailableEntitiesSubview(views);\n LinusStrategy.createAreaSubviews(views);\n LinusStrategy.createFloorSubviews(views);\n\n if (Helper.strategyOptions.extra_views) {\n views.push(...Helper.strategyOptions.extra_views);\n }\n\n return { views };\n }\n\n /**\n * Create subviews for each domain.\n *\n * @param {LovelaceViewConfig[]} views Array of Lovelace view configurations.\n */\n private static createDomainSubviews(views: LovelaceViewConfig[]) {\n const exposedViewIds = Helper.getExposedViewIds();\n exposedViewIds.forEach(viewId => {\n if (![...CUSTOM_VIEWS, ...DOMAINS_VIEWS].includes(viewId)) return;\n if (DOMAINS_VIEWS.includes(viewId) && (Helper.domains[viewId] ?? []).length === 0) return;\n\n let domain = viewId;\n let device_class = \"_\";\n\n if (DEVICE_CLASSES.binary_sensor.includes(viewId)) {\n domain = \"binary_sensor\";\n device_class = viewId;\n } else if (DEVICE_CLASSES.sensor.includes(viewId)) {\n domain = \"sensor\";\n device_class = viewId;\n }\n\n views.push({\n title: viewId,\n icon: (VIEWS_ICONS as Record)[viewId] ?? Helper.icons[domain as ResourceKeys]?.[device_class]?.default,\n path: viewId,\n // subview: !Object.keys(ResourceKeys).includes(viewId),\n subview: false,\n strategy: {\n type: \"custom:linus-strategy\",\n options: { viewId },\n },\n });\n });\n }\n\n /**\n * Create a subview for unavailable entities.\n *\n * @param {LovelaceViewConfig[]} views Array of Lovelace view configurations.\n */\n private static createUnavailableEntitiesSubview(views: LovelaceViewConfig[]) {\n views.push({\n title: \"Unavailable\",\n path: \"unavailable\",\n subview: true,\n strategy: {\n type: \"custom:linus-strategy\",\n options: { viewId: \"unavailable\" },\n },\n });\n }\n\n /**\n * Create subviews for each area.\n *\n * @param {LovelaceViewConfig[]} views Array of Lovelace view configurations.\n */\n private static createAreaSubviews(views: LovelaceViewConfig[]) {\n for (let area of Helper.orderedAreas) {\n if (!area.hidden) {\n views.push({\n title: getAreaName(area),\n path: area.slug ?? area.name,\n subview: true,\n strategy: {\n type: \"custom:linus-strategy\",\n options: { area },\n },\n });\n }\n }\n }\n\n /**\n * Create subviews for each floor.\n *\n * @param {LovelaceViewConfig[]} views Array of Lovelace view configurations.\n */\n private static createFloorSubviews(views: LovelaceViewConfig[]) {\n for (let floor of Helper.orderedFloors) {\n if (!floor.hidden) {\n views.push({\n title: getFloorName(floor),\n path: floor.floor_id,\n subview: true,\n strategy: {\n type: \"custom:linus-strategy\",\n options: { floor },\n },\n });\n }\n }\n }\n\n /**\n * Generate a view.\n *\n * Called when opening a subview.\n *\n * @param {generic.ViewInfo} info The view's strategy information object.\n * @return {Promise}\n */\n /**\n * Generate a view.\n *\n * Called when opening a subview.\n *\n * @param {generic.ViewInfo} info The view's strategy information object.\n * @return {Promise}\n */\n static async generateView(info: generic.ViewInfo): Promise {\n const { viewId, floor, area } = info.view.strategy?.options ?? {};\n let view: LovelaceViewConfig = {};\n\n if (area) {\n try {\n view = await new AreaView(area).getView();\n } catch (e) {\n Helper.logError(`View for '${area?.name}' couldn't be loaded!`, e);\n }\n } else if (floor) {\n try {\n view = await new FloorView(floor).getView();\n } catch (e) {\n Helper.logError(`View for '${floor?.name}' couldn't be loaded!`, e);\n }\n } else if (viewId) {\n try {\n\n if (viewId === \"unavailable\") {\n\n const viewModule = await import(\"./views/UnavailableView\");\n view = await new viewModule.UnavailableView().getView();\n\n } else if ([...DEVICE_CLASSES.binary_sensor, ...DEVICE_CLASSES.sensor].includes(viewId)) {\n\n const viewModule = await import(\"./views/AggregateView\");\n view = await new viewModule.AggregateView({ device_class: viewId }).getView();\n\n } else {\n\n const viewType = Helper.sanitizeClassName(viewId + \"View\");\n const viewModule = await import(`./views/${viewType}`);\n view = await new viewModule[viewType](Helper.strategyOptions.views[viewId]).getView();\n\n }\n } catch (e) {\n Helper.logError(`View for '${viewId}' couldn't be loaded!`, e);\n }\n\n }\n\n return view;\n }\n}\n\ncustomElements.define(\"ll-strategy-linus-strategy\", LinusStrategy);\n\nexport const version = \"v0.0.1\";\nconsole.info(\n \"%c Linus Strategy %c \".concat(version, \" \"),\n \"color: #F5F5DC; background: #004225; font-weight: 700;\", \"color: #004225; background: #F5F5DC; font-weight: 700;\"\n);\n","import {Helper} from \"../Helper\";\nimport { PopupActionConfig } from \"../types/homeassistant/data/lovelace\";\n\n/**\n * Abstract Popup class.\n *\n * To create a new Popup, extend this one.\n *\n * @class\n * @abstract\n */\nabstract class AbstractPopup {\n /**\n * Configuration of the Popup.\n *\n * @type {PopupActionConfig}\n */\n config: PopupActionConfig = {\n action: \"fire-dom-event\",\n browser_mod: {}\n };\n\n /**\n * Class Constructor.\n */\n protected constructor() {\n if (!Helper.isInitialized()) {\n throw new Error(\"The Helper module must be initialized before using this one.\");\n }\n }\n\n // noinspection JSUnusedGlobalSymbols Method is called on dymanically imported classes.\n /**\n * Get the Popup.\n *\n * @returns {PopupActionConfig} A Popup.\n */\n getPopup(): PopupActionConfig {\n return this.config;\n }\n}\n\nexport {AbstractPopup};\n","import { Helper } from \"../Helper\";\nimport { generic } from \"../types/strategy/generic\";\nimport MagicAreaRegistryEntry = generic.MagicAreaRegistryEntry;\nimport { PopupActionConfig } from \"../types/homeassistant/data/lovelace\";\nimport { slugify } from \"../utils\";\nimport { AbstractPopup } from \"./AbstractPopup\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Light Chip class.\n *\n * Used to create a chip to indicate how many lights are on and to turn all off.\n */\nclass AreaInformations extends AbstractPopup {\n\n getDefaultConfig(device: MagicAreaRegistryEntry, minimalist: boolean): PopupActionConfig {\n\n const { area_state } = device?.entities ?? {}\n\n const { friendly_name, adjoining_areas, features, states, presence_sensors, on_states } = Helper.getEntityState(area_state?.entity_id)?.attributes ?? {}\n\n presence_sensors?.sort((a: string, b: string) => {\n const aState = Helper.getEntityState(a);\n const bState = Helper.getEntityState(b);\n const lastChangeA = new Date(aState?.last_changed).getTime();\n const lastChangeB = new Date(bState?.last_changed).getTime();\n if (a === `switch.magic_areas_presence_hold_${slugify(device?.name)}`) {\n return -1;\n } else if (b === `switch.magic_areas_presence_hold_${slugify(device?.name)}`) {\n return 1;\n } else {\n return lastChangeB - lastChangeA;\n }\n });\n\n return {\n action: \"fire-dom-event\",\n browser_mod: {\n service: \"browser_mod.popup\",\n data: {\n title: friendly_name,\n content: {\n type: \"vertical-stack\",\n cards: [\n {\n type: \"horizontal-stack\",\n cards: [\n {\n type: \"custom:mushroom-entity-card\",\n entity: area_state?.entity_id,\n name: \"Présence\",\n secondary_info: \"last-changed\",\n color: \"red\",\n tap_action: device?.id ? {\n action: \"fire-dom-event\",\n browser_mod: {\n service: \"browser_mod.sequence\",\n data: {\n sequence: [\n {\n service: \"browser_mod.close_popup\",\n data: {}\n },\n {\n service: \"browser_mod.navigate\",\n data: { path: `/config/devices/device/${device?.id}` }\n }\n ]\n }\n }\n } : \"more-info\"\n },\n {\n type: \"custom:mushroom-template-card\",\n primary: \"Recharger la pièce\",\n icon: \"mdi:refresh\",\n icon_color: \"blue\",\n tap_action: {\n action: \"call-service\",\n service: `homeassistant.reload_config_entry`,\n target: { \"device_id\": device?.id },\n }\n },\n ]\n },\n ...(!minimalist ? [\n {\n type: \"custom:mushroom-template-card\",\n primary: `Configuration de la pièce :`,\n card_mod: {\n style: `ha-card {padding: 4px 12px!important;}`\n }\n },\n {\n type: \"custom:mushroom-chips-card\",\n chips: [\n {\n type: \"template\",\n entity: area_state?.entity_id,\n content: `Type : {{ state_attr('${area_state?.entity_id}', 'type') }}`,\n icon: `\n {% set type = state_attr('${area_state?.entity_id}', 'type') %}\n {% if type == \"interior\" %}\n mdi:home-import-outline\n {% elif type == \"exterior\" %}\n mdi:home-import-outline\n {% else %}\n mdi:home-alert\n {% endif %}\n `,\n },\n {\n type: \"template\",\n entity: area_state?.entity_id,\n content: `Étage : {{ state_attr('${area_state?.entity_id}', 'floor') }}`,\n icon: `\n {% set floor = state_attr('${area_state?.entity_id}', 'floor') %}\n {% if floor == \"third\" %}\n mdi:home-floor-3\n {% elif floor == \"second\" %}\n mdi:home-floor-2\n {% elif floor == \"first\" %}\n mdi:home-floor-1\n {% elif floor == \"ground\" %}\n mdi:home-floor-g\n {% elif floor == \"basement\" %}\n mdi:home-floor-b\n {% else %}\n mdi:home-alert\n {% endif %}\n `,\n },\n {\n type: \"template\",\n entity: area_state?.entity_id,\n content: `Délai pièce vide : {{ state_attr('${area_state?.entity_id}', 'clear_timeout') }}s`,\n icon: `mdi:camera-timer`,\n },\n {\n type: \"template\",\n entity: area_state?.entity_id,\n content: `Interval mise à jour : {{ state_attr('${area_state?.entity_id}', 'update_interval') }}s`,\n icon: `mdi:update`,\n },\n {\n type: \"template\",\n entity: area_state?.entity_id,\n content: `Pièces adjacentes : ${adjoining_areas?.length ? adjoining_areas.join(' ') : 'Non défini'}`,\n icon: `mdi:view-dashboard-variant`,\n },\n ],\n card_mod: {\n style: `ha-card .chip-container * {margin-bottom: 0px!important;}`\n }\n }\n ] : []),\n {\n type: \"custom:mushroom-template-card\",\n primary: `Capteurs utilisé pour la détection de présence :`,\n card_mod: {\n style: `ha-card {padding: 4px 12px!important;}`\n }\n },\n (minimalist ? {\n type: \"vertical-stack\",\n cards: presence_sensors?.map((sensor: string) => ({\n type: \"custom:mushroom-entity-card\",\n entity: sensor,\n content_info: \"name\",\n secondary_info: \"last-changed\",\n icon_color: sensor.includes('media_player.') ? \"blue\" : \"red\",\n }))\n } :\n {\n type: \"custom:mushroom-chips-card\",\n chips: presence_sensors?.map((sensor: string) => ({\n type: \"entity\",\n entity: sensor,\n content_info: \"name\",\n icon_color: sensor.includes('media_player.') ? \"blue\" : \"red\",\n tap_action: {\n action: \"more-info\"\n }\n })),\n card_mod: {\n style: `ha-card .chip-container * {margin-bottom: 0px!important;}`\n }\n }),\n ...(!minimalist ? [\n {\n type: \"custom:mushroom-template-card\",\n primary: `Présence détecté pour les états :`,\n card_mod: {\n style: `ha-card {padding: 4px 12px!important;}`\n }\n },\n {\n type: \"custom:mushroom-chips-card\",\n chips: on_states?.map((sensor: string) => ({\n type: \"template\",\n content: sensor,\n })),\n card_mod: {\n style: `ha-card .chip-container * {margin-bottom: 0px!important;}`\n }\n },\n {\n type: \"custom:mushroom-template-card\",\n primary: `Fonctionnalitées disponibles :`,\n card_mod: {\n style: `ha-card {padding: 4px 12px!important;}`\n }\n },\n {\n type: \"custom:mushroom-chips-card\",\n chips: features?.map((sensor: string) => ({\n type: \"template\",\n content: sensor,\n })),\n card_mod: {\n style: `ha-card .chip-container * {margin-bottom: 0px!important;}`\n }\n },\n ] : [])\n ].filter(Boolean)\n }\n }\n }\n }\n }\n\n /**\n * Class Constructor.\n *\n * @param {chips.PopupActionConfig} options The chip options.\n */\n constructor(device: MagicAreaRegistryEntry, minimalist: boolean = false) {\n super();\n\n const defaultConfig = this.getDefaultConfig(device, minimalist)\n\n this.config = Object.assign(this.config, defaultConfig);\n\n }\n}\n\nexport { AreaInformations };\n","import { Helper } from \"../Helper\";\nimport { generic } from \"../types/strategy/generic\";\nimport MagicAreaRegistryEntry = generic.MagicAreaRegistryEntry;\nimport { PopupActionConfig } from \"../types/homeassistant/data/lovelace\";\nimport { slugify } from \"../utils\";\nimport { MAGIC_AREAS_DOMAIN } from \"../variables\";\nimport { AbstractPopup } from \"./AbstractPopup\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Light Chip class.\n *\n * Used to create a chip to indicate how many lights are on and to turn all off.\n */\nclass LightSettings extends AbstractPopup {\n\n getDefaultConfig(device: MagicAreaRegistryEntry): PopupActionConfig {\n\n const { aggregate_illuminance, adaptive_lighting_range, minimum_brightness, maximum_brightness, maximum_lighting_level } = device?.entities ?? {}\n\n const device_slug = slugify(device?.name ?? \"\")\n\n const OPTIONS_ADAPTIVE_LIGHTING_RANGE = {\n \"\": 1,\n \"Small\": 10,\n \"Medium\": 25,\n \"Large\": 50,\n \"Extra large\": 100,\n } as Record\n\n const adaptive_lighting_range_state = Helper.getEntityState(adaptive_lighting_range?.entity_id)?.state\n\n return {\n action: \"fire-dom-event\",\n browser_mod: {\n service: \"browser_mod.popup\",\n data: {\n title: \"Configurer l'éclairage adaptatif\",\n content: {\n type: \"vertical-stack\",\n cards: [\n {\n type: \"horizontal-stack\",\n cards: [\n {\n type: \"tile\",\n entity: `switch.adaptive_lighting_${device_slug}`,\n vertical: \"true\",\n },\n {\n type: \"tile\",\n entity: `switch.adaptive_lighting_adapt_brightness_${device_slug}`,\n vertical: \"true\",\n },\n {\n type: \"tile\",\n entity: `switch.adaptive_lighting_adapt_color_${device_slug}`,\n vertical: \"true\",\n },\n {\n type: \"tile\",\n entity: `switch.adaptive_lighting_sleep_mode_${device_slug}`,\n vertical: \"true\",\n }\n ]\n },\n {\n type: \"custom:mushroom-select-card\",\n entity: adaptive_lighting_range?.entity_id,\n secondary_info: \"last-changed\",\n icon_color: \"blue\",\n },\n {\n type: \"horizontal-stack\",\n cards: [\n {\n type: \"custom:mushroom-number-card\",\n entity: maximum_lighting_level?.entity_id,\n icon_color: \"red\",\n card_mod: {\n style: `\n :host {\n --mush-control-height: 20px;\n }\n `\n }\n },\n {\n type: \"custom:mushroom-template-card\",\n primary: \"Utiliser la valeur actuelle\",\n icon: \"mdi:pencil\",\n layout: \"vertical\",\n tap_action: {\n action: \"call-service\",\n service: `${MAGIC_AREAS_DOMAIN}.area_lux_for_lighting_max`,\n data: {\n area: device?.name\n }\n },\n },\n ],\n },\n {\n type: \"custom:mushroom-number-card\",\n entity: minimum_brightness?.entity_id,\n icon_color: \"green\",\n card_mod: {\n style: \":host {--mush-control-height: 10px;}\"\n }\n },\n {\n type: \"custom:mushroom-number-card\",\n entity: maximum_brightness?.entity_id,\n icon_color: \"green\",\n card_mod: {\n style: \":host {--mush-control-height: 10px;}\"\n }\n },\n {\n type: \"custom:apexcharts-card\",\n graph_span: \"15h\",\n header: {\n show: true,\n title: \"Luminosité en fonction du temps\",\n show_states: true,\n colorize_states: true\n },\n yaxis: [\n {\n id: \"illuminance\",\n min: 0,\n apex_config: {\n tickAmount: 4\n }\n },\n {\n id: \"brightness\",\n opposite: true,\n min: 0,\n max: 100,\n apex_config: {\n tickAmount: 4\n }\n }\n ],\n series: [\n (aggregate_illuminance?.entity_id ? {\n entity: aggregate_illuminance?.entity_id,\n yaxis_id: \"illuminance\",\n color: \"orange\",\n name: \"Luminosité ambiante (lx)\",\n type: \"line\",\n group_by: {\n func: \"last\",\n duration: \"30m\"\n }\n } : undefined),\n {\n entity: adaptive_lighting_range?.entity_id,\n type: \"area\",\n yaxis_id: \"illuminance\",\n show: {\n in_header: false\n },\n color: \"blue\",\n name: \"Zone d'éclairage adaptatif\",\n unit: \"lx\",\n transform: `return parseInt(hass.states['${maximum_lighting_level?.entity_id}'].state) + ${OPTIONS_ADAPTIVE_LIGHTING_RANGE[adaptive_lighting_range_state]};`,\n group_by: {\n func: \"last\",\n }\n },\n {\n entity: maximum_lighting_level?.entity_id,\n type: \"area\",\n yaxis_id: \"illuminance\",\n name: \"Zone d'éclairage à 100%\",\n color: \"red\",\n show: {\n in_header: false\n },\n group_by: {\n func: \"last\",\n }\n },\n ].filter(Boolean)\n },\n ]\n }\n }\n }\n }\n }\n\n /**\n * Class Constructor.\n *\n * @param {PopupActionConfig} options The chip options.\n */\n constructor(device: MagicAreaRegistryEntry) {\n super();\n\n const defaultConfig = this.getDefaultConfig(device)\n\n this.config = Object.assign(this.config, defaultConfig);\n\n }\n}\n\nexport { LightSettings };\n","\nimport { PopupActionConfig } from \"../types/homeassistant/data/lovelace\";\nimport { slugify } from \"../utils\";\nimport { MAGIC_AREAS_DOMAIN, TOD_ORDER } from \"../variables\";\nimport { AbstractPopup } from \"./AbstractPopup\";\nimport { generic } from \"../types/strategy/generic\";\nimport MagicAreaRegistryEntry = generic.MagicAreaRegistryEntry;\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Scene Chip class.\n *\n * Used to create a chip to indicate how many lights are on and to turn all off.\n */\nclass SceneSettings extends AbstractPopup {\n\n getDefaultConfig(device: MagicAreaRegistryEntry): PopupActionConfig {\n\n const { scene_morning, scene_daytime, scene_evening, scene_night } = device?.entities ?? {}\n const selectControl = [scene_morning, scene_daytime, scene_evening, scene_night].filter(Boolean)\n\n return {\n action: \"fire-dom-event\",\n browser_mod: {\n service: \"browser_mod.popup\",\n data: {\n title: \"Configurer les scènes\",\n content: {\n type: \"vertical-stack\",\n cards: [\n ...(selectControl.length ? TOD_ORDER.map(tod => (\n {\n type: \"custom:config-template-card\",\n variables: {\n SCENE_STATE: `states['${device?.entities[('scene_' + tod) as \"scene_morning\"]?.entity_id}'].state`\n },\n entities: [device?.entities[('scene_' + tod) as \"scene_morning\"]?.entity_id],\n card: {\n type: \"horizontal-stack\",\n cards: [\n {\n type: \"entities\",\n entities: [device?.entities[('scene_' + tod) as \"scene_morning\"]?.entity_id]\n },\n {\n type: \"conditional\",\n conditions: [\n {\n entity: \"${SCENE_STATE}\",\n state: \"on\"\n },\n // {\n // entity: \"${SCENE_STATE}\",\n // state: \"off\"\n // }\n ],\n card:\n {\n type: \"tile\",\n entity: \"${SCENE_STATE}\",\n show_entity_picture: true,\n tap_action: {\n action: \"toggle\"\n },\n }\n },\n {\n type: \"conditional\",\n conditions: [\n {\n entity: \"${SCENE_STATE}\",\n state: \"unavailable\"\n },\n // {\n // entity: \"${SCENE_STATE}\",\n // state: \"off\"\n // }\n ],\n card:\n\n {\n type: \"custom:mushroom-template-card\",\n secondary: \"Utiliser l'éclairage actuel\",\n multiline_secondary: true,\n icon: \"mdi:pencil\",\n layout: \"vertical\",\n tap_action: {\n action: \"call-service\",\n service: `${MAGIC_AREAS_DOMAIN}.snapshot_lights_as_tod_scene`,\n data: {\n area: slugify(device.name),\n tod\n }\n },\n },\n }\n ]\n }\n }\n )\n ) : [{\n type: \"custom:mushroom-template-card\",\n primary: \"Ajouter une nouvelle scène\",\n secondary: `Cliquer ici pour vous rendre sur la page des scènes`,\n multiline_secondary: true,\n icon: `mdi:palette`,\n tap_action: {\n action: \"fire-dom-event\",\n browser_mod: {\n service: \"browser_mod.sequence\",\n data: {\n sequence: [\n {\n service: \"browser_mod.navigate\",\n data: { path: `/config/scene/dashboard` }\n },\n {\n service: \"browser_mod.close_popup\",\n data: {}\n }\n ]\n }\n }\n },\n card_mod: {\n style: `\n ha-card {\n box-shadow: none!important;\n }\n `\n }\n }])\n ].filter(Boolean)\n }\n }\n }\n }\n }\n\n /**\n * Class Constructor.\n *\n * @param {chips.PopupActionConfig} options The chip options.\n */\n constructor(device: MagicAreaRegistryEntry) {\n super();\n\n const defaultConfig = this.getDefaultConfig(device)\n\n this.config = Object.assign(this.config, defaultConfig);\n\n\n }\n}\n\nexport { SceneSettings };\n","import { Helper } from \"../Helper\";\nimport { version } from \"../linus-strategy\";\nimport { PopupActionConfig } from \"../types/homeassistant/data/lovelace\";\nimport { AbstractPopup } from \"./AbstractPopup\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Linus Chip class.\n *\n * Used to create a chip to indicate how many lights are on and to turn all off.\n */\nclass SettingsPopup extends AbstractPopup {\n\n getDefaultConfig(): PopupActionConfig {\n\n const linusDeviceIds = Object.values(Helper.magicAreasDevices).map((area) => area?.id).flat()\n\n return {\n action: \"fire-dom-event\",\n browser_mod: {\n service: \"browser_mod.popup\",\n data: {\n title: Helper.localize(\"component.linus_dashboard.entity.button.settings_chip.name\"),\n content: {\n type: \"vertical-stack\",\n cards: [\n linusDeviceIds.length > 0 && {\n type: \"horizontal-stack\",\n cards: [\n {\n type: \"custom:mushroom-template-card\",\n primary: Helper.localize(\"component.linus_dashboard.entity.button.settings_chip.state.on\"),\n icon: \"mdi:refresh\",\n icon_color: \"blue\",\n tap_action: {\n action: \"call-service\",\n service: `homeassistant.reload_config_entry`,\n target: { \"device_id\": linusDeviceIds },\n }\n },\n {\n type: \"custom:mushroom-template-card\",\n primary: Helper.localize(\"component.linus_dashboard.entity.button.settings_chip.state.off\"),\n icon: \"mdi:restart\",\n icon_color: \"red\",\n tap_action: {\n action: \"call-service\",\n service: \"homeassistant.restart\",\n }\n },\n ]\n },\n {\n type: \"markdown\",\n content: `Linus dashboard est en version ${version}.`,\n },\n ].filter(Boolean)\n }\n }\n }\n }\n }\n\n /**\n * Class Constructor.\n *\n * @param {chips.PopupActionConfig} options The chip options.\n */\n constructor() {\n super();\n\n const defaultConfig = this.getDefaultConfig()\n\n this.config = Object.assign(this.config, defaultConfig);\n\n\n }\n}\n\nexport { SettingsPopup };\n","import { PopupActionConfig } from \"../types/homeassistant/data/lovelace\";\nimport { AbstractPopup } from \"./AbstractPopup\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Weather Chip class.\n *\n * Used to create a chip to indicate how many Weathers are on and to turn all off.\n */\nclass WeatherPopup extends AbstractPopup {\n\n getDefaultConfig(entityId: string): PopupActionConfig {\n return {\n action: \"fire-dom-event\",\n browser_mod: {\n service: \"browser_mod.popup\",\n data: {\n title: \"Météo\",\n content: {\n type: \"vertical-stack\",\n cards: [\n {\n type: \"weather-forecast\",\n entity: entityId,\n show_current: true,\n show_forecast: true\n },\n ]\n }\n }\n }\n }\n }\n\n /**\n * Class Constructor.\n *\n * @param {chips.PopupActionConfig} options The chip options.\n */\n constructor(entity_id: string) {\n super();\n\n this.config = Object.assign(this.config, this.getDefaultConfig(entity_id));\n\n\n }\n}\n\nexport {WeatherPopup};\n","import {ActionsSharedConfig} from \"../shared/config/actions-config\";\nimport {LovelaceCardConfig} from \"../../homeassistant/data/lovelace\";\nimport {EntitySharedConfig} from \"../shared/config/entity-config\";\nimport {AppearanceSharedConfig} from \"../shared/config/appearance-config\";\n\nexport const VACUUM_COMMANDS = [\n \"on_off\",\n \"start_pause\",\n \"stop\",\n \"locate\",\n \"clean_spot\",\n \"return_home\",\n] as const;\n\nexport type VacuumCommand = (typeof VACUUM_COMMANDS)[number];\n\n/**\n * Vacuum Card Config.\n *\n * @param {boolean} icon_animation Animate the icon when vacuum is cleaning.\n * @param {VacuumCommand[]} commands List of commands to display (start_pause, stop, locate, clean_spot, return_home).\n *\n * @see https://github.com/piitaya/lovelace-mushroom/blob/main/docs/cards/vacuum.md\n */\nexport type VacuumCardConfig = LovelaceCardConfig &\n EntitySharedConfig &\n AppearanceSharedConfig &\n ActionsSharedConfig & {\n icon_animation?: boolean;\n commands?: VacuumCommand[];\n};\n","import {\n CallServiceActionConfig,\n LovelaceCardConfig,\n LovelaceConfig,\n LovelaceViewConfig\n} from \"../homeassistant/data/lovelace\";\nimport { HomeAssistant } from \"../homeassistant/types\";\nimport { AreaRegistryEntry } from \"../homeassistant/data/area_registry\";\nimport { cards } from \"./cards\";\nimport { EntityRegistryEntry } from \"../homeassistant/data/entity_registry\";\nimport { LovelaceChipConfig } from \"../lovelace-mushroom/utils/lovelace/chip/types\";\nimport { HassServiceTarget } from \"home-assistant-js-websocket\";\nimport { FloorRegistryEntry } from \"../homeassistant/data/floor_registry\";\nimport { DeviceRegistryEntry } from \"../homeassistant/data/device_registry\";\n\nexport namespace generic {\n /**\n * An entry out of a Home Assistant Register.\n */\n export type RegistryEntry =\n | AreaRegistryEntry\n | DataTransfer\n | EntityRegistryEntry\n\n /**\n * View Entity.\n *\n * @property {number} [order] Ordering position of the entity in the list of available views.\n * @property {boolean} [hidden] True if the entity should be hidden from the dashboard.\n */\n export interface ViewConfig extends LovelaceViewConfig {\n hidden?: boolean;\n order?: number;\n }\n\n /**\n * Domain Configuration.\n *\n * @property {number} [order] Ordering position of the entity in the list of available views.\n * @property {boolean} [hidden] True if the entity should be hidden from the dashboard.\n * @property {boolean} [hide_config_entities] True if the entity's categorie is \"config\" and should be hidden from the\n * dashboard.\n */\n export interface DomainConfig extends Partial {\n hidden?: boolean;\n order?: number;\n hide_config_entities?: boolean\n }\n\n /**\n * Dashboard Information Object.\n *\n * Home Assistant passes this object to the Dashboard Generator method.\n *\n * @property {LovelaceConfig} config Dashboard configuration.\n * @property {HomeAssistant} hass The Home Assistant object.\n *\n * @see https://developers.home-assistant.io/docs/frontend/custom-ui/custom-strategy/#dashboard-strategies\n */\n export interface DashBoardInfo {\n config?: LovelaceConfig & {\n strategy: {\n options?: StrategyConfig\n }\n };\n hass: HomeAssistant;\n }\n\n /**\n * View Information Object.\n *\n * Home Assistant passes this object to the View Generator method.\n *\n * @property {LovelaceViewConfig} view View configuration.\n * @property {LovelaceConfig} config Dashboard configuration.\n * @property {HomeAssistant} hass The Home Assistant object.\n *\n * @see https://developers.home-assistant.io/docs/frontend/custom-ui/custom-strategy/#view-strategies\n */\n export interface ViewInfo {\n view: LovelaceViewConfig & {\n strategy?: {\n options?: StrategyConfig & { viewId: string, area: StrategyArea, floor: StrategyFloor }\n }\n };\n config: LovelaceConfig\n hass: HomeAssistant;\n }\n\n /**\n * Strategy Configuration.\n *\n * @property {Object.} areas List of areas.\n * @property {Object.} [card_options] Card options for entities.\n * @property {chips} [chips] List of chips to show in the Home view.\n * @property {boolean} [debug] Set to true for more verbose debugging info.\n * @property {Object.} domains List of domains.\n * @property {object[]} [extra_cards] List of cards to show below room cards.\n * @property {object[]} [extra_views] List of views to add to the dashboard.\n * @property {object[]} [quick_access_cards] List of cards to show between welcome card and rooms cards.\n * @property {Object.} views List of views.\n */\n export interface StrategyConfig {\n areas: { [k: string]: StrategyArea };\n floors: { [k: string]: StrategyFloor };\n card_options?: { [k: string]: CustomCardConfig };\n chips?: Chips;\n debug: boolean;\n domains: { [k: string]: DomainConfig };\n extra_cards?: LovelaceCardConfig[];\n extra_views?: ViewConfig[];\n home_view: {\n hidden: HiddenSectionType[]\n }\n quick_access_cards?: LovelaceCardConfig[];\n views: { [k: string]: ViewConfig };\n }\n\n const hiddenSectionList = [\"chips\", \"persons\", \"greeting\", \"areas\", \"areasTitle\"] as const;\n export type HiddenSectionType = typeof hiddenSectionList[number];\n\n /**\n * Represents the default configuration for a strategy.\n */\n export interface StrategyDefaults extends StrategyConfig {\n areas: {\n undisclosed: StrategyArea & {\n area_id: \"undisclosed\",\n },\n [k: string]: StrategyArea,\n },\n floors: {\n undisclosed: StrategyFloor & {\n floor_id: \"undisclosed\",\n },\n [k: string]: StrategyFloor,\n },\n domains: {\n default: DomainConfig,\n [k: string]: DomainConfig,\n }\n }\n\n /**\n * Strategy Device.\n *\n */\n export interface StrategyDevice extends DeviceRegistryEntry {\n floor_id: string | null;\n entities: string[];\n }\n\n export interface MagicAreaRegistryEntry extends DeviceRegistryEntry {\n entities: Record;\n area_name: string;\n }\n\n /**\n * Strategy Entity.\n *\n */\n export interface StrategyEntity extends EntityRegistryEntry {\n floor_id: string | null;\n }\n\n /**\n * Strategy Area.\n *\n * @property {number} [order] Ordering position of the area in the list of available areas.\n * @property {boolean} [hidden] True if the entity should be hidden from the dashboard.\n * @property {object[]} [extra_cards] An array of card configurations.\n * The configured cards are added to the dashboard.\n * @property {string} [type=default] The type of area card.\n */\n export interface StrategyArea extends AreaRegistryEntry {\n slug: string;\n domains: Record;\n order?: number;\n hidden?: boolean;\n extra_cards?: LovelaceCardConfig[];\n type?: string;\n devices: string[];\n entities: string[];\n magicAreaDevice?: StrategyDevice;\n }\n\n /**\n * Strategy Floor.\n *\n * @property {number} [order] Ordering position of the area in the list of available areas.\n * @property {boolean} [hidden] True if the entity should be hidden from the dashboard.\n */\n export interface StrategyFloor extends FloorRegistryEntry {\n order?: number;\n hidden?: boolean;\n type?: string;\n areas_slug: string[];\n }\n\n /**\n * A list of chips to show in the Home view.\n *\n * @property {boolean} light_count Chip to display the number of lights on.\n * @property {boolean} fan_count Chip to display the number of fans on.\n * @property {boolean} cover_count Chip to display the number of unclosed covers.\n * @property {boolean} switch_count Chip to display the number of switches on.\n * @property {boolean} climate_count Chip to display the number of climates which are not off.\n * @property {string} weather_entity Entity ID for the weather chip to use, accepts `weather.` only.\n * @property {object[]} extra_chips List of extra chips.\n */\n export interface Chips {\n extra_chips: LovelaceChipConfig[];\n\n light_count: boolean;\n fan_count: boolean;\n cover_count: boolean;\n switch_count: boolean;\n climate_count: boolean;\n weather_entity: string;\n alarm_entity: string;\n\n [key: string]: any;\n }\n\n /**\n * Custom Card Configuration for an entity.\n *\n * @property {boolean} hidden True if the entity should be hidden from the dashboard.\n */\n export interface CustomCardConfig extends LovelaceCardConfig {\n hidden?: boolean;\n }\n\n /**\n * Area Filter Context.\n *\n * @property {AreaRegistryEntry} area Area Entity.\n * @property {string[]} areaDeviceIds The id of devices which are linked to the area entity.\n * @property {string} domain Domain of the entity.\n * Example: `light`.\n */\n export interface AreaFilterContext {\n area: AreaRegistryEntry;\n areaDeviceIds: string[];\n domain: string;\n }\n\n /**\n * Checks if the given object is an instance of CallServiceActionConfig.\n *\n * @param {any} obj - The object to be checked.\n * @return {boolean} - Returns true if the object is an instance of CallServiceActionConfig, otherwise false.\n */\n export function isCallServiceActionConfig(obj: any): obj is CallServiceActionConfig {\n return obj && obj.action === \"call-service\" && [\"action\", \"service\"].every(key => key in obj);\n }\n\n /**\n * Checks if the given object is an instance of HassServiceTarget.\n *\n * @param {any} obj - The object to check.\n * @return {boolean} - True if the object is an instance of HassServiceTarget, false otherwise.\n */\n export function isCallServiceActionTarget(obj: any): obj is HassServiceTarget {\n return obj && [\"entity_id\", \"device_id\", \"area_id\"].some(key => key in obj);\n }\n}\n","import { Helper } from \"./Helper\";\nimport { EntityRegistryEntry } from \"./types/homeassistant/data/entity_registry\";\nimport { generic } from \"./types/strategy/generic\";\nimport MagicAreaRegistryEntry = generic.MagicAreaRegistryEntry;\nimport StrategyFloor = generic.StrategyFloor;\nimport StrategyArea = generic.StrategyArea;\nimport { ActionConfig } from \"./types/homeassistant/data/lovelace\";\nimport { DEVICE_CLASSES, AGGREGATE_DOMAINS, GROUP_DOMAINS, LIGHT_DOMAIN, UNDISCLOSED } from \"./variables\";\nimport { LovelaceChipConfig } from \"./types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { UnavailableChip } from \"./chips/UnavailableChip\";\nimport { chips } from \"./types/strategy/chips\";\n\n/**\n * Groups the elements of an array based on a provided function\n * @param {T[]} array - The array to group\n * @param {(item: T) => K} fn - The function to determine the group key for each element\n * @returns {Record} - An object where the keys are the group identifiers and the values are arrays of grouped elements\n */\nexport function groupBy(array: T[], fn: (item: T) => K): Record {\n return array.reduce((result, item) => {\n // Determine the group key for the current item\n const key = fn(item);\n\n // If the group key does not exist in the result, create an array for it\n if (!result[key]) {\n result[key] = [];\n }\n\n // Add the current item to the group\n result[key].push(item);\n\n return result;\n }, {} as Record);\n}\n\nexport function slugify(text: string | null, separator: string = \"_\"): string {\n if (text === \"\" || text === null) {\n return \"\";\n }\n const slug = text.toLowerCase()\n .normalize(\"NFD\")\n .replace(/[\\u0300-\\u036f]/g, \"\")\n .replace(/\\s+/g, separator)\n .replace(/-/g, \"_\");\n return slug === \"\" ? \"unknown\" : slug;\n}\n\nexport function getMagicAreaSlug(device: MagicAreaRegistryEntry): string {\n return slugify(device.name ?? \"\".replace('-', '_'));\n}\n\nexport function getStateContent(entity_id: string): string {\n return entity_id.startsWith('binary_sensor.') ? 'last-changed' : 'state'\n}\n\nexport function navigateTo(path: string): ActionConfig {\n return {\n action: \"navigate\",\n navigation_path: `${path}`,\n }\n}\n\nexport function getAggregateEntity(device: MagicAreaRegistryEntry, domains: string | string[], device_classes?: string | string[]): EntityRegistryEntry[] {\n const aggregateKeys: EntityRegistryEntry[] = [];\n const domainList = Array.isArray(domains) ? domains : [domains];\n const deviceClassList = Array.isArray(device_classes) ? device_classes : [device_classes];\n\n domainList.forEach(domain => {\n if (domain === \"light\") {\n Object.values(device?.entities ?? {}).forEach(entity => {\n if (entity.entity_id.endsWith('_lights')) {\n aggregateKeys.push(entity);\n }\n });\n } else if (GROUP_DOMAINS.includes(domain)) {\n aggregateKeys.push(device?.entities[`${domain}_group` as 'cover_group']);\n } else if (AGGREGATE_DOMAINS.includes(domain)) {\n deviceClassList.forEach(device_class => {\n aggregateKeys.push(device?.entities[`aggregate_${device_class}` as 'aggregate_motion']);\n });\n }\n });\n\n return aggregateKeys.filter(Boolean);\n}\n\nexport function getMAEntity(magic_device_id: string, domain: string, device_class?: string): EntityRegistryEntry | undefined {\n const magicAreaDevice = Helper.magicAreasDevices[magic_device_id];\n\n // TODO remove '' when new release\n if (domain === LIGHT_DOMAIN) return magicAreaDevice?.entities?.[''] ?? magicAreaDevice?.entities?.['all_lights']\n if (GROUP_DOMAINS.includes(domain)) return magicAreaDevice?.entities?.[`${domain}_group` as 'cover_group']\n if (device_class && [...DEVICE_CLASSES.binary_sensor, ...DEVICE_CLASSES.sensor].includes(device_class)) return magicAreaDevice?.entities?.[`aggregate_${device_class}` as 'aggregate_motion']\n return undefined\n}\n\nexport function groupEntitiesByDomain(entity_ids: string[]): Record {\n return entity_ids\n .reduce((acc: Record, entity_id) => {\n let domain = entity_id.split(\".\")[0];\n\n if (Object.keys(DEVICE_CLASSES).includes(domain)) {\n const entityState = Helper.getEntityState(entity_id);\n\n if (entityState?.attributes?.device_class) {\n domain = entityState.attributes.device_class\n }\n }\n if (!acc[domain]) {\n acc[domain] = [];\n }\n acc[domain].push(entity_id);\n return acc;\n }, {});\n}\n\n// Numeric chips.\nexport async function createChipsFromList(chipsList: string[], chipOptions?: Partial, magic_device_id: string = \"global\", area_slug?: string | string[]) {\n const chips: LovelaceChipConfig[] = [];\n\n const area_slugs = area_slug ? Array.isArray(area_slug) ? area_slug : [area_slug] : [];\n\n const domains = magic_device_id === \"global\"\n ? Object.keys(Helper.domains)\n : area_slugs.flatMap(area_slug => Object.keys(Helper.areas[area_slug]?.domains ?? {}));\n\n for (let chipType of chipsList) {\n if (!domains.includes(chipType)) continue;\n\n const className = Helper.sanitizeClassName(chipType + \"Chip\");\n\n try {\n let chipModule;\n if ([...DEVICE_CLASSES.binary_sensor, ...DEVICE_CLASSES.sensor].includes(chipType)) {\n chipModule = await import(\"./chips/AggregateChip\");\n const chip = new chipModule.AggregateChip({ ...chipOptions, device_class: chipType, area_slug, magic_device_id });\n chips.push(chip.getChip());\n } else {\n chipModule = await import(\"./chips/\" + className);\n const chip = new chipModule[className]({ ...chipOptions, area_slug });\n chips.push(chip.getChip());\n }\n } catch (e) {\n Helper.logError(`An error occurred while creating the ${chipType} chip!`, e);\n\n }\n }\n\n const unavailableChip = new UnavailableChip({ area_slug }).getChip();\n if (unavailableChip) chips.push(unavailableChip);\n\n return chips;\n}\n\nexport function getDomainTranslationKey(domain: string, device_class?: string) {\n if (domain === 'scene') return 'ui.dialogs.quick-bar.commands.navigation.scene'\n\n if (AGGREGATE_DOMAINS.includes(domain) && device_class) return `component.${domain}.entity_component.${device_class}.name`\n return `component.${domain}.entity_component._.name`\n}\n\nexport function getStateTranslationKey(state: string, domain: string, device_class?: string) {\n if (domain === 'scene') return 'ui.dialogs.quick-bar.commands.navigation.scene'\n\n if (AGGREGATE_DOMAINS.includes(domain)) return `component.${domain}.entity_component.${device_class}.state.${state}`\n\n return `component.${domain}.entity_component._.name`\n}\n\nexport function getFloorName(floor: StrategyFloor): string {\n return floor.floor_id === UNDISCLOSED ? Helper.localize(\"component.linus_dashboard.entity.button.floor_not_found.name\") : floor.name!\n}\n\nexport function getAreaName(area: StrategyArea): string {\n return area.area_id === UNDISCLOSED ? Helper.localize(\"ui.card.area.area_not_found\") : area.name!\n}","export const MAGIC_AREAS_DOMAIN = \"magic_areas\";\nexport const MAGIC_AREAS_NAME = \"Magic Areas\";\n\nexport const UNAVAILABLE = \"unavailable\";\nexport const UNDISCLOSED = \"undisclosed\";\n\nexport const TOD_ORDER = [\"morning\", \"daytime\", \"evening\", \"night\"];\n\nexport const LIGHT_DOMAIN = \"light\";\nexport const GROUP_DOMAINS = [\"climate\", \"media_player\", \"cover\"];\nexport const AGGREGATE_DOMAINS = [\"binary_sensor\", \"sensor\"];\n\nexport const DEVICE_CLASSES = {\n sensor: [\"illuminance\", \"temperature\", \"humidity\", \"battery\", \"energy\", \"power\"],\n binary_sensor: [\"motion\", \"door\", \"window\", \"vibration\", \"moisture\", \"smoke\"],\n};\n\nexport const AREA_CARDS_DOMAINS = [LIGHT_DOMAIN, \"switch\", \"climate\", \"fan\", \"camera\", \"cover\", \"vacuum\", \"media_player\", \"lock\", \"scene\", \"plant\", \"binary_sensor\", \"sensor\"];\n\nexport const CUSTOM_VIEWS = [\"home\", \"security\", \"security-details\"];\n\nexport const DOMAINS_VIEWS = [...AREA_CARDS_DOMAINS, ...DEVICE_CLASSES.binary_sensor, ...DEVICE_CLASSES.sensor];\n\nexport const HOME_EXPOSED_CHIPS = [\"weather\", \"alarm\", \"spotify\", LIGHT_DOMAIN, ...GROUP_DOMAINS, \"fan\", \"switch\", \"safety\", \"motion\", \"door\", \"window\"];\nexport const AREA_EXPOSED_CHIPS = [LIGHT_DOMAIN, ...GROUP_DOMAINS, \"fan\", \"switch\", \"safety\", ...DEVICE_CLASSES.binary_sensor, ...DEVICE_CLASSES.sensor];\n\nexport const DEVICE_ICONS = {\n presence_hold: 'mdi:car-brake-hold'\n};\n\nexport const VIEWS_ICONS = {\n home: \"mdi:home-assistant\",\n security: \"mdi:security\",\n};\n\nexport const AREA_STATE_ICONS = {\n occupied: \"mdi:account\",\n extended: \"mdi:account-clock\",\n clear: \"mdi:account-off\",\n bright: \"mdi:brightness-2\",\n dark: \"mdi:brightness-5\",\n sleep: \"mdi:bed\",\n};\n\nexport const AREA_CONTROL_ICONS = {\n light: \"mdi:lightbulb-auto-outline\",\n climate: \"mdi:thermostat-auto\",\n media_player: \"mdi:auto-mode\",\n};\n","import { AREA_CARDS_DOMAINS, UNDISCLOSED } from './../variables';\nimport { Helper } from \"../Helper\";\nimport { ControllerCard } from \"../cards/ControllerCard\";\nimport { LovelaceGridCardConfig, StackCardConfig } from \"../types/homeassistant/lovelace/cards/types\";\nimport { LovelaceCardConfig, LovelaceSectionConfig, LovelaceViewConfig } from \"../types/homeassistant/data/lovelace\";\nimport { HassServiceTarget } from \"home-assistant-js-websocket\";\nimport { TemplateCardConfig } from '../types/lovelace-mushroom/cards/template-card-config';\nimport { ChipsCardConfig } from '../types/lovelace-mushroom/cards/chips-card';\nimport { SwipeCard } from '../cards/SwipeCard';\nimport { getAreaName, getFloorName, slugify } from '../utils';\nimport { views } from '../types/strategy/views';\n\n/**\n * Abstract View Class.\n *\n * To create a new view, extend the new class with this one.\n *\n * @class\n * @abstract\n */\nabstract class AbstractView {\n /**\n * Configuration of the view.\n *\n * @type {views.ViewConfig}\n */\n config: views.ViewConfig = {\n icon: \"mdi:view-dashboard\",\n type: \"sections\",\n subview: false,\n };\n\n /**\n * A card to switch all entities in the view.\n *\n * @type {LovelaceCardConfig[]}\n */\n viewControllerCard: LovelaceCardConfig[] = []\n\n /**\n * The domain of which we operate the devices.\n *\n * @private\n * @readonly\n */\n readonly #domain: string;\n\n /**\n * The device class of the view.\n *\n * @private\n * @readonly\n */\n readonly #device_class?: string;\n\n /**\n * Class constructor.\n *\n * @param {string} [domain] The domain which the view is representing.\n * @param {string} [device_class] The device class which the view is representing.\n *\n * @throws {Error} If trying to instantiate this class.\n * @throws {Error} If the Helper module isn't initialized.\n */\n protected constructor(domain: string, device_class?: string) {\n if (!Helper.isInitialized()) {\n throw new Error(\"The Helper module must be initialized before using this one.\");\n }\n\n this.#domain = domain;\n this.#device_class = device_class;\n }\n\n /**\n * Create the cards to include in the view.\n *\n * @return {Promise<(StackCardConfig | TemplateCardConfig | ChipsCardConfig)[]>} Promise a View Card array.\n * @override\n */\n async createViewCards(): Promise<(StackCardConfig | TemplateCardConfig | ChipsCardConfig)[]> {\n return []\n }\n\n /**\n * Create the cards to include in the view.\n *\n * @return {Promise<(StackCardConfig | TemplateCardConfig | ChipsCardConfig)[]>} Promise a View Card array.\n * @override\n */\n async createSectionBadges(): Promise<(StackCardConfig | TemplateCardConfig | ChipsCardConfig)[]> {\n return []\n }\n\n /**\n * Create the cards to include in the view.\n *\n * @return {Promise} Promise a View Card array.\n * @override\n */\n async createSectionCards(): Promise {\n const viewSections: LovelaceGridCardConfig[] = [];\n const configEntityHidden = Helper.strategyOptions.domains[this.#domain ?? \"_\"].hide_config_entities\n || Helper.strategyOptions.domains[\"_\"].hide_config_entities;\n let isFirstLoop = true;\n\n for (const floor of Helper.orderedFloors) {\n if (floor.areas_slug.length === 0 || !AREA_CARDS_DOMAINS.includes(this.#domain ?? \"\")) continue;\n\n const floorCards = [];\n\n for (const area of floor.areas_slug.map(area_slug => Helper.areas[area_slug])) {\n const entities = Helper.getAreaEntities(area, this.#device_class ?? this.#domain);\n const className = Helper.sanitizeClassName(this.#domain + \"Card\");\n const cardModule = await import(`../cards/${className}`);\n\n if (entities.length === 0 || !cardModule) continue;\n\n let target: HassServiceTarget = { area_id: [area.slug] };\n if (area.area_id === UNDISCLOSED) {\n target = { entity_id: entities.map(entity => entity.entity_id) };\n }\n\n const entityCards = entities\n .filter(entity => !Helper.strategyOptions.card_options?.[entity.entity_id]?.hidden\n && !Helper.strategyOptions.card_options?.[entity.device_id ?? \"null\"]?.hidden\n && !(entity.entity_category === \"config\" && configEntityHidden))\n .map(entity => new cardModule[className](entity).getCard());\n\n if (entityCards.length) {\n const areaCards = entityCards.length > 2 ? [new SwipeCard(entityCards).getCard()] : entityCards;\n const titleCardOptions = {\n ...Helper.strategyOptions.domains[this.#domain].controllerCardOptions,\n subtitle: getAreaName(area),\n subtitleIcon: area.area_id === UNDISCLOSED ? \"mdi:help-circle\" : area.icon ?? \"mdi:floor-plan\",\n subtitleNavigate: area.slug\n } as any;\n if (this.#domain) {\n titleCardOptions.showControls = Helper.strategyOptions.domains[this.#domain].showControls;\n titleCardOptions.extraControls = Helper.strategyOptions.domains[this.#domain].extraControls;\n titleCardOptions.controlChipOptions = { device_class: this.#device_class, area_slug: area.slug }\n }\n const areaControllerCard = new ControllerCard(target, titleCardOptions, this.#domain, area.slug).createCard();\n\n floorCards.push(...areaControllerCard, ...areaCards);\n }\n }\n\n if (floorCards.length) {\n const titleSectionOptions: any = {\n ...Helper.strategyOptions.domains[this.#domain].controllerCardOptions,\n title: getFloorName(floor),\n titleIcon: floor.icon ?? \"mdi:floor-plan\",\n titleNavigate: slugify(floor.name)\n };\n if (this.#domain) {\n titleSectionOptions.showControls = Helper.strategyOptions.domains[this.#domain].showControls;\n titleSectionOptions.extraControls = Helper.strategyOptions.domains[this.#domain].extraControls;\n titleSectionOptions.controlChipOptions = {\n device_class: this.#device_class,\n area_slug: floor.areas_slug\n }\n }\n\n const area_ids = floor.areas_slug.map(area_slug => Helper.areas[area_slug].area_id);\n const floorControllerCard = new ControllerCard(\n { area_id: area_ids },\n titleSectionOptions,\n this.#domain,\n floor.floor_id\n ).createCard();\n\n const section = { type: \"grid\", cards: [] } as LovelaceGridCardConfig;\n if (isFirstLoop) {\n section.cards.push(...this.viewControllerCard);\n isFirstLoop = false;\n }\n\n section.cards.push(...floorControllerCard);\n section.cards.push(...floorCards);\n viewSections.push(section);\n }\n }\n\n\n return viewSections;\n }\n\n /**\n * Get a view object.\n *\n * The view includes the cards which are created by method createViewCards().\n *\n * @returns {Promise} The view object.\n */\n async getView(): Promise {\n return {\n ...this.config,\n badges: await this.createSectionBadges(),\n sections: await this.createSectionCards(),\n cards: await this.createViewCards(),\n };\n }\n\n /**\n * Get a target of entity IDs for the given domain.\n *\n * @param {string} domain - The target domain to retrieve entity IDs from.\n * @return {HassServiceTarget} - A target for a service call.\n */\n targetDomain(domain: string): HassServiceTarget {\n return {\n entity_id: Helper.domains[domain]?.filter(\n entity =>\n !entity.hidden_by\n && !Helper.strategyOptions.card_options?.[entity.entity_id]?.hidden\n ).map(entity => entity.entity_id),\n };\n }\n}\n\nexport { AbstractView };\n","import { Helper } from \"../Helper\";\nimport { ControllerCard } from \"../cards/ControllerCard\";\nimport { AbstractView } from \"./AbstractView\";\nimport { views } from \"../types/strategy/views\";\nimport { DEVICE_CLASSES } from \"../variables\";\nimport { getDomainTranslationKey } from \"../utils\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Aggregate View Class.\n *\n * Used to create a view for entities of the fan domain.\n *\n * @class AggregateView\n * @extends AbstractView\n */\nclass AggregateView extends AbstractView {\n\n /**\n * Default configuration of the view.\n *\n * @type {views.ViewConfig}\n * @private\n */\n #defaultConfig: views.ViewConfig = {\n title: \"Aggregates\",\n path: \"aggregates\",\n icon: \"mdi:fan\",\n subview: true,\n };\n\n /**\n * Class constructor.\n *\n * @param {views.AggregateViewOptions} [options={}] Options for the view.\n */\n constructor(options: views.AggregateViewOptions) {\n const domain = DEVICE_CLASSES.sensor.includes(options?.device_class) ? \"sensor\" : \"binary_sensor\";\n super(domain, options?.device_class);\n\n // Create a Controller card to switch all entities of the domain.\n this.viewControllerCard = new ControllerCard(\n this.targetDomain(options?.device_class),\n {\n title: `${Helper.localize(getDomainTranslationKey(domain, options?.device_class))}s`,\n // subtitle: Helper.getDeviceClassCountTemplate(options?.device_class, \"eq\", \"on\") + ` ${Helper.localize(getStateTranslationKey(\"on\", domain, options?.device_class))}s`,\n controlChipOptions: { device_class: options?.device_class },\n }, domain, \"global\").createCard();\n\n }\n}\n\nexport { AggregateView };\n","import { Helper } from \"../Helper\";\nimport { views } from \"../types/strategy/views\";\nimport { ChipsCardConfig } from \"../types/lovelace-mushroom/cards/chips-card\";\nimport { LovelaceGridCardConfig, StackCardConfig } from \"../types/homeassistant/lovelace/cards/types\";\nimport { TemplateCardConfig } from \"../types/lovelace-mushroom/cards/template-card-config\";\nimport { LovelaceViewConfig } from \"../types/homeassistant/data/lovelace\";\nimport { generic } from \"../types/strategy/generic\";\nimport StrategyArea = generic.StrategyArea;\nimport { SwipeCard } from \"../cards/SwipeCard\";\nimport { EntityCardConfig } from \"../types/lovelace-mushroom/cards/entity-card-config\";\nimport { ControllerCard } from \"../cards/ControllerCard\";\nimport { HassServiceTarget } from \"home-assistant-js-websocket\";\nimport { ImageAreaCard } from \"../cards/ImageAreaCard\";\nimport { AREA_EXPOSED_CHIPS, UNDISCLOSED } from \"../variables\";\nimport { LovelaceChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { AreaStateChip } from \"../chips/AreaStateChip\";\nimport { createChipsFromList, getDomainTranslationKey } from \"../utils\";\nimport { ResourceKeys } from \"../types/homeassistant/data/frontend\";\n\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Area View Class.\n *\n * Used to create a Area view.\n *\n * @class AreaView\n */\nclass AreaView {\n /**\n * Default configuration of the view.\n *\n * @type {views.ViewConfig}\n * @private\n */\n config: views.ViewConfig = {\n icon: \"mdi:home-assistant\",\n type: \"sections\",\n path: \"home\",\n subview: true,\n };\n\n\n /**\n * Default configuration of the view.\n *\n * @type {StrategyArea}\n * @private\n */\n area: StrategyArea\n\n /**\n * Class constructor.\n *\n * @param {views.ViewConfig} [options={}] Options for the view.\n */\n constructor(area: StrategyArea, options: views.ViewConfig = {}) {\n\n this.area = area;\n\n this.config = { ...this.config, ...options };\n }\n\n /**\n * Create the cards to include in the view.\n *\n * @return {Promise<(StackCardConfig | TemplateCardConfig | ChipsCardConfig)[]>} Promise a View Card array.\n * @override\n */\n async createSectionBadges(): Promise<(StackCardConfig | TemplateCardConfig | ChipsCardConfig)[]> {\n\n if (Helper.strategyOptions.home_view.hidden.includes(\"chips\")) {\n // Chips section is hidden.\n\n return [];\n }\n\n const chips: LovelaceChipConfig[] = [];\n\n const device = Helper.magicAreasDevices[this.area.slug];\n\n if (device) {\n chips.push(new AreaStateChip(device, true).getChip());\n }\n\n\n const areaChips = await createChipsFromList(AREA_EXPOSED_CHIPS, { show_content: true }, this.area.slug, this.area.slug);\n if (areaChips) {\n chips.push(...areaChips);\n }\n\n // (device?.entities.all_lights && device?.entities.all_lights.entity_id !== \"unavailable\" ? {\n // type: \"custom:mushroom-chips-card\",\n // alignment: \"center\",\n // chips: new AreaScenesChips(device, area).getChips()\n // } : undefined)\n\n return chips.map(chip => ({\n type: \"custom:mushroom-chips-card\",\n alignment: \"center\",\n chips: [chip],\n }));\n }\n\n /**\n * Create the cards to include in the view.\n *\n * @return {Promise} Promise a View Card array.\n * @override\n */\n async createSectionCards(): Promise {\n const viewSections: LovelaceGridCardConfig[] = [];\n const exposedDomainIds = Helper.getExposedDomainIds();\n\n // Create global section card if area is not undisclosed\n if (this.area.area_id !== UNDISCLOSED && this.area.picture) {\n viewSections.push({\n type: \"grid\",\n column_span: 1,\n cards: [new ImageAreaCard(this.area.area_id).getCard()],\n });\n }\n\n let target: HassServiceTarget = { area_id: [this.area.slug] };\n\n for (const domain of exposedDomainIds) {\n if (domain === \"default\") continue;\n\n try {\n const cardModule = await import(`../cards/${Helper.sanitizeClassName(domain + \"Card\")}`);\n const entities = Helper.getAreaEntities(this.area, domain);\n const configEntityHidden = Helper.strategyOptions.domains[domain]?.hide_config_entities || Helper.strategyOptions.domains[\"_\"].hide_config_entities;\n\n if (this.area.area_id === UNDISCLOSED) {\n target = { entity_id: entities.map(entity => entity.entity_id) };\n }\n\n const domainCards: EntityCardConfig[] = [];\n\n if (entities.length) {\n const titleCardOptions = {\n ...Helper.strategyOptions.domains[domain].controllerCardOptions,\n subtitle: Helper.localize(getDomainTranslationKey(domain)),\n domain,\n subtitleIcon: Helper.icons[domain as ResourceKeys]._?.default,\n subtitleNavigate: domain,\n };\n\n if (domain) {\n titleCardOptions.showControls = Helper.strategyOptions.domains[domain].showControls;\n titleCardOptions.extraControls = Helper.strategyOptions.domains[domain].extraControls;\n titleCardOptions.controlChipOptions = { area_slug: this.area.slug };\n }\n\n const titleCard = new ControllerCard(target, titleCardOptions, domain, this.area.slug).createCard();\n\n const entityCards = entities\n .filter(entity => {\n const cardOptions = Helper.strategyOptions.card_options?.[entity.entity_id];\n const deviceOptions = Helper.strategyOptions.card_options?.[entity.device_id ?? \"null\"];\n return !cardOptions?.hidden && !deviceOptions?.hidden && !(entity.entity_category === \"config\" && configEntityHidden);\n })\n .map(entity => {\n const cardOptions = Helper.strategyOptions.card_options?.[entity.entity_id];\n if (domain === \"sensor\" && Helper.getEntityState(entity.entity_id)?.attributes.unit_of_measurement) {\n return new cardModule[Helper.sanitizeClassName(domain + \"Card\")](entity, {\n type: \"custom:mini-graph-card\",\n entities: [entity.entity_id],\n ...cardOptions,\n }).getCard();\n }\n return new cardModule[Helper.sanitizeClassName(domain + \"Card\")](entity, cardOptions).getCard();\n });\n\n if (entityCards.length) {\n domainCards.push(...(entityCards.length > 2 ? [new SwipeCard(entityCards).getCard()] : entityCards));\n domainCards.unshift(...titleCard);\n }\n\n viewSections.push({\n type: \"grid\",\n column_span: 1,\n cards: domainCards,\n });\n }\n } catch (e) {\n Helper.logError(\"An error occurred while creating the domain cards!\", e);\n }\n }\n\n // Handle default domain if not hidden\n if (!Helper.strategyOptions.domains.default.hidden) {\n const areaDevices = this.area.devices.filter(device_id => Helper.devices[device_id].area_id === this.area.area_id);\n const miscellaneousEntities = this.area.entities.filter(entity_id => {\n const entity = Helper.entities[entity_id];\n const entityLinked = areaDevices.includes(entity.device_id ?? \"null\") || entity.area_id === this.area.area_id;\n const entityUnhidden = entity.hidden_by === null && entity.disabled_by === null;\n const domainExposed = exposedDomainIds.includes(entity.entity_id.split(\".\", 1)[0]);\n\n return entityUnhidden && !domainExposed && entityLinked;\n });\n\n if (miscellaneousEntities.length) {\n try {\n const cardModule = await import(\"../cards/MiscellaneousCard\");\n\n const swipeCard = miscellaneousEntities\n .filter(entity_id => {\n const entity = Helper.entities[entity_id];\n const cardOptions = Helper.strategyOptions.card_options?.[entity.entity_id];\n const deviceOptions = Helper.strategyOptions.card_options?.[entity.device_id ?? \"null\"];\n return !cardOptions?.hidden && !deviceOptions?.hidden && !(entity.entity_category === \"config\" && Helper.strategyOptions.domains[\"_\"].hide_config_entities);\n })\n .map(entity_id => new cardModule.MiscellaneousCard(Helper.entities[entity_id], Helper.strategyOptions.card_options?.[entity_id]).getCard());\n\n viewSections.push({\n type: \"grid\",\n column_span: 1,\n cards: [new SwipeCard(swipeCard).getCard()],\n });\n } catch (e) {\n Helper.logError(\"An error occurred while creating the domain cards!\", e);\n }\n }\n }\n\n return viewSections;\n }\n\n\n /**\n * Get a view object.\n *\n * The view includes the cards which are created by method createSectionCards().\n *\n * @returns {Promise} The view object.\n */\n async getView(): Promise {\n return {\n ...this.config,\n badges: await this.createSectionBadges(),\n sections: await this.createSectionCards(),\n };\n }\n\n}\n\nexport { AreaView };","import { ControllerCard } from \"../cards/ControllerCard\";\nimport { AbstractView } from \"./AbstractView\";\nimport { views } from \"../types/strategy/views\";\nimport { cards } from \"../types/strategy/cards\";\nimport { Helper } from \"../Helper\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Camera View Class.\n *\n * Used to create a view for entities of the camera domain.\n *\n * @class CameraView\n * @extends AbstractView\n */\nclass CameraView extends AbstractView {\n /**\n * Domain of the view's entities.\n *\n * @type {string}\n * @static\n * @private\n */\n static #domain: string = \"camera\";\n\n /**\n * Default configuration of the view.\n *\n * @type {views.ViewConfig}\n * @private\n */\n #defaultConfig: views.ViewConfig = {\n title: \"Cameras\",\n path: \"cameras\",\n icon: \"mdi:cctv\",\n subview: false,\n };\n\n /**\n * Default configuration of the view's Controller card.\n *\n * @type {cards.ControllerCardOptions}\n * @private\n */\n #viewControllerCardConfig: cards.ControllerCardOptions = {\n title: `${Helper.localize(`component.camera.entity_component._.name`)}s`,\n // subtitle: Helper.getCountTemplate(CameraView.#domain, \"ne\", \"off\") + ` ${Helper.localize(\"component.light.entity_component._.state.on\")}`,\n };\n\n /**\n * Class constructor.\n *\n * @param {views.ViewConfig} [options={}] Options for the view.\n */\n constructor(options: views.ViewConfig = {}) {\n super(CameraView.#domain);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n\n // Create a Controller card to switch all entities of the domain.\n this.viewControllerCard = new ControllerCard(\n this.targetDomain(CameraView.#domain),\n {\n ...this.#viewControllerCardConfig,\n ...Helper.strategyOptions.domains.camera.controllerCardOptions,\n }, CameraView.#domain).createCard();\n }\n}\n\nexport { CameraView };\n","import { Helper } from \"../Helper\";\nimport { ControllerCard } from \"../cards/ControllerCard\";\nimport { AbstractView } from \"./AbstractView\";\nimport { views } from \"../types/strategy/views\";\nimport { cards } from \"../types/strategy/cards\";\nimport { ClimateCard } from \"../cards/ClimateCard\";\nimport { ClimateChip } from \"../chips/ClimateChip\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Climate View Class.\n *\n * Used to create a view for entities of the climate domain.\n *\n * @class ClimateView\n * @extends AbstractView\n */\nclass ClimateView extends AbstractView {\n /**\n * Domain of the view's entities.\n *\n * @type {string}\n * @static\n * @private\n */\n static #domain: string = \"climate\";\n\n /**\n * Default configuration of the view.\n *\n * @type {views.ViewConfig}\n * @private\n */\n #defaultConfig: views.ViewConfig = {\n title: \"Climates\",\n path: \"climates\",\n icon: \"mdi:thermostat\",\n subview: false,\n };\n\n /**\n * Default configuration of the view's Controller card.\n *\n * @type {cards.ControllerCardOptions}\n * @private\n */\n #viewControllerCardConfig: cards.ControllerCardOptions = {\n title: `${Helper.localize(`component.climate.entity_component._.name`)}s`,\n // subtitle: Helper.getCountTemplate(ClimateView.#domain, \"ne\", \"off\") + ` ${Helper.localize(`component.fan.entity_component._.state.on`)}s`,\n };\n\n /**\n * Class constructor.\n *\n * @param {views.ViewConfig} [options={}] Options for the view.\n */\n constructor(options: views.ViewConfig = {}) {\n super(ClimateView.#domain);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n\n // Create a Controller card to switch all entities of the domain.\n this.viewControllerCard = new ControllerCard(\n this.targetDomain(ClimateView.#domain),\n {\n ...this.#viewControllerCardConfig,\n ...Helper.strategyOptions.domains.climate.controllerCardOptions,\n }, ClimateView.#domain).createCard();\n }\n}\n\nexport { ClimateView };\n","import { Helper } from \"../Helper\";\nimport { ControllerCard } from \"../cards/ControllerCard\";\nimport { AbstractView } from \"./AbstractView\";\nimport { views } from \"../types/strategy/views\";\nimport { cards } from \"../types/strategy/cards\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Cover View Class.\n *\n * Used to create a view for entities of the cover domain.\n *\n * @class CoverView\n * @extends AbstractView\n */\nclass CoverView extends AbstractView {\n /**\n * Domain of the view's entities.\n *\n * @type {string}\n * @static\n * @private\n */\n static #domain: string = \"cover\";\n\n /**\n * Default configuration of the view.\n *\n * @type {views.ViewConfig}\n * @private\n */\n #defaultConfig: views.ViewConfig = {\n title: \"Covers\",\n path: \"cover\",\n icon: \"mdi:window-open\",\n subview: false,\n };\n\n /**\n * Default configuration of the view's Controller card.\n *\n * @type {cards.ControllerCardOptions}\n * @private\n */\n #viewControllerCardConfig: cards.ControllerCardOptions = {\n title: `${Helper.localize(`component.cover.entity_component._.name`)}`,\n // subtitle: Helper.getCountTemplate(CoverView.#domain, \"eq\", \"open\") + ` ${Helper.localize(`component.cover.entity_component._.state.open`)}`,\n };\n\n /**\n * Class constructor.\n *\n * @param {views.ViewConfig} [options={}] Options for the view.\n */\n constructor(options: views.ViewConfig = {}) {\n super(CoverView.#domain);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n\n // Create a Controller card to switch all entities of the domain.\n this.viewControllerCard = new ControllerCard(\n this.targetDomain(CoverView.#domain),\n {\n ...this.#viewControllerCardConfig,\n ...Helper.strategyOptions.domains.cover.controllerCardOptions,\n }, CoverView.#domain).createCard();\n }\n}\n\nexport { CoverView };\n","import { Helper } from \"../Helper\";\nimport { ControllerCard } from \"../cards/ControllerCard\";\nimport { AbstractView } from \"./AbstractView\";\nimport { views } from \"../types/strategy/views\";\nimport { cards } from \"../types/strategy/cards\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Fan View Class.\n *\n * Used to create a view for entities of the fan domain.\n *\n * @class FanView\n * @extends AbstractView\n */\nclass FanView extends AbstractView {\n /**\n * Domain of the view's entities.\n *\n * @type {string}\n * @static\n * @private\n */\n static #domain: string = \"fan\";\n\n /**\n * Default configuration of the view.\n *\n * @type {views.ViewConfig}\n * @private\n */\n #defaultConfig: views.ViewConfig = {\n title: \"Fans\",\n path: \"fans\",\n icon: \"mdi:fan\",\n subview: false,\n };\n\n /**\n * Default configuration of the view's Controller card.\n *\n * @type {cards.ControllerCardOptions}\n * @private\n */\n #viewControllerCardConfig: cards.ControllerCardOptions = {\n title: `${Helper.localize(`component.fan.entity_component._.name`)}s`,\n // subtitle: Helper.getCountTemplate(FanView.#domain, \"eq\", \"on\") + ` ${Helper.localize(`component.fan.entity_component._.state.on`)}s`,\n };\n\n /**\n * Class constructor.\n *\n * @param {views.ViewConfig} [options={}] Options for the view.\n */\n constructor(options: views.ViewConfig = {}) {\n super(FanView.#domain);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n\n // Create a Controller card to switch all entities of the domain.\n this.viewControllerCard = new ControllerCard(\n this.targetDomain(FanView.#domain),\n {\n ...this.#viewControllerCardConfig,\n ...Helper.strategyOptions.domains.fan.controllerCardOptions,\n }, FanView.#domain).createCard();\n }\n}\n\nexport { FanView };\n","import { Helper } from \"../Helper\";\nimport { views } from \"../types/strategy/views\";\nimport { ChipsCardConfig } from \"../types/lovelace-mushroom/cards/chips-card\";\nimport { LovelaceGridCardConfig, StackCardConfig } from \"../types/homeassistant/lovelace/cards/types\";\nimport { TemplateCardConfig } from \"../types/lovelace-mushroom/cards/template-card-config\";\nimport { LovelaceCardConfig, LovelaceViewConfig } from \"../types/homeassistant/data/lovelace\";\nimport { generic } from \"../types/strategy/generic\";\nimport StrategyFloor = generic.StrategyFloor;\nimport { SwipeCard } from \"../cards/SwipeCard\";\nimport { EntityCardConfig } from \"../types/lovelace-mushroom/cards/entity-card-config\";\nimport { ControllerCard } from \"../cards/ControllerCard\";\nimport { HassServiceTarget } from \"home-assistant-js-websocket\";\nimport { AREA_EXPOSED_CHIPS } from \"../variables\";\nimport { LovelaceChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { AreaStateChip } from \"../chips/AreaStateChip\";\nimport { createChipsFromList, getDomainTranslationKey } from \"../utils\";\n\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Floor View Class.\n *\n * Used to create a Floor view.\n *\n * @class FloorView\n */\nclass FloorView {\n /**\n * Default configuration of the view.\n *\n * @type {views.ViewConfig}\n * @private\n */\n config: views.ViewConfig = {\n icon: \"mdi:home-assistant\",\n type: \"sections\",\n path: \"home\",\n subview: true,\n };\n\n\n /**\n * Default configuration of the view.\n *\n * @type {StrategyFloor}\n * @private\n */\n floor: StrategyFloor;\n\n /**\n * View controller card.\n *\n * @type {LovelaceGridCardConfig[]}\n * @private\n */\n viewControllerCard: LovelaceGridCardConfig[] = [];\n\n /**\n * Class constructor.\n *\n * @param {views.ViewConfig} [options={}] Options for the view.\n */\n constructor(floor: StrategyFloor, options: views.ViewConfig = {}) {\n\n this.floor = floor;\n\n this.config = { ...this.config, ...options };\n }\n\n /**\n * Create the cards to include in the view.\n *\n * @return {Promise<(StackCardConfig | TemplateCardConfig | ChipsCardConfig)[]>} Promise a View Card array.\n * @override\n */\n async createSectionBadges(): Promise<(StackCardConfig | TemplateCardConfig | ChipsCardConfig)[]> {\n\n if (Helper.strategyOptions.home_view.hidden.includes(\"chips\")) {\n // Chips section is hidden.\n return [];\n }\n\n const chips: LovelaceChipConfig[] = [];\n\n const device = Helper.magicAreasDevices[this.floor.floor_id];\n\n if (device) {\n chips.push(new AreaStateChip(device, true).getChip());\n }\n\n const areaChips = await createChipsFromList(AREA_EXPOSED_CHIPS, { show_content: true }, this.floor.floor_id, this.floor.areas_slug);\n if (areaChips) {\n chips.push(...areaChips);\n }\n\n return chips.map(chip => ({\n type: \"custom:mushroom-chips-card\",\n alignment: \"center\",\n chips: [chip],\n }));\n }\n\n /**\n * Create the cards to include in the view.\n *\n * @return {Promise} Promise a View Card array.\n * @override\n */\n async createSectionCards(): Promise {\n const viewSections: LovelaceGridCardConfig[] = [];\n const exposedDomainIds = Helper.getExposedDomainIds();\n let isFirstLoop = true;\n\n let target: HassServiceTarget = { area_id: this.floor.areas_slug };\n\n for (const domain of exposedDomainIds) {\n if (domain === \"default\") continue;\n\n const domainCards: LovelaceCardConfig[] = [];\n\n try {\n const cardModule = await import(`../cards/${Helper.sanitizeClassName(domain + \"Card\")}`);\n const configEntityHidden = Helper.strategyOptions.domains[domain]?.hide_config_entities || Helper.strategyOptions.domains[\"_\"].hide_config_entities;\n\n for (const area of this.floor.areas_slug.map(area_slug => Helper.areas[area_slug])) {\n\n if (!area) continue\n\n\n const areaEntities = Helper.getAreaEntities(area, domain);\n\n if (areaEntities.length) {\n const entityCards: EntityCardConfig[] = areaEntities\n .filter(entity => {\n const cardOptions = Helper.strategyOptions.card_options?.[entity.entity_id];\n const deviceOptions = Helper.strategyOptions.card_options?.[entity.device_id ?? \"null\"];\n return !cardOptions?.hidden && !deviceOptions?.hidden && !(entity.entity_category === \"config\" && configEntityHidden);\n })\n .map(entity => {\n const cardOptions = Helper.strategyOptions.card_options?.[entity.entity_id];\n if (domain === \"sensor\" && Helper.getEntityState(entity.entity_id)?.attributes.unit_of_measurement) {\n return new cardModule[Helper.sanitizeClassName(domain + \"Card\")](entity, {\n type: \"custom:mini-graph-card\",\n entities: [entity.entity_id],\n ...cardOptions,\n }).getCard();\n }\n return new cardModule[Helper.sanitizeClassName(domain + \"Card\")](entity, cardOptions).getCard();\n });\n\n if (entityCards.length) {\n const titleCardOptions = {\n ...Helper.strategyOptions.domains[domain].controllerCardOptions,\n subtitle: area.name,\n domain,\n subtitleIcon: area.icon,\n subtitleNavigate: area.slug,\n };\n\n if (domain) {\n titleCardOptions.showControls = Helper.strategyOptions.domains[domain].showControls;\n titleCardOptions.extraControls = Helper.strategyOptions.domains[domain].extraControls;\n titleCardOptions.controlChipOptions = { area_slug: area.slug };\n }\n\n const titleCard = new ControllerCard(target, titleCardOptions, domain, area.slug).createCard();\n\n let areaCards;\n areaCards = entityCards.length > 2 ? [new SwipeCard(entityCards).getCard()] : entityCards;\n areaCards.unshift(...titleCard);\n\n domainCards.push(...areaCards);\n }\n }\n }\n\n if (domainCards.length) {\n const titleSectionOptions: any = {\n ...Helper.strategyOptions.domains[domain].controllerCardOptions,\n title: Helper.localize(getDomainTranslationKey(domain)),\n titleIcon: Helper.icons[domain as keyof typeof Helper.icons]._?.default ?? \"mdi:floor-plan\",\n titleNavigate: domain,\n };\n if (domain) {\n titleSectionOptions.showControls = Helper.strategyOptions.domains[domain].showControls;\n titleSectionOptions.extraControls = Helper.strategyOptions.domains[domain].extraControls;\n titleSectionOptions.controlChipOptions = { area_slug: this.floor.areas_slug };\n }\n\n const area_ids = this.floor.areas_slug.map(area_slug => Helper.areas[area_slug].area_id);\n const domainControllerCard = new ControllerCard(\n { area_id: area_ids },\n titleSectionOptions,\n domain,\n this.floor.floor_id\n ).createCard();\n\n const section = { type: \"grid\", cards: [] } as LovelaceGridCardConfig;\n if (isFirstLoop) {\n section.cards.push(...this.viewControllerCard);\n isFirstLoop = false;\n }\n\n section.cards.push(...domainControllerCard);\n section.cards.push(...domainCards);\n viewSections.push(section);\n }\n\n\n // // Handle default domain if not hidden\n // if (!Helper.strategyOptions.domains.default.hidden) {\n // const areaDevices = area.devices.filter(device_id => Helper.devices[device_id].area_id === floor.area_id);\n // const miscellaneousEntities = floor.entities.filter(entity_id => {\n // const entity = Helper.entities[entity_id];\n // const entityLinked = areaDevices.includes(entity.device_id ?? \"null\") || entity.area_id === floor.area_id;\n // const entityUnhidden = entity.hidden_by === null && entity.disabled_by === null;\n // const domainExposed = exposedDomainIds.includes(entity.entity_id.split(\".\", 1)[0]);\n\n // return entityUnhidden && !domainExposed && entityLinked;\n // });\n\n // if (miscellaneousEntities.length) {\n // try {\n // const cardModule = await import(\"../cards/MiscellaneousCard\");\n\n // const swipeCard = miscellaneousEntities\n // .filter(entity_id => {\n // const entity = Helper.entities[entity_id];\n // const cardOptions = Helper.strategyOptions.card_options?.[entity.entity_id];\n // const deviceOptions = Helper.strategyOptions.card_options?.[entity.device_id ?? \"null\"];\n // return !cardOptions?.hidden && !deviceOptions?.hidden && !(entity.entity_category === \"config\" && Helper.strategyOptions.domains[\"_\"].hide_config_entities);\n // })\n // .map(entity_id => new cardModule.MiscellaneousCard(Helper.entities[entity_id], Helper.strategyOptions.card_options?.[entity_id]).getCard());\n\n // viewSections.push({\n // type: \"grid\",\n // column_span: 1,\n // cards: [new SwipeCard(swipeCard).getCard()],\n // });\n // } catch (e) {\n // Helper.logError(\"An error occurred while creating the domain cards!\", e);\n // }\n // }\n // }\n } catch (e) {\n Helper.logError(\"An error occurred while creating the domain cards!\", e);\n }\n }\n\n return viewSections;\n }\n\n\n /**\n * Get a view object.\n *\n * The view includes the cards which are created by method createSectionCards().\n *\n * @returns {Promise} The view object.\n */\n async getView(): Promise {\n return {\n ...this.config,\n badges: await this.createSectionBadges(),\n sections: await this.createSectionCards(),\n };\n }\n\n}\n\nexport { FloorView };\n","import { Helper } from \"../Helper\";\nimport { AbstractView } from \"./AbstractView\";\nimport { views } from \"../types/strategy/views\";\nimport { LovelaceChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { ChipsCardConfig } from \"../types/lovelace-mushroom/cards/chips-card\";\nimport { LovelaceGridCardConfig, StackCardConfig } from \"../types/homeassistant/lovelace/cards/types\";\nimport { TemplateCardConfig } from \"../types/lovelace-mushroom/cards/template-card-config\";\nimport { ActionConfig, LovelaceSectionConfig, LovelaceViewConfig } from \"../types/homeassistant/data/lovelace\";\nimport { PersonCardConfig } from \"../types/lovelace-mushroom/cards/person-card-config\";\nimport { SettingsChip } from \"../chips/SettingsChip\";\nimport { SettingsPopup } from \"../popups/SettingsPopup\";\nimport { HOME_EXPOSED_CHIPS, UNAVAILABLE, UNDISCLOSED } from \"../variables\";\nimport { createChipsFromList, getFloorName, getMAEntity, navigateTo, slugify } from \"../utils\";\nimport { WeatherChip } from \"../chips/WeatherChip\";\nimport { AggregateChip } from \"../chips/AggregateChip\";\nimport { PersonCard } from \"../cards/PersonCard\";\nimport { ConditionalChip } from \"../chips/ConditionalChip\";\n\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Home View Class.\n *\n * Used to create a Home view.\n *\n * @class HomeView\n */\nclass HomeView {\n /**\n * Default configuration of the view.\n *\n * @type {views.ViewConfig}\n * @private\n */\n config: views.ViewConfig = {\n title: \"Home\",\n icon: \"mdi:home-assistant\",\n type: \"sections\",\n path: \"home\",\n subview: false,\n };\n\n /**\n * Class constructor.\n *\n * @throws {Error} If trying to instantiate this class.\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor() {\n if (!Helper.isInitialized()) {\n throw new Error(\"The Helper module must be initialized before using this one.\");\n }\n }\n\n /**\n * Create the cards to include in the view.\n *\n * @return {Promise<(StackCardConfig | TemplateCardConfig | ChipsCardConfig)[]>} Promise a View Card array.\n * @override\n */\n async createSectionBadges(): Promise<(StackCardConfig | TemplateCardConfig | ChipsCardConfig)[]> {\n\n if (Helper.strategyOptions.home_view.hidden.includes(\"chips\")) {\n // Chips section is hidden.\n\n return [];\n }\n\n const chips: LovelaceChipConfig[] = [];\n const chipOptions = Helper.strategyOptions.chips;\n\n let chipModule;\n\n // Weather chip.\n const weatherEntityId = Helper.linus_dashboard_config?.weather_entity_id;\n\n if (weatherEntityId) {\n try {\n const weatherChip = new WeatherChip(weatherEntityId);\n chips.push(weatherChip.getChip());\n } catch (e) {\n Helper.logError(\"An error occurred while creating the weather chip!\", e);\n }\n }\n\n // Alarm chip.\n const alarmEntityId = Helper.linus_dashboard_config?.alarm_entity_id\n\n if (alarmEntityId) {\n try {\n chipModule = await import(\"../chips/AlarmChip\");\n const alarmChip = new chipModule.AlarmChip(alarmEntityId);\n\n chips.push(alarmChip.getChip());\n } catch (e) {\n Helper.logError(\"An error occurred while creating the alarm chip!\", e);\n }\n }\n\n // Spotify chip.\n const spotifyEntityId = chipOptions?.spotify_entity ?? Helper.domains.media_player?.find(\n (entity) => entity.entity_id.startsWith(\"media_player.spotify_\") && entity.disabled_by === null && entity.hidden_by === null,\n )?.entity_id;\n\n if (spotifyEntityId) {\n try {\n chipModule = await import(\"../chips/SpotifyChip\");\n const spotifyChip = new chipModule.SpotifyChip(spotifyEntityId);\n\n chips.push(spotifyChip.getChip());\n } catch (e) {\n Helper.logError(\"An error occurred while creating the spotify chip!\", e);\n }\n }\n\n const homeChips = await createChipsFromList(HOME_EXPOSED_CHIPS, { show_content: true });\n if (homeChips) {\n chips.push(...homeChips);\n }\n\n const linusSettings = new SettingsChip({ tap_action: new SettingsPopup().getPopup() })\n\n chips.push(linusSettings.getChip());\n\n return chips.map(chip => ({\n type: \"custom:mushroom-chips-card\",\n alignment: \"center\",\n chips: [chip],\n }));\n }\n\n /**\n * Create the cards to include in the view.\n *\n * @return {Promise} Promise a View Card array.\n * @override\n */\n async createSectionCards(): Promise {\n return await Promise.all([\n this.#createPersonCards(),\n this.#createAreaSection(),\n ]).then(([personCards, areaSections]) => {\n const options = Helper.strategyOptions;\n const firstSection: LovelaceGridCardConfig = {\n type: \"grid\",\n column_span: 1,\n cards: []\n };\n\n if (personCards.length) {\n // TODO: Create the stack at this.#createPersonCards()\n firstSection.cards.push({\n type: \"horizontal-stack\",\n cards: personCards,\n } as StackCardConfig);\n }\n\n if (!Helper.strategyOptions.home_view.hidden.includes(\"greeting\")) {\n const tod = Helper.magicAreasDevices.global?.entities.time_of_the_day;\n\n firstSection.cards.push({\n type: \"custom:mushroom-template-card\",\n primary: `\n {% set tod = states(\"${tod?.entity_id}\") %}\n {% if (tod == \"evening\") %} Bonne soirée, {{user}} !\n {% elif (tod == \"daytime\") %} Bonne après-midi, {{user}} !\n {% elif (tod == \"night\") %} Bonne nuit, {{user}} !\n {% else %} Bonjour, {{user}} !\n {% endif %}`,\n icon: \"mdi:hand-wave\",\n icon_color: \"orange\",\n layout_options: {\n grid_columns: 4,\n grid_rows: 1,\n },\n tap_action: {\n action: \"none\",\n } as ActionConfig,\n double_tap_action: {\n action: \"none\",\n } as ActionConfig,\n hold_action: {\n action: \"none\",\n } as ActionConfig,\n } as TemplateCardConfig);\n }\n\n\n // Add quick access cards.\n if (options.quick_access_cards) {\n firstSection.cards.push(...options.quick_access_cards);\n }\n\n // Add custom cards.\n if (options.extra_cards) {\n firstSection.cards.push(...options.extra_cards);\n }\n\n return [firstSection, ...areaSections];\n });\n }\n\n /**\n * Create the person cards to include in the view.\n *\n * @return {Promise} A Person Card array.\n */\n async #createPersonCards(): Promise {\n if (Helper.strategyOptions.home_view.hidden.includes(\"persons\")) {\n // Person section is hidden.\n\n return [];\n }\n\n const cards: PersonCardConfig[] = [];\n const persons = Helper.domains.person.filter((entity) => {\n return entity.hidden_by == null\n && entity.disabled_by == null\n });\n\n for (const person of persons) {\n cards.push(new PersonCard(person).getCard());\n }\n\n\n return cards;\n }\n\n /**\n * Create the area cards to include in the view.\n *\n * Area cards are grouped into two areas per row.\n *\n * @return {Promise} Promise an Area Card Section.\n */\n async #createAreaSection(): Promise {\n if (Helper.strategyOptions.home_view.hidden.includes(\"areas\")) {\n // Areas section is hidden.\n\n return [];\n }\n\n const groupedSections: LovelaceGridCardConfig[] = [];\n let isFirstLoop = true;\n\n for (const floor of Helper.orderedFloors) {\n if (floor.areas_slug.length === 0) continue\n\n let floorSection = {\n type: \"grid\",\n column_span: 1,\n cards: [],\n } as LovelaceGridCardConfig;\n\n if (isFirstLoop && !Helper.strategyOptions.home_view.hidden.includes(\"areasTitle\")) {\n floorSection.cards.push({\n type: \"heading\",\n heading: `${Helper.localize(\"ui.components.area-picker.area\")}s`,\n heading_style: \"title\",\n });\n\n isFirstLoop = false;\n }\n\n const temperatureEntity = getMAEntity(floor.floor_id, \"sensor\", \"temperature\");\n\n\n floorSection.cards.push(\n {\n type: \"heading\",\n heading: getFloorName(floor),\n heading_style: \"subtitle\",\n icon: floor.icon ?? \"mdi:floor-plan\",\n badges: [{\n type: \"custom:mushroom-chips-card\",\n alignment: \"end\",\n chips: [\n new ConditionalChip(\n [{ entity: temperatureEntity?.entity_id!, state_not: UNAVAILABLE }],\n new AggregateChip({ device_class: \"temperature\", show_content: true, magic_device_id: floor.floor_id, area_slug: floor.areas_slug }).getChip()\n ).getChip(),\n ],\n card_mod: {\n style: `\n ha-card {\n min-width: 80px;\n }\n `,\n }\n }],\n tap_action: floor.floor_id !== UNDISCLOSED ? navigateTo(slugify(floor.name)) : undefined,\n }\n );\n\n for (const area of floor.areas_slug.map(area_slug => Helper.areas[area_slug]).values()) {\n\n type ModuleType = typeof import(\"../cards/HomeAreaCard\");\n\n let module: ModuleType;\n let moduleName =\n Helper.strategyOptions.areas[area.slug]?.type ??\n Helper.strategyOptions.areas[\"_\"]?.type ??\n \"default\";\n\n // Load module by type in strategy options.\n try {\n module = await import((`../cards/${moduleName}`));\n } catch (e) {\n // Fallback to the default strategy card.\n module = await import(\"../cards/HomeAreaCard\");\n\n if (Helper.strategyOptions.debug && moduleName !== \"default\") {\n console.error(e);\n }\n }\n\n // Get a card for the area.\n if (!Helper.strategyOptions.areas[area.slug as string]?.hidden) {\n let options = {\n ...Helper.strategyOptions.areas[\"_\"],\n ...Helper.strategyOptions.areas[area.slug],\n area_slug: area.slug,\n };\n\n floorSection.cards.push({\n ...new module.HomeAreaCard(options).getCard(),\n layout_options: {\n grid_columns: 2\n }\n });\n }\n }\n\n\n if (floor.floor_id === UNDISCLOSED) {\n floorSection.cards.push({\n type: \"custom:mushroom-template-card\",\n primary: Helper.localize(\"component.linus_dashboard.entity.button.add_new_area.state.on\"),\n secondary: Helper.localize(\"component.linus_dashboard.entity.button.add_new_area.state.off\"),\n multiline_secondary: true,\n icon: \"mdi:view-dashboard-variant\",\n fill_container: true,\n layout_options: {\n grid_columns: 4,\n grid_rows: 1,\n },\n tap_action: {\n action: \"navigate\",\n navigation_path: \"/config/areas/dashboard\",\n },\n } as any);\n }\n\n groupedSections.push(floorSection);\n }\n\n return groupedSections;\n }\n\n /**\n * Get a view object.\n *\n * The view includes the cards which are created by method createViewCards().\n *\n * @returns {Promise} The view object.\n */\n async getView(): Promise {\n return {\n ...this.config,\n badges: await this.createSectionBadges(),\n sections: await this.createSectionCards(),\n };\n }\n}\n\nexport { HomeView };\n","import { Helper } from \"../Helper\";\nimport { ControllerCard } from \"../cards/ControllerCard\";\nimport { AbstractView } from \"./AbstractView\";\nimport { views } from \"../types/strategy/views\";\nimport { cards } from \"../types/strategy/cards\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Light View Class.\n *\n * Used to create a view for entities of the light domain.\n *\n * @class LightView\n * @extends AbstractView\n */\nclass LightView extends AbstractView {\n /**\n * Domain of the view's entities.\n *\n * @type {string}\n * @static\n * @private\n */\n static #domain: string = \"light\";\n\n /**\n * Default configuration of the view.\n *\n * @type {views.ViewConfig}\n * @private\n */\n #defaultConfig: views.ViewConfig = {\n path: \"lights\",\n icon: \"mdi:lightbulb-group\",\n subview: false,\n };\n\n /**\n * Default configuration of the view's Controller card.\n *\n * @type {cards.ControllerCardOptions}\n * @private\n */\n #viewControllerCardConfig: cards.ControllerCardOptions = {\n title: `${Helper.localize(`component.light.entity_component._.name`)}s`,\n // subtitle: Helper.getCountTemplate(LightView.#domain, \"eq\", \"on\") + ` ${Helper.localize(\"component.light.entity_component._.state.on\")}`,\n };\n\n /**\n * Class constructor.\n *\n * @param {views.ViewConfig} [options={}] Options for the view.\n */\n constructor(options: views.ViewConfig = {}) {\n super(LightView.#domain);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n\n // Create a Controller card to switch all entities of the domain.\n this.viewControllerCard = new ControllerCard(\n this.targetDomain(LightView.#domain),\n {\n ...this.#viewControllerCardConfig,\n ...Helper.strategyOptions.domains.light.controllerCardOptions,\n }, LightView.#domain, \"global\").createCard();\n\n }\n}\n\nexport { LightView };\n","import { Helper } from \"../Helper\";\nimport { ControllerCard } from \"../cards/ControllerCard\";\nimport { AbstractView } from \"./AbstractView\";\nimport { views } from \"../types/strategy/views\";\nimport { cards } from \"../types/strategy/cards\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * MediaPlayer View Class.\n *\n * Used to create a view for entities of the media_player domain.\n *\n * @class MediaPlayerView\n * @extends AbstractView\n */\nclass MediaPlayerView extends AbstractView {\n /**\n * Domain of the view's entities.\n *\n * @type {string}\n * @static\n * @private\n */\n static #domain: string = \"media_player\";\n\n /**\n * Default configuration of the view.\n *\n * @type {views.ViewConfig}\n * @private\n */\n #defaultConfig: views.ViewConfig = {\n title: \"MediaPlayers\",\n path: \"media_players\",\n icon: \"mdi:cast\",\n subview: false,\n };\n\n /**\n * Default configuration of the view's Controller card.\n *\n * @type {cards.ControllerCardOptions}\n * @private\n */\n #viewControllerCardConfig: cards.ControllerCardOptions = {\n title: `${Helper.localize(`component.media_player.entity_component._.name`)}s`,\n // subtitle: Helper.getCountTemplate(MediaPlayerView.#domain, \"ne\", \"off\") + \" media players on\",\n };\n\n /**\n * Class constructor.\n *\n * @param {views.ViewConfig} [options={}] Options for the view.\n */\n constructor(options: views.ViewConfig = {}) {\n super(MediaPlayerView.#domain);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n\n // Create a Controller card to switch all entities of the domain.\n this.viewControllerCard = new ControllerCard(\n this.targetDomain(MediaPlayerView.#domain),\n {\n ...this.#viewControllerCardConfig,\n ...Helper.strategyOptions.domains.media_player.controllerCardOptions,\n }, MediaPlayerView.#domain).createCard();\n }\n}\n\nexport { MediaPlayerView };\n","import { Helper } from \"../Helper\";\nimport { ControllerCard } from \"../cards/ControllerCard\";\nimport { AbstractView } from \"./AbstractView\";\nimport { views } from \"../types/strategy/views\";\nimport { cards } from \"../types/strategy/cards\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Scene View Class.\n *\n * Used to create a view for entities of the scene domain.\n *\n * @class SceneView\n * @extends AbstractView\n */\nclass SceneView extends AbstractView {\n /**\n * Domain of the view's entities.\n *\n * @type {string}\n * @static\n * @private\n */\n static #domain: string = \"scene\";\n\n /**\n * Default configuration of the view.\n *\n * @type {views.ViewConfig}\n * @private\n */\n #defaultConfig: views.ViewConfig = {\n title: \"Scenes\",\n path: \"scenes\",\n icon: \"mdi:palette\",\n subview: false,\n };\n\n /**\n * Default configuration of the view's Controller card.\n *\n * @type {cards.ControllerCardOptions}\n * @private\n */\n #viewControllerCardConfig: cards.ControllerCardOptions = {\n title: `${Helper.localize(`ui.dialogs.quick-bar.commands.navigation.scene`)}`,\n // subtitle: Helper.getCountTemplate(SceneView.#domain, \"ne\", \"on\") + ` ${Helper.localize(`ui.dialogs.quick-bar.commands.navigation.scene`)}`,\n };\n\n /**\n * Class constructor.\n *\n * @param {views.ViewConfig} [options={}] Options for the view.\n */\n constructor(options: views.ViewConfig = {}) {\n super(SceneView.#domain);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n\n // Create a Controller card to scene all entities of the domain.\n this.viewControllerCard = new ControllerCard(\n this.targetDomain(SceneView.#domain),\n {\n ...this.#viewControllerCardConfig,\n ...Helper.strategyOptions.domains.scene.controllerCardOptions,\n }, SceneView.#domain).createCard();\n }\n}\n\nexport { SceneView };\n","import { Helper } from \"../Helper\";\nimport { StackCardConfig } from \"../types/homeassistant/lovelace/cards/types\";\nimport { LovelaceCardConfig, LovelaceViewConfig } from \"../types/homeassistant/data/lovelace\";\nimport { TitleCardConfig } from \"../types/lovelace-mushroom/cards/title-card-config\";\nimport { AggregateCard } from \"../cards/AggregateCard\";\n\n/**\n * Security View Class.\n *\n * To create a new view, extend the new class with this one.\n *\n * @class\n * @abstract\n */\nabstract class SecurityDetailsView {\n /**\n * Configuration of the view.\n *\n * @type {LovelaceViewConfig}\n */\n config: LovelaceViewConfig = {\n title: Helper.localize(\"component.binary_sensor.entity_component.safety.name\"),\n path: \"security-details\",\n icon: \"mdi:security\",\n subview: true,\n };\n\n /**\n * A card to switch all entities in the view.\n *\n * @type {StackCardConfig}\n */\n viewControllerCard: StackCardConfig = {\n cards: [],\n type: \"\",\n };\n\n /**\n * Class constructor.\n *\n * @throws {Error} If trying to instantiate this class.\n * @throws {Error} If the Helper module isn't initialized.\n */\n protected constructor() {\n if (!Helper.isInitialized()) {\n throw new Error(\"The Helper module must be initialized before using this one.\");\n }\n }\n\n /**\n * Create the cards to include in the view.\n *\n * @return {Promise<(StackCardConfig | TitleCardConfig)[]>} An array of card objects.\n */\n async createViewCards(): Promise<(StackCardConfig | TitleCardConfig)[]> {\n const viewCards: LovelaceCardConfig[] = [];\n\n const globalDevice = Helper.magicAreasDevices[\"global\"];\n\n if (!globalDevice) {\n console.debug(\"Security view : Global device not found\");\n return [];\n }\n\n const {\n aggregate_motion,\n aggregate_door,\n aggregate_window,\n } = globalDevice?.entities;\n\n\n if (aggregate_motion?.entity_id) {\n viewCards.push(new AggregateCard('binary_sensor', { device_class: 'motion', title: Helper.localize(\"component.binary_sensor.entity_component.motion.name\") }).createCard())\n // viewCards.push(new AggregateCard({ entity_id: aggregate_motion.entity_id }, { title: `${Helper.localize(\"component.binary_sensor.entity_component.motion.name\")}s` }).createCard())\n }\n\n if (aggregate_door?.entity_id || aggregate_window?.entity_id) {\n viewCards.push(new AggregateCard('binary_sensor', { device_class: ['door', 'window'], title: Helper.localize(\"component.binary_sensor.entity_component.opening.name\") }).createCard())\n // viewCards.push(new AggregateCard({ entity_id: [aggregate_door?.entity_id, aggregate_window?.entity_id] }, { title: `${Helper.localize(\"component.binary_sensor.entity_component.opening.name\")}s` }).createCard())\n }\n\n return viewCards;\n }\n\n /**\n * Get a view object.\n *\n * The view includes the cards which are created by method createViewCards().\n *\n * @returns {Promise} The view object.\n */\n async getView(): Promise {\n return {\n ...this.config,\n cards: await this.createViewCards(),\n };\n }\n}\n\nexport { SecurityDetailsView };\n","import { Helper } from \"../Helper\";\nimport { LovelaceGridCardConfig, StackCardConfig } from \"../types/homeassistant/lovelace/cards/types\";\nimport { LovelaceCardConfig, LovelaceSectionConfig, LovelaceViewConfig } from \"../types/homeassistant/data/lovelace\";\nimport { AlarmCard } from \"../cards/AlarmCard\";\nimport { PersonCard } from \"../cards/PersonCard\";\nimport { BinarySensorCard } from \"../cards/BinarySensorCard\";\nimport { getAreaName, getFloorName, navigateTo } from \"../utils\";\nimport { HassServiceTarget } from \"home-assistant-js-websocket\";\nimport { SwipeCard } from \"../cards/SwipeCard\";\nimport { ControllerCard } from \"../cards/ControllerCard\";\nimport { views } from \"../types/strategy/views\";\n\n/**\n * Security View Class.\n *\n * To create a new view, extend the new class with this one.\n *\n * @class\n * @abstract\n */\nclass SecurityView {\n /**\n * Default configuration of the view.\n *\n * @type {views.ViewConfig}\n * @private\n */\n config: views.ViewConfig = {\n path: \"security\",\n title: Helper.localize(\"component.binary_sensor.entity_component.safety.name\"),\n icon: \"mdi:security\",\n type: \"sections\",\n };\n\n /**\n * A card to switch all entities in the view.\n *\n * @type {LovelaceCardConfig[]}\n */\n viewControllerCard: LovelaceCardConfig[] = []\n\n /**\n * Class constructor.\n *\n * @throws {Error} If trying to instantiate this class.\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor() {\n if (!Helper.isInitialized()) {\n throw new Error(\"The Helper module must be initialized before using this one.\");\n }\n }\n\n /**\n * Create the cards to include in the view.\n *\n * @return {Promise} Promise a View Card array.\n */\n async createSectionCards(): Promise {\n const globalSection: LovelaceGridCardConfig = {\n type: \"grid\",\n column_span: 1,\n cards: []\n };\n\n const alarmEntityId = Helper.linus_dashboard_config?.alarm_entity_id\n if (alarmEntityId) {\n globalSection.cards.push(\n {\n type: \"heading\",\n heading: \"Sécurité\",\n heading_style: \"title\",\n }\n )\n globalSection.cards.push(\n {\n type: \"heading\",\n heading: \"Alarme\",\n heading_style: \"subtitle\",\n })\n globalSection.cards.push(new AlarmCard(Helper.entities[alarmEntityId]).getCard())\n }\n\n const persons = Helper.domains.person\n if (persons?.length) {\n globalSection.cards.push(\n {\n type: \"heading\",\n heading: \"Personnes\",\n heading_style: \"subtitle\",\n })\n\n for (const person of persons) {\n globalSection.cards.push(new PersonCard(person, {\n layout: \"horizontal\",\n primary_info: \"name\",\n secondary_info: \"state\"\n }).getCard())\n }\n }\n\n const globalDevice = Helper.magicAreasDevices[\"global\"];\n\n if (!globalDevice) {\n console.debug(\"Security view : Global device not found\");\n return [];\n }\n\n const {\n aggregate_motion,\n aggregate_door,\n aggregate_window,\n } = globalDevice?.entities;\n\n if (aggregate_motion || aggregate_door || aggregate_window) {\n globalSection.cards.push(\n {\n type: \"heading\",\n heading: \"Capteurs\",\n heading_style: \"subtitle\",\n })\n if (aggregate_motion?.entity_id) globalSection.cards.push(new BinarySensorCard(aggregate_motion, { tap_action: navigateTo('security-details') }).getCard());\n if (aggregate_door?.entity_id) globalSection.cards.push(new BinarySensorCard(aggregate_door, { tap_action: navigateTo('security-details') }).getCard());\n if (aggregate_window?.entity_id) globalSection.cards.push(new BinarySensorCard(aggregate_window, { tap_action: navigateTo('security-details') }).getCard());\n }\n\n const sections = [globalSection]\n if (Helper.domains.camera?.length) sections.push(await this.createCamerasSection())\n\n return sections;\n }\n\n /**\n * Create the cards to include in the view.\n *\n * @return {Promise} An array of card objects.\n */\n async createCamerasSection(): Promise {\n const domain = \"camera\";\n const camerasSection: LovelaceGridCardConfig = {\n type: \"grid\",\n column_span: 1,\n cards: [\n {\n type: \"heading\",\n heading: `${Helper.localize(`component.camera.entity_component._.name`)}s`,\n heading_style: \"title\",\n badges: [],\n layout_options: {\n grid_columns: \"full\",\n grid_rows: 1\n },\n icon: Helper.icons[domain]._?.default,\n }]\n };\n\n const orderedFloors = Object.values(Helper.floors).sort((a, b) => {\n // Check if 'level' is undefined in either object\n if (a.level === undefined) return 1; // a should come after b\n if (b.level === undefined) return -1; // b should come after a\n\n // Both 'level' values are defined, compare them\n return a.level - b.level;\n });\n\n for (const floor of orderedFloors) {\n\n if (floor.areas_slug.length === 0) continue\n\n let floorCards: LovelaceCardConfig[] = [\n {\n type: \"heading\",\n heading: getFloorName(floor),\n heading_style: \"title\",\n badges: [],\n layout_options: {\n grid_columns: \"full\",\n grid_rows: 1\n },\n icon: floor.icon ?? \"mdi:floor-plan\",\n }\n ]\n\n // Create cards for each area.\n for (const [i, area] of floor.areas_slug.map(area_slug => Helper.areas[area_slug]).entries()) {\n const entities = Helper.getAreaEntities(area, domain);\n const className = Helper.sanitizeClassName(domain + \"Card\");\n\n const cardModule = await import(`../cards/${className}`);\n\n if (entities.length === 0 || !cardModule) {\n continue;\n }\n\n // Set the target for controller cards to the current area.\n let target: HassServiceTarget = {\n area_id: [area.slug],\n };\n\n let areaCards: LovelaceCardConfig[] = [];\n\n const entityCards = []\n\n // Create a card for each domain-entity of the current area.\n for (const entity of entities) {\n let cardOptions = Helper.strategyOptions.card_options?.[entity.entity_id];\n let deviceOptions = Helper.strategyOptions.card_options?.[entity.device_id ?? \"null\"];\n\n if (cardOptions?.hidden || deviceOptions?.hidden) {\n continue;\n }\n\n const configEntityHidden =\n Helper.strategyOptions.domains[domain ?? \"_\"].hide_config_entities\n || Helper.strategyOptions.domains[\"_\"].hide_config_entities;\n if (entity.entity_category === \"config\" && configEntityHidden) {\n continue;\n }\n entityCards.push(new cardModule[className](entity, cardOptions).getCard());\n }\n\n if (entityCards.length) {\n if (entityCards.length > 2) {\n areaCards.push(new SwipeCard(entityCards).getCard());\n } else {\n areaCards.push(...entityCards);\n }\n }\n\n // Vertical stack the area cards if it has entities.\n if (areaCards.length) {\n const titleCardOptions: any = {};\n titleCardOptions.subtitle = getAreaName(area)\n titleCardOptions.subtitleIcon = area.icon ?? \"mdi:floor-plan\";\n titleCardOptions.navigate = area.slug;\n if (domain) {\n titleCardOptions.showControls = Helper.strategyOptions.domains[domain].showControls;\n titleCardOptions.extraControls = Helper.strategyOptions.domains[domain].extraControls;\n }\n\n // Create and insert a Controller card.\n areaCards.unshift(...new ControllerCard(target, titleCardOptions, domain).createCard())\n\n floorCards.push(...areaCards);\n }\n }\n\n if (floorCards.length > 1) camerasSection.cards.push(...floorCards)\n }\n\n return camerasSection;\n }\n\n /**\n * Get a view object.\n *\n * The view includes the cards which are created by method createViewCards().\n *\n * @returns {Promise} The view object.\n */\n async getView(): Promise {\n return {\n ...this.config,\n sections: await this.createSectionCards(),\n };\n }\n}\n\nexport { SecurityView };\n","import { Helper } from \"../Helper\";\nimport { ControllerCard } from \"../cards/ControllerCard\";\nimport { AbstractView } from \"./AbstractView\";\nimport { views } from \"../types/strategy/views\";\nimport { cards } from \"../types/strategy/cards\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Sensor View Class.\n *\n * Used to create a view for entities of the scene domain.\n *\n * @class SensorView\n * @extends AbstractView\n */\nclass SensorView extends AbstractView {\n /**\n * Domain of the view's entities.\n *\n * @type {string}\n * @static\n * @private\n */\n static #domain: string = \"sensor\";\n\n /**\n * Default configuration of the view.\n *\n * @type {views.ViewConfig}\n * @private\n */\n #defaultConfig: views.ViewConfig = {\n title: \"Sensors\",\n path: \"scenes\",\n icon: \"mdi:palette\",\n subview: false,\n };\n\n /**\n * Default configuration of the view's Controller card.\n *\n * @type {cards.ControllerCardOptions}\n * @private\n */\n #viewControllerCardConfig: cards.ControllerCardOptions = {\n title: `${Helper.localize(`component.sensor.entity_component._.name`)}s`,\n // subtitle: Helper.getCountTemplate(SensorView.#domain, \"ne\", \"on\") + ` ${Helper.localize(`ui.dialogs.quick-bar.commands.navigation.scene`)}`,\n };\n\n /**\n * Class constructor.\n *\n * @param {views.ViewConfig} [options={}] Options for the view.\n */\n constructor(options: views.ViewConfig = {}) {\n super(SensorView.#domain);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n\n // Create a Controller card to scene all entities of the domain.\n this.viewControllerCard = new ControllerCard(\n this.targetDomain(SensorView.#domain),\n {\n ...this.#viewControllerCardConfig,\n ...Helper.strategyOptions.domains.scene.controllerCardOptions,\n }, SensorView.#domain).createCard();\n }\n}\n\nexport { SensorView };\n","import { Helper } from \"../Helper\";\nimport { ControllerCard } from \"../cards/ControllerCard\";\nimport { AbstractView } from \"./AbstractView\";\nimport { views } from \"../types/strategy/views\";\nimport { cards } from \"../types/strategy/cards\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Switch View Class.\n *\n * Used to create a view for entities of the switch domain.\n *\n * @class SwitchView\n * @extends AbstractView\n */\nclass SwitchView extends AbstractView {\n /**\n * Domain of the view's entities.\n *\n * @type {string}\n * @static\n * @private\n */\n static #domain: string = \"switch\";\n\n /**\n * Default configuration of the view.\n *\n * @type {views.ViewConfig}\n * @private\n */\n #defaultConfig: views.ViewConfig = {\n title: \"Switches\",\n path: \"switches\",\n icon: \"mdi:dip-switch\",\n subview: false,\n };\n\n /**\n * Default configuration of the view's Controller card.\n *\n * @type {cards.ControllerCardOptions}\n * @private\n */\n #viewControllerCardConfig: cards.ControllerCardOptions = {\n title: `${Helper.localize(`component.switch.entity_component._.name`)}s`,\n // subtitle: Helper.getCountTemplate(SwitchView.#domain, \"eq\", \"on\") + \" switches on\",\n };\n\n /**\n * Class constructor.\n *\n * @param {views.ViewConfig} [options={}] Options for the view.\n */\n constructor(options: views.ViewConfig = {}) {\n super(SwitchView.#domain);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n\n // Create a Controller card to switch all entities of the domain.\n this.viewControllerCard = new ControllerCard(\n this.targetDomain(SwitchView.#domain),\n {\n ...this.#viewControllerCardConfig,\n ...Helper.strategyOptions.domains.switch.controllerCardOptions,\n }, SwitchView.#domain).createCard();\n }\n}\n\nexport { SwitchView };\n","import { AREA_CARDS_DOMAINS, UNAVAILABLE, UNDISCLOSED } from '../variables';\nimport { Helper } from \"../Helper\";\nimport { ControllerCard } from \"../cards/ControllerCard\";\nimport { LovelaceGridCardConfig, StackCardConfig } from \"../types/homeassistant/lovelace/cards/types\";\nimport { LovelaceCardConfig, LovelaceSectionConfig, LovelaceViewConfig } from \"../types/homeassistant/data/lovelace\";\nimport { HassServiceTarget } from \"home-assistant-js-websocket\";\nimport { TemplateCardConfig } from '../types/lovelace-mushroom/cards/template-card-config';\nimport { ChipsCardConfig } from '../types/lovelace-mushroom/cards/chips-card';\nimport { SwipeCard } from '../cards/SwipeCard';\nimport { getAreaName, getFloorName, slugify } from '../utils';\nimport { views } from '../types/strategy/views';\n\n/**\n * Abstract View Class.\n *\n * To create a new view, extend the new class with this one.\n *\n * @class\n * @abstract\n */\nclass UnavailableView {\n /**\n * Configuration of the view.\n *\n * @type {views.ViewConfig}\n */\n config: views.ViewConfig = {\n path: \"unavailable\",\n title: Helper.localize(\"state.default.unavailable\"),\n icon: \"mdi:view-dashboard\",\n type: \"sections\",\n subview: true,\n };\n\n /**\n * A card to switch all entities in the view.\n *\n * @type {LovelaceCardConfig[]}\n */\n viewControllerCard: LovelaceCardConfig[] = []\n\n /**\n * Class constructor.\n *\n * @throws {Error} If trying to instantiate this class.\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor() {\n if (!Helper.isInitialized()) {\n throw new Error(\"The Helper module must be initialized before using this one.\");\n }\n }\n\n /**\n * Create the cards to include in the view.\n *\n * @return {Promise} Promise a View Card array.\n * @override\n */\n async createSectionCards(): Promise {\n const viewSections: LovelaceGridCardConfig[] = [];\n\n for (const floor of Helper.orderedFloors) {\n if (floor.areas_slug.length === 0) continue;\n\n const floorCards = [];\n\n for (const area of floor.areas_slug.map(area_slug => Helper.areas[area_slug]).values()) {\n const entities = Helper.areas[area.slug].entities;\n const unavailableEntities = entities?.filter(entity_id => AREA_CARDS_DOMAINS.includes(Helper.getEntityDomain(entity_id)) && Helper.getEntityState(entity_id)?.state === UNAVAILABLE).map(entity_id => Helper.entities[entity_id]);\n const cardModule = await import(`../cards/MiscellaneousCard`);\n\n if (entities.length === 0 || !cardModule) continue;\n\n let target: HassServiceTarget = { area_id: [area.slug] };\n if (area.area_id === UNDISCLOSED) {\n target = { entity_id: unavailableEntities.map(entity => entity.entity_id) };\n }\n\n const entityCards = unavailableEntities\n .filter(entity => !Helper.strategyOptions.card_options?.[entity.entity_id]?.hidden\n && !Helper.strategyOptions.card_options?.[entity.device_id ?? \"null\"]?.hidden\n && !(entity.entity_category === \"config\"))\n .map(entity => new cardModule.MiscellaneousCard(entity).getCard());\n\n if (entityCards.length) {\n const areaCards = entityCards.length > 2 ? [new SwipeCard(entityCards).getCard()] : entityCards;\n floorCards.push(...areaCards);\n }\n }\n\n if (floorCards.length) {\n const titleSectionOptions: any = {\n title: getFloorName(floor),\n titleIcon: floor.icon ?? \"mdi:floor-plan\",\n titleNavigate: slugify(floor.name)\n };\n viewSections.push({ type: \"grid\", cards: floorCards });\n }\n }\n\n if (viewSections.length) {\n viewSections.unshift({ type: \"grid\", cards: this.viewControllerCard });\n }\n\n return viewSections;\n }\n\n /**\n * Get a view object.\n *\n * The view includes the cards which are created by method createViewCards().\n *\n * @returns {Promise} The view object.\n */\n async getView(): Promise {\n return {\n ...this.config,\n sections: await this.createSectionCards(),\n };\n }\n\n /**\n * Get a target of entity IDs for the given domain.\n *\n * @param {string} domain - The target domain to retrieve entity IDs from.\n * @return {HassServiceTarget} - A target for a service call.\n */\n targetDomain(domain: string): HassServiceTarget {\n return {\n entity_id: Helper.domains[domain]?.filter(\n entity =>\n !entity.hidden_by\n && !Helper.strategyOptions.card_options?.[entity.entity_id]?.hidden\n ).map(entity => entity.entity_id),\n };\n }\n}\n\nexport { UnavailableView };\n","import { Helper } from \"../Helper\";\nimport { ControllerCard } from \"../cards/ControllerCard\";\nimport { AbstractView } from \"./AbstractView\";\nimport { views } from \"../types/strategy/views\";\nimport { cards } from \"../types/strategy/cards\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Vacuum View Class.\n *\n * Used to create a view for entities of the vacuum domain.\n *\n * @class VacuumView\n * @extends AbstractView\n */\nclass VacuumView extends AbstractView {\n /**\n * Domain of the view's entities.\n *\n * @type {string}\n * @static\n * @private\n */\n static #domain: string = \"vacuum\";\n\n /**\n * Default configuration of the view.\n *\n * @type {views.ViewConfig}\n * @private\n */\n #defaultConfig: views.ViewConfig = {\n title: \"Vacuums\",\n path: \"vacuums\",\n icon: \"mdi:robot-vacuum\",\n subview: false,\n };\n\n /**\n * Default configuration of the view's Controller card.\n *\n * @type {cards.ControllerCardOptions}\n * @private\n */\n #viewControllerCardConfig: cards.ControllerCardOptions = {\n title: `${Helper.localize(`component.vacuum.entity_component._.name`)}s`,\n // subtitle: Helper.getCountTemplate(VacuumView.#domain, \"ne\", \"off\") + ` ${Helper.localize(`component.vacuum.entity_component._.state.on`)}`,\n };\n\n /**\n * Class constructor.\n *\n * @param {views.ViewConfig} [options={}] Options for the view.\n */\n constructor(options: views.ViewConfig = {}) {\n super(VacuumView.#domain);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n\n // Create a Controller card to switch all entities of the domain.\n this.viewControllerCard = new ControllerCard(\n this.targetDomain(VacuumView.#domain),\n {\n ...this.#viewControllerCardConfig,\n ...Helper.strategyOptions.domains.vacuum.controllerCardOptions,\n }, VacuumView.#domain).createCard();\n }\n}\n\nexport { VacuumView };\n","var map = {\n\t\"./AbstractCard\": [\n\t\t\"./src/cards/AbstractCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./AbstractCard.ts\": [\n\t\t\"./src/cards/AbstractCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./AggregateCard\": [\n\t\t\"./src/cards/AggregateCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./AggregateCard.ts\": [\n\t\t\"./src/cards/AggregateCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./AlarmCard\": [\n\t\t\"./src/cards/AlarmCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./AlarmCard.ts\": [\n\t\t\"./src/cards/AlarmCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./BinarySensorCard\": [\n\t\t\"./src/cards/BinarySensorCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./BinarySensorCard.ts\": [\n\t\t\"./src/cards/BinarySensorCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./CameraCard\": [\n\t\t\"./src/cards/CameraCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./CameraCard.ts\": [\n\t\t\"./src/cards/CameraCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./ClimateCard\": [\n\t\t\"./src/cards/ClimateCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./ClimateCard.ts\": [\n\t\t\"./src/cards/ClimateCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./ControllerCard\": [\n\t\t\"./src/cards/ControllerCard.ts\"\n\t],\n\t\"./ControllerCard.ts\": [\n\t\t\"./src/cards/ControllerCard.ts\"\n\t],\n\t\"./CoverCard\": [\n\t\t\"./src/cards/CoverCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./CoverCard.ts\": [\n\t\t\"./src/cards/CoverCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./FanCard\": [\n\t\t\"./src/cards/FanCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./FanCard.ts\": [\n\t\t\"./src/cards/FanCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./HomeAreaCard\": [\n\t\t\"./src/cards/HomeAreaCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./HomeAreaCard.ts\": [\n\t\t\"./src/cards/HomeAreaCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./ImageAreaCard\": [\n\t\t\"./src/cards/ImageAreaCard.ts\"\n\t],\n\t\"./ImageAreaCard.ts\": [\n\t\t\"./src/cards/ImageAreaCard.ts\"\n\t],\n\t\"./LightCard\": [\n\t\t\"./src/cards/LightCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./LightCard.ts\": [\n\t\t\"./src/cards/LightCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./LockCard\": [\n\t\t\"./src/cards/LockCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./LockCard.ts\": [\n\t\t\"./src/cards/LockCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./MediaPlayerCard\": [\n\t\t\"./src/cards/MediaPlayerCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./MediaPlayerCard.ts\": [\n\t\t\"./src/cards/MediaPlayerCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./MiscellaneousCard\": [\n\t\t\"./src/cards/MiscellaneousCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./MiscellaneousCard.ts\": [\n\t\t\"./src/cards/MiscellaneousCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./NumberCard\": [\n\t\t\"./src/cards/NumberCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./NumberCard.ts\": [\n\t\t\"./src/cards/NumberCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./PersonCard\": [\n\t\t\"./src/cards/PersonCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./PersonCard.ts\": [\n\t\t\"./src/cards/PersonCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./SceneCard\": [\n\t\t\"./src/cards/SceneCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./SceneCard.ts\": [\n\t\t\"./src/cards/SceneCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./SensorCard\": [\n\t\t\"./src/cards/SensorCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./SensorCard.ts\": [\n\t\t\"./src/cards/SensorCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./SwipeCard\": [\n\t\t\"./src/cards/SwipeCard.ts\"\n\t],\n\t\"./SwipeCard.ts\": [\n\t\t\"./src/cards/SwipeCard.ts\"\n\t],\n\t\"./SwitchCard\": [\n\t\t\"./src/cards/SwitchCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./SwitchCard.ts\": [\n\t\t\"./src/cards/SwitchCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./VacuumCard\": [\n\t\t\"./src/cards/VacuumCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./VacuumCard.ts\": [\n\t\t\"./src/cards/VacuumCard.ts\",\n\t\t\"main\"\n\t]\n};\nfunction webpackAsyncContext(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\treturn Promise.resolve().then(() => {\n\t\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\t\te.code = 'MODULE_NOT_FOUND';\n\t\t\tthrow e;\n\t\t});\n\t}\n\n\tvar ids = map[req], id = ids[0];\n\treturn Promise.all(ids.slice(1).map(__webpack_require__.e)).then(() => {\n\t\treturn __webpack_require__(id);\n\t});\n}\nwebpackAsyncContext.keys = () => (Object.keys(map));\nwebpackAsyncContext.id = \"./src/cards lazy recursive ^\\\\.\\\\/.*$\";\nmodule.exports = webpackAsyncContext;","var map = {\n\t\"./AbstractChip\": [\n\t\t\"./src/chips/AbstractChip.ts\"\n\t],\n\t\"./AbstractChip.ts\": [\n\t\t\"./src/chips/AbstractChip.ts\"\n\t],\n\t\"./AggregateChip\": [\n\t\t\"./src/chips/AggregateChip.ts\"\n\t],\n\t\"./AggregateChip.ts\": [\n\t\t\"./src/chips/AggregateChip.ts\"\n\t],\n\t\"./AlarmChip\": [\n\t\t\"./src/chips/AlarmChip.ts\",\n\t\t\"main\"\n\t],\n\t\"./AlarmChip.ts\": [\n\t\t\"./src/chips/AlarmChip.ts\",\n\t\t\"main\"\n\t],\n\t\"./AreaScenesChips\": [\n\t\t\"./src/chips/AreaScenesChips.ts\",\n\t\t\"main\"\n\t],\n\t\"./AreaScenesChips.ts\": [\n\t\t\"./src/chips/AreaScenesChips.ts\",\n\t\t\"main\"\n\t],\n\t\"./AreaStateChip\": [\n\t\t\"./src/chips/AreaStateChip.ts\"\n\t],\n\t\"./AreaStateChip.ts\": [\n\t\t\"./src/chips/AreaStateChip.ts\"\n\t],\n\t\"./ClimateChip\": [\n\t\t\"./src/chips/ClimateChip.ts\"\n\t],\n\t\"./ClimateChip.ts\": [\n\t\t\"./src/chips/ClimateChip.ts\"\n\t],\n\t\"./ConditionalChip\": [\n\t\t\"./src/chips/ConditionalChip.ts\",\n\t\t\"main\"\n\t],\n\t\"./ConditionalChip.ts\": [\n\t\t\"./src/chips/ConditionalChip.ts\",\n\t\t\"main\"\n\t],\n\t\"./ControlChip\": [\n\t\t\"./src/chips/ControlChip.ts\"\n\t],\n\t\"./ControlChip.ts\": [\n\t\t\"./src/chips/ControlChip.ts\"\n\t],\n\t\"./CoverChip\": [\n\t\t\"./src/chips/CoverChip.ts\"\n\t],\n\t\"./CoverChip.ts\": [\n\t\t\"./src/chips/CoverChip.ts\"\n\t],\n\t\"./FanChip\": [\n\t\t\"./src/chips/FanChip.ts\"\n\t],\n\t\"./FanChip.ts\": [\n\t\t\"./src/chips/FanChip.ts\"\n\t],\n\t\"./LightChip\": [\n\t\t\"./src/chips/LightChip.ts\"\n\t],\n\t\"./LightChip.ts\": [\n\t\t\"./src/chips/LightChip.ts\"\n\t],\n\t\"./MediaPlayerChip\": [\n\t\t\"./src/chips/MediaPlayerChip.ts\"\n\t],\n\t\"./MediaPlayerChip.ts\": [\n\t\t\"./src/chips/MediaPlayerChip.ts\"\n\t],\n\t\"./SafetyChip\": [\n\t\t\"./src/chips/SafetyChip.ts\",\n\t\t\"main\"\n\t],\n\t\"./SafetyChip.ts\": [\n\t\t\"./src/chips/SafetyChip.ts\",\n\t\t\"main\"\n\t],\n\t\"./SettingsChip\": [\n\t\t\"./src/chips/SettingsChip.ts\"\n\t],\n\t\"./SettingsChip.ts\": [\n\t\t\"./src/chips/SettingsChip.ts\"\n\t],\n\t\"./SpotifyChip\": [\n\t\t\"./src/chips/SpotifyChip.ts\",\n\t\t\"main\"\n\t],\n\t\"./SpotifyChip.ts\": [\n\t\t\"./src/chips/SpotifyChip.ts\",\n\t\t\"main\"\n\t],\n\t\"./SwitchChip\": [\n\t\t\"./src/chips/SwitchChip.ts\"\n\t],\n\t\"./SwitchChip.ts\": [\n\t\t\"./src/chips/SwitchChip.ts\"\n\t],\n\t\"./ToggleSceneChip\": [\n\t\t\"./src/chips/ToggleSceneChip.ts\"\n\t],\n\t\"./ToggleSceneChip.ts\": [\n\t\t\"./src/chips/ToggleSceneChip.ts\"\n\t],\n\t\"./UnavailableChip\": [\n\t\t\"./src/chips/UnavailableChip.ts\"\n\t],\n\t\"./UnavailableChip.ts\": [\n\t\t\"./src/chips/UnavailableChip.ts\"\n\t],\n\t\"./WeatherChip\": [\n\t\t\"./src/chips/WeatherChip.ts\",\n\t\t\"main\"\n\t],\n\t\"./WeatherChip.ts\": [\n\t\t\"./src/chips/WeatherChip.ts\",\n\t\t\"main\"\n\t]\n};\nfunction webpackAsyncContext(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\treturn Promise.resolve().then(() => {\n\t\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\t\te.code = 'MODULE_NOT_FOUND';\n\t\t\tthrow e;\n\t\t});\n\t}\n\n\tvar ids = map[req], id = ids[0];\n\treturn Promise.all(ids.slice(1).map(__webpack_require__.e)).then(() => {\n\t\treturn __webpack_require__(id);\n\t});\n}\nwebpackAsyncContext.keys = () => (Object.keys(map));\nwebpackAsyncContext.id = \"./src/chips lazy recursive ^\\\\.\\\\/.*$\";\nmodule.exports = webpackAsyncContext;","var map = {\n\t\"./AbstractView\": [\n\t\t\"./src/views/AbstractView.ts\",\n\t\t\"main\"\n\t],\n\t\"./AbstractView.ts\": [\n\t\t\"./src/views/AbstractView.ts\",\n\t\t\"main\"\n\t],\n\t\"./AggregateView\": [\n\t\t\"./src/views/AggregateView.ts\",\n\t\t\"main\"\n\t],\n\t\"./AggregateView.ts\": [\n\t\t\"./src/views/AggregateView.ts\",\n\t\t\"main\"\n\t],\n\t\"./AreaView\": [\n\t\t\"./src/views/AreaView.ts\"\n\t],\n\t\"./AreaView.ts\": [\n\t\t\"./src/views/AreaView.ts\"\n\t],\n\t\"./CameraView\": [\n\t\t\"./src/views/CameraView.ts\",\n\t\t\"main\"\n\t],\n\t\"./CameraView.ts\": [\n\t\t\"./src/views/CameraView.ts\",\n\t\t\"main\"\n\t],\n\t\"./ClimateView\": [\n\t\t\"./src/views/ClimateView.ts\",\n\t\t\"main\"\n\t],\n\t\"./ClimateView.ts\": [\n\t\t\"./src/views/ClimateView.ts\",\n\t\t\"main\"\n\t],\n\t\"./CoverView\": [\n\t\t\"./src/views/CoverView.ts\",\n\t\t\"main\"\n\t],\n\t\"./CoverView.ts\": [\n\t\t\"./src/views/CoverView.ts\",\n\t\t\"main\"\n\t],\n\t\"./FanView\": [\n\t\t\"./src/views/FanView.ts\",\n\t\t\"main\"\n\t],\n\t\"./FanView.ts\": [\n\t\t\"./src/views/FanView.ts\",\n\t\t\"main\"\n\t],\n\t\"./FloorView\": [\n\t\t\"./src/views/FloorView.ts\"\n\t],\n\t\"./FloorView.ts\": [\n\t\t\"./src/views/FloorView.ts\"\n\t],\n\t\"./HomeView\": [\n\t\t\"./src/views/HomeView.ts\",\n\t\t\"main\"\n\t],\n\t\"./HomeView.ts\": [\n\t\t\"./src/views/HomeView.ts\",\n\t\t\"main\"\n\t],\n\t\"./LightView\": [\n\t\t\"./src/views/LightView.ts\",\n\t\t\"main\"\n\t],\n\t\"./LightView.ts\": [\n\t\t\"./src/views/LightView.ts\",\n\t\t\"main\"\n\t],\n\t\"./MediaPlayerView\": [\n\t\t\"./src/views/MediaPlayerView.ts\",\n\t\t\"main\"\n\t],\n\t\"./MediaPlayerView.ts\": [\n\t\t\"./src/views/MediaPlayerView.ts\",\n\t\t\"main\"\n\t],\n\t\"./SceneView\": [\n\t\t\"./src/views/SceneView.ts\",\n\t\t\"main\"\n\t],\n\t\"./SceneView.ts\": [\n\t\t\"./src/views/SceneView.ts\",\n\t\t\"main\"\n\t],\n\t\"./SecurityDetailsView\": [\n\t\t\"./src/views/SecurityDetailsView.ts\",\n\t\t\"main\"\n\t],\n\t\"./SecurityDetailsView.ts\": [\n\t\t\"./src/views/SecurityDetailsView.ts\",\n\t\t\"main\"\n\t],\n\t\"./SecurityView\": [\n\t\t\"./src/views/SecurityView.ts\",\n\t\t\"main\"\n\t],\n\t\"./SecurityView.ts\": [\n\t\t\"./src/views/SecurityView.ts\",\n\t\t\"main\"\n\t],\n\t\"./SensorView\": [\n\t\t\"./src/views/SensorView.ts\",\n\t\t\"main\"\n\t],\n\t\"./SensorView.ts\": [\n\t\t\"./src/views/SensorView.ts\",\n\t\t\"main\"\n\t],\n\t\"./SwitchView\": [\n\t\t\"./src/views/SwitchView.ts\",\n\t\t\"main\"\n\t],\n\t\"./SwitchView.ts\": [\n\t\t\"./src/views/SwitchView.ts\",\n\t\t\"main\"\n\t],\n\t\"./UnavailableView\": [\n\t\t\"./src/views/UnavailableView.ts\",\n\t\t\"main\"\n\t],\n\t\"./UnavailableView.ts\": [\n\t\t\"./src/views/UnavailableView.ts\",\n\t\t\"main\"\n\t],\n\t\"./VacuumView\": [\n\t\t\"./src/views/VacuumView.ts\",\n\t\t\"main\"\n\t],\n\t\"./VacuumView.ts\": [\n\t\t\"./src/views/VacuumView.ts\",\n\t\t\"main\"\n\t]\n};\nfunction webpackAsyncContext(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\treturn Promise.resolve().then(() => {\n\t\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\t\te.code = 'MODULE_NOT_FOUND';\n\t\t\tthrow e;\n\t\t});\n\t}\n\n\tvar ids = map[req], id = ids[0];\n\treturn Promise.all(ids.slice(1).map(__webpack_require__.e)).then(() => {\n\t\treturn __webpack_require__(id);\n\t});\n}\nwebpackAsyncContext.keys = () => (Object.keys(map));\nwebpackAsyncContext.id = \"./src/views lazy recursive ^\\\\.\\\\/.*$\";\nmodule.exports = webpackAsyncContext;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","// The chunk loading function for additional chunks\n// Since all referenced chunks are already included\n// in this file, this function is empty here.\n__webpack_require__.e = () => (Promise.resolve());","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(\"./src/linus-strategy.ts\");\n",""],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"linus-strategy.js","mappings":";;;;;;;;;;AAAa;;AAEb;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,EAAE;AACF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAE,IAAI;AACN;;AAEA;;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACpIgE;AAE9B;AAU8D;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;;;;;;;;;AC5LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;;;;;;;;;AChJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;;;;;;UC9JA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;WACA;WACA;WACA;;;;;WCHA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;UENA;UACA;UACA;UACA","sources":["webpack://linus-dashboard/./node_modules/deepmerge/dist/cjs.js","webpack://linus-dashboard/./src/Helper.ts","webpack://linus-dashboard/./src/cards/AbstractCard.ts","webpack://linus-dashboard/./src/cards/AggregateCard.ts","webpack://linus-dashboard/./src/cards/AlarmCard.ts","webpack://linus-dashboard/./src/cards/BinarySensorCard.ts","webpack://linus-dashboard/./src/cards/CameraCard.ts","webpack://linus-dashboard/./src/cards/ClimateCard.ts","webpack://linus-dashboard/./src/cards/ControllerCard.ts","webpack://linus-dashboard/./src/cards/CoverCard.ts","webpack://linus-dashboard/./src/cards/FanCard.ts","webpack://linus-dashboard/./src/cards/HomeAreaCard.ts","webpack://linus-dashboard/./src/cards/ImageAreaCard.ts","webpack://linus-dashboard/./src/cards/LightCard.ts","webpack://linus-dashboard/./src/cards/LockCard.ts","webpack://linus-dashboard/./src/cards/MediaPlayerCard.ts","webpack://linus-dashboard/./src/cards/MiscellaneousCard.ts","webpack://linus-dashboard/./src/cards/NumberCard.ts","webpack://linus-dashboard/./src/cards/PersonCard.ts","webpack://linus-dashboard/./src/cards/SceneCard.ts","webpack://linus-dashboard/./src/cards/SensorCard.ts","webpack://linus-dashboard/./src/cards/SwipeCard.ts","webpack://linus-dashboard/./src/cards/SwitchCard.ts","webpack://linus-dashboard/./src/cards/VacuumCard.ts","webpack://linus-dashboard/./src/chips/AbstractChip.ts","webpack://linus-dashboard/./src/chips/AggregateChip.ts","webpack://linus-dashboard/./src/chips/AlarmChip.ts","webpack://linus-dashboard/./src/chips/AreaScenesChips.ts","webpack://linus-dashboard/./src/chips/AreaStateChip.ts","webpack://linus-dashboard/./src/chips/ClimateChip.ts","webpack://linus-dashboard/./src/chips/ConditionalChip.ts","webpack://linus-dashboard/./src/chips/ControlChip.ts","webpack://linus-dashboard/./src/chips/CoverChip.ts","webpack://linus-dashboard/./src/chips/FanChip.ts","webpack://linus-dashboard/./src/chips/LightChip.ts","webpack://linus-dashboard/./src/chips/MediaPlayerChip.ts","webpack://linus-dashboard/./src/chips/SafetyChip.ts","webpack://linus-dashboard/./src/chips/SettingsChip.ts","webpack://linus-dashboard/./src/chips/SpotifyChip.ts","webpack://linus-dashboard/./src/chips/SwitchChip.ts","webpack://linus-dashboard/./src/chips/ToggleSceneChip.ts","webpack://linus-dashboard/./src/chips/UnavailableChip.ts","webpack://linus-dashboard/./src/chips/WeatherChip.ts","webpack://linus-dashboard/./src/configurationDefaults.ts","webpack://linus-dashboard/./src/linus-strategy.ts","webpack://linus-dashboard/./src/popups/AbstractPopup.ts","webpack://linus-dashboard/./src/popups/AreaInformationsPopup.ts","webpack://linus-dashboard/./src/popups/LightSettingsPopup.ts","webpack://linus-dashboard/./src/popups/SceneSettingsPopup.ts","webpack://linus-dashboard/./src/popups/SettingsPopup.ts","webpack://linus-dashboard/./src/popups/WeatherPopup.ts","webpack://linus-dashboard/./src/types/lovelace-mushroom/cards/vacuum-card-config.ts","webpack://linus-dashboard/./src/types/strategy/generic.ts","webpack://linus-dashboard/./src/utils.ts","webpack://linus-dashboard/./src/variables.ts","webpack://linus-dashboard/./src/views/AbstractView.ts","webpack://linus-dashboard/./src/views/AggregateView.ts","webpack://linus-dashboard/./src/views/AreaView.ts","webpack://linus-dashboard/./src/views/CameraView.ts","webpack://linus-dashboard/./src/views/ClimateView.ts","webpack://linus-dashboard/./src/views/CoverView.ts","webpack://linus-dashboard/./src/views/FanView.ts","webpack://linus-dashboard/./src/views/FloorView.ts","webpack://linus-dashboard/./src/views/HomeView.ts","webpack://linus-dashboard/./src/views/LightView.ts","webpack://linus-dashboard/./src/views/MediaPlayerView.ts","webpack://linus-dashboard/./src/views/SceneView.ts","webpack://linus-dashboard/./src/views/SecurityDetailsView.ts","webpack://linus-dashboard/./src/views/SecurityView.ts","webpack://linus-dashboard/./src/views/SensorView.ts","webpack://linus-dashboard/./src/views/SwitchView.ts","webpack://linus-dashboard/./src/views/UnavailableView.ts","webpack://linus-dashboard/./src/views/VacuumView.ts","webpack://linus-dashboard/./src/cards/ lazy ^\\.\\/.*$ namespace object","webpack://linus-dashboard/./src/chips/ lazy ^\\.\\/.*$ namespace object","webpack://linus-dashboard/./src/views/ lazy ^\\.\\/.*$ namespace object","webpack://linus-dashboard/webpack/bootstrap","webpack://linus-dashboard/webpack/runtime/compat get default export","webpack://linus-dashboard/webpack/runtime/define property getters","webpack://linus-dashboard/webpack/runtime/ensure chunk","webpack://linus-dashboard/webpack/runtime/hasOwnProperty shorthand","webpack://linus-dashboard/webpack/runtime/make namespace object","webpack://linus-dashboard/webpack/before-startup","webpack://linus-dashboard/webpack/startup","webpack://linus-dashboard/webpack/after-startup"],"sourcesContent":["'use strict';\n\nvar isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n\treturn Array.isArray(val) ? [] : {}\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n\treturn (options.clone !== false && options.isMergeableObject(value))\n\t\t? deepmerge(emptyTarget(value), value, options)\n\t\t: value\n}\n\nfunction defaultArrayMerge(target, source, options) {\n\treturn target.concat(source).map(function(element) {\n\t\treturn cloneUnlessOtherwiseSpecified(element, options)\n\t})\n}\n\nfunction getMergeFunction(key, options) {\n\tif (!options.customMerge) {\n\t\treturn deepmerge\n\t}\n\tvar customMerge = options.customMerge(key);\n\treturn typeof customMerge === 'function' ? customMerge : deepmerge\n}\n\nfunction getEnumerableOwnPropertySymbols(target) {\n\treturn Object.getOwnPropertySymbols\n\t\t? Object.getOwnPropertySymbols(target).filter(function(symbol) {\n\t\t\treturn Object.propertyIsEnumerable.call(target, symbol)\n\t\t})\n\t\t: []\n}\n\nfunction getKeys(target) {\n\treturn Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))\n}\n\nfunction propertyIsOnObject(object, property) {\n\ttry {\n\t\treturn property in object\n\t} catch(_) {\n\t\treturn false\n\t}\n}\n\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n\treturn propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n\t\t&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n\t\t\t&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.\n}\n\nfunction mergeObject(target, source, options) {\n\tvar destination = {};\n\tif (options.isMergeableObject(target)) {\n\t\tgetKeys(target).forEach(function(key) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n\t\t});\n\t}\n\tgetKeys(source).forEach(function(key) {\n\t\tif (propertyIsUnsafe(target, key)) {\n\t\t\treturn\n\t\t}\n\n\t\tif (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\n\t\t\tdestination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n\t\t} else {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n\t\t}\n\t});\n\treturn destination\n}\n\nfunction deepmerge(target, source, options) {\n\toptions = options || {};\n\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge;\n\toptions.isMergeableObject = options.isMergeableObject || isMergeableObject;\n\t// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n\t// implementations can use it. The caller may not replace it.\n\toptions.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n\n\tvar sourceIsArray = Array.isArray(source);\n\tvar targetIsArray = Array.isArray(target);\n\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n\tif (!sourceAndTargetTypesMatch) {\n\t\treturn cloneUnlessOtherwiseSpecified(source, options)\n\t} else if (sourceIsArray) {\n\t\treturn options.arrayMerge(target, source, options)\n\t} else {\n\t\treturn mergeObject(target, source, options)\n\t}\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n\tif (!Array.isArray(array)) {\n\t\tthrow new Error('first argument should be an array')\n\t}\n\n\treturn array.reduce(function(prev, next) {\n\t\treturn deepmerge(prev, next, options)\n\t}, {})\n};\n\nvar deepmerge_1 = deepmerge;\n\nmodule.exports = deepmerge_1;\n","import { configurationDefaults } from \"./configurationDefaults\";\nimport { HassEntities, HassEntity } from \"home-assistant-js-websocket\";\nimport deepmerge from \"deepmerge\";\nimport { DeviceRegistryEntry } from \"./types/homeassistant/data/device_registry\";\nimport { AreaRegistryEntry } from \"./types/homeassistant/data/area_registry\";\nimport { generic } from \"./types/strategy/generic\";\nimport StrategyArea = generic.StrategyArea;\nimport StrategyFloor = generic.StrategyFloor;\nimport StrategyEntity = generic.StrategyEntity;\nimport StrategyDevice = generic.StrategyDevice;\nimport MagicAreaRegistryEntry = generic.MagicAreaRegistryEntry;\nimport { FloorRegistryEntry } from \"./types/homeassistant/data/floor_registry\";\nimport { DEVICE_CLASSES, MAGIC_AREAS_DOMAIN, MAGIC_AREAS_NAME, UNDISCLOSED } from \"./variables\";\nimport { getMAEntity, getMagicAreaSlug, groupEntitiesByDomain, slugify } from \"./utils\";\nimport { EntityRegistryEntry } from \"./types/homeassistant/data/entity_registry\";\nimport { FrontendEntityComponentIconResources, IconResources } from \"./types/homeassistant/data/frontend\";\nimport { LinusDashboardConfig } from \"./types/homeassistant/data/linus_dashboard\";\n\n/**\n * Helper Class\n *\n * Contains the objects of Home Assistant's registries and helper methods.\n */\nclass Helper {\n /**\n * An array of entities from Home Assistant's entity registry.\n *\n * @type {Record}\n * @private\n */\n static #entities: Record;\n\n /**\n * An array of entities from Home Assistant's entity registry.\n *\n * @type {Record = {};\n\n /**\n * An array of entities from Home Assistant's device registry.\n *\n * @type {Record}\n * @private\n */\n static #devices: Record;\n\n /**\n * An array of entities from Home Assistant's area registry.\n *\n * @type {Record}\n * @private\n */\n static #areas: Record = {};\n\n /**\n * An array of entities from Home Assistant's area registry.\n *\n * @type {Record}\n * @private\n */\n static #floors: Record = {};\n\n /**\n * An array of state entities from Home Assistant's Hass object.\n *\n * @type {HassEntities}\n * @private\n */\n static #hassStates: HassEntities;\n\n /**\n * Translation method.\n *\n * @type {any}\n * @private\n */\n static #hassLocalize: any;\n\n /**\n * Indicates whether this module is initialized.\n *\n * @type {boolean} True if initialized.\n * @private\n */\n static #initialized: boolean = false;\n\n /**\n * The Custom strategy configuration.\n *\n * @type {generic.StrategyConfig}\n * @private\n */\n static #strategyOptions: generic.StrategyConfig;\n\n /**\n * The magic areas devices.\n *\n * @type {Record}\n * @private\n */\n static #magicAreasDevices: Record = {};\n\n /**\n * Set to true for more verbose information in the console.\n *\n * @type {boolean}\n * @private\n */\n static #debug: boolean;\n\n /**\n * Set to true for more verbose information in the console.\n *\n * @type {IconResources}\n * @private\n */\n static #icons: IconResources;\n\n /**\n * Set to true for more verbose information in the console.\n *\n * @type {LinusDashboardConfig}\n * @private\n */\n static #linus_dashboard_config: LinusDashboardConfig;\n\n /**\n * Class constructor.\n *\n * This class shouldn't be instantiated directly.\n * Instead, it should be initialized with method initialize().\n *\n * @throws {Error} If trying to instantiate this class.\n */\n constructor() {\n throw new Error(\"This class should be invoked with method initialize() instead of using the keyword new!\");\n }\n\n /**\n * Custom strategy configuration.\n *\n * @returns {generic.StrategyConfig}\n * @static\n */\n static get strategyOptions(): generic.StrategyConfig {\n return this.#strategyOptions;\n }\n\n /**\n * Custom strategy configuration.\n *\n * @returns {Record}\n * @static\n */\n static get magicAreasDevices(): Record {\n return this.#magicAreasDevices;\n }\n\n /**\n * Get the entities from Home Assistant's area registry.\n *\n * @returns {Record}\n * @static\n */\n static get areas(): Record {\n return this.#areas;\n }\n\n /**\n * Get the entities from Home Assistant's floor registry.\n *\n * @returns {StrategyArea[]}\n * @static\n */\n static get orderedAreas(): StrategyArea[] {\n return Object.values(this.#areas).sort((a, b) => {\n // Check if 'level' is undefined in either object\n if (a.order === undefined) return 1; // a should come after b\n if (b.order === undefined) return -1; // b should come after a\n\n // Both 'order' values are defined, compare them\n return a.order - b.order;\n });\n }\n\n /**\n * Get the entities from Home Assistant's floor registry.\n *\n * @returns {Record}\n * @static\n */\n static get floors(): Record {\n return this.#floors\n }\n\n /**\n * Get the entities from Home Assistant's floor registry.\n *\n * @returns {StrategyFloor[]}\n * @static\n */\n static get orderedFloors(): StrategyFloor[] {\n return Object.values(this.#floors).sort((a, b) => {\n // Check if 'level' is undefined in either object\n if (a.level === undefined) return 1; // a should come after b\n if (b.level === undefined) return -1; // b should come after a\n\n // Both 'level' values are defined, compare them\n return a.level - b.level;\n });\n }\n\n /**\n * Get the devices from Home Assistant's device registry.\n *\n * @returns {Record}\n * @static\n */\n static get devices(): Record {\n return this.#devices;\n }\n\n /**\n * Get the entities from Home Assistant's entity registry.\n *\n * @returns {Record}\n * @static\n */\n static get entities(): Record {\n return this.#entities;\n }\n\n /**\n * Get the domains from Home Assistant's entity registry.\n *\n * @returns {Record}\n * @static\n */\n static get domains(): Record {\n return this.#domains;\n }\n\n /**\n * Get the icons from Home Assistant's frontend.\n *\n * @returns {IconResources}\n * @static\n */\n static get icons(): IconResources {\n return this.#icons;\n }\n\n /**\n * Get the linus_dashboard_config from Home Assistant's frontend.\n *\n * @returns {LinusDashboardConfig}\n * @static\n */\n static get linus_dashboard_config(): LinusDashboardConfig {\n return this.#linus_dashboard_config;\n }\n\n /**\n * Get the current debug mode of the mushroom strategy.\n *\n * @returns {boolean}\n * @static\n */\n static get debug(): boolean {\n return this.#debug;\n }\n\n /**\n * Initialize this module.\n *\n * @param {generic.DashBoardInfo} info Strategy information object.\n * @returns {Promise}\n * @static\n */\n static async initialize(info: generic.DashBoardInfo): Promise {\n // Initialize properties.\n this.#hassStates = info.hass.states;\n this.#hassLocalize = info.hass.localize;\n this.#strategyOptions = deepmerge(configurationDefaults, info.config?.strategy?.options ?? {});\n this.#debug = this.#strategyOptions.debug;\n\n let homeAssistantRegistries = []\n\n try {\n // Query the registries of Home Assistant.\n\n homeAssistantRegistries = await Promise.all([\n info.hass.callWS({ type: \"config/entity_registry/list\" }) as Promise,\n info.hass.callWS({ type: \"config/device_registry/list\" }) as Promise,\n info.hass.callWS({ type: \"config/area_registry/list\" }) as Promise,\n info.hass.callWS({ type: \"config/floor_registry/list\" }) as Promise,\n info.hass.callWS({ type: \"frontend/get_icons\", category: \"entity_component\" }) as Promise,\n info.hass.callWS({ type: \"frontend/get_icons\", category: \"services\" }) as Promise,\n info.hass.callWS({ type: \"linus_dashboard/get_config\" }) as Promise,\n ]);\n\n } catch (e) {\n Helper.logError(\"An error occurred while querying Home assistant's registries!\", e);\n throw 'Check the console for details';\n }\n\n const [entities, devices, areas, floors, entity_component_icons, services_icons, linus_dashboard_config] = homeAssistantRegistries;\n\n this.#icons = deepmerge(entity_component_icons.resources, services_icons.resources);\n this.#linus_dashboard_config = linus_dashboard_config;\n\n // Dictionnaires pour un accès rapide\n const areasById = Object.fromEntries(areas.map(a => [a.area_id, a]));\n const floorsById = Object.fromEntries(floors.map(f => [f.floor_id, f]));\n const devicesByAreaIdMap = Object.fromEntries(devices.map(device => [device.id, device.area_id]));\n const entitiesByDeviceId: Record = {};\n const entitiesByAreaId: Record = {};\n const devicesByAreaId: Record = {};\n\n this.#entities = entities.reduce((acc, entity) => {\n\n if (!(entity.entity_id in this.#hassStates)) return acc;\n\n const area = entity.area_id ? areasById[entity.area_id] : {} as StrategyArea;\n const floor = area.floor_id ? floorsById[area.floor_id] : {} as StrategyFloor;\n const enrichedEntity = {\n ...entity,\n floor_id: floor.floor_id || null,\n };\n\n acc[entity.entity_id] = enrichedEntity;\n\n if (entity.platform !== MAGIC_AREAS_DOMAIN) {\n const areaId = entity.area_id ?? devicesByAreaIdMap[entity.device_id ?? \"\"] ?? UNDISCLOSED;\n if (!entitiesByAreaId[areaId]) entitiesByAreaId[areaId] = [];\n entitiesByAreaId[areaId].push(enrichedEntity);\n }\n\n if (entity.device_id) {\n if (!entitiesByDeviceId[entity.device_id]) entitiesByDeviceId[entity.device_id] = [];\n entitiesByDeviceId[entity.device_id].push(enrichedEntity);\n }\n\n\n let domain = this.getEntityDomain(entity.entity_id)\n if (Object.keys(DEVICE_CLASSES).includes(domain)) {\n const entityState = Helper.getEntityState(entity.entity_id);\n if (entityState?.attributes?.device_class) domain = entityState.attributes.device_class\n }\n if (!this.#domains[domain]) this.#domains[domain] = [];\n if (entity.platform !== MAGIC_AREAS_DOMAIN) this.#domains[domain].push(enrichedEntity);\n\n return acc;\n }, {} as Record);\n\n // Enrichir les appareils\n this.#devices = devices.reduce((acc, device) => {\n const entitiesInDevice = entitiesByDeviceId[device.id] || [];\n const area = device.area_id ? areasById[device.area_id] : {} as StrategyArea;\n const floor = area.floor_id ? floorsById[area.floor_id] : {} as StrategyFloor;\n\n const enrichedDevice = {\n ...device,\n floor_id: floor.floor_id || null,\n entities: entitiesInDevice.map(entity => entity.entity_id),\n };\n\n acc[device.id] = enrichedDevice;\n\n if (device.manufacturer !== MAGIC_AREAS_NAME) {\n const areaId = device.area_id ?? UNDISCLOSED;\n if (!devicesByAreaId[areaId]) devicesByAreaId[areaId] = [];\n devicesByAreaId[areaId].push(enrichedDevice);\n }\n\n if (device.manufacturer === MAGIC_AREAS_NAME) {\n this.#magicAreasDevices[getMagicAreaSlug(device as MagicAreaRegistryEntry)] = {\n ...device,\n area_name: device.name!,\n entities: entitiesInDevice\n .reduce((entities: Record, entity) => {\n entities[entity.translation_key!] = entity;\n return entities;\n }, {})\n }\n }\n\n return acc;\n }, {} as Record);\n\n\n // Create and add the undisclosed area if not hidden in the strategy options.\n if (!this.#strategyOptions.areas.undisclosed?.hidden) {\n\n this.#strategyOptions.areas.undisclosed = {\n ...configurationDefaults.areas.undisclosed,\n ...this.#strategyOptions.areas.undisclosed,\n };\n\n areas.push(this.#strategyOptions.areas.undisclosed);\n }\n\n // Enrichir les zones\n this.#areas = areas.reduce((acc, area) => {\n\n const areaEntities = entitiesByAreaId[area.area_id]?.map(entity => entity.entity_id) || [];\n\n const slug = area.area_id === UNDISCLOSED ? area.area_id : slugify(area.name);\n\n const enrichedArea = {\n ...area,\n floor_id: area.floor_id || UNDISCLOSED,\n slug,\n domains: groupEntitiesByDomain(areaEntities) ?? {},\n devices: devicesByAreaId[area.area_id]?.map(device => device.id) || [],\n magicAreaDevice: Object.values(this.#devices).find(device => device.manufacturer === MAGIC_AREAS_NAME && device.name === area.name),\n entities: areaEntities,\n };\n\n acc[slug] = enrichedArea;\n return acc;\n }, {} as Record);\n\n\n // Create and add the undisclosed floor if not hidden in the strategy options.\n if (!this.#strategyOptions.areas.undisclosed?.hidden) {\n\n this.#strategyOptions.floors.undisclosed = {\n ...configurationDefaults.floors.undisclosed,\n ...this.#strategyOptions.floors.undisclosed,\n };\n\n floors.push(this.#strategyOptions.floors.undisclosed);\n }\n\n // Enrichir les étages\n this.#floors = floors.reduce((acc, floor) => {\n const areasInFloor = Object.values(this.#areas).filter(area => area.floor_id === floor.floor_id);\n\n acc[floor.floor_id] = {\n ...floor,\n areas_slug: areasInFloor.map(area => area.slug),\n };\n\n return acc;\n }, {} as Record);\n\n\n // Sort custom and default views of the strategy options by order first and then by title.\n this.#strategyOptions.views = Object.fromEntries(\n Object.entries(this.#strategyOptions.views).sort(([, a], [, b]) => {\n return (a.order ?? Infinity) - (b.order ?? Infinity) || (a.title ?? \"undefined\").localeCompare(b.title ?? \"undefined\");\n }),\n );\n\n // Sort custom and default domains of the strategy options by order first and then by title.\n this.#strategyOptions.domains = Object.fromEntries(\n Object.entries(this.#strategyOptions.domains).sort(([, a], [, b]) => {\n return (a.order ?? Infinity) - (b.order ?? Infinity) || (a.title ?? \"undefined\").localeCompare(b.title ?? \"undefined\");\n }),\n );\n\n // console.log('this.#areas', this.#areas, this.#magicAreasDevices)\n\n this.#initialized = true;\n }\n\n /**\n * Get the initialization status of the Helper class.\n *\n * @returns {boolean} True if this module is initialized.\n * @static\n */\n static isInitialized(): boolean {\n return this.#initialized;\n }\n\n /**\n * Get a template string to define the number of a given domain's entities with a certain state.\n *\n * States are compared against a given value by a given operator.\n *\n * @param {string} domain The domain of the entities.\n * @param {string} operator The Comparison operator between state and value.\n * @param {string} value The value to which the state is compared against.\n * @param {string} area_id\n *\n * @return {string} The template string.\n * @static\n */\n static getCountTemplate(domain: string, operator: string, value: string | string[], area_slug?: string | string[]): string {\n const states: string[] = [];\n\n if (!this.isInitialized()) {\n console.warn(\"Helper class should be initialized before calling this method!\");\n }\n\n const areaSlugs = Array.isArray(area_slug) ? area_slug : [area_slug];\n\n for (const slug of areaSlugs) {\n if (slug) {\n const newStates = domain === \"all\"\n ? this.#areas[slug]?.entities.map((entity_id) => `states['${entity_id}']`)\n : this.#areas[slug]?.domains[domain]?.map((entity_id) => `states['${entity_id}']`);\n if (newStates) {\n states.push(...newStates);\n }\n } else {\n for (const area of Object.values(this.#areas)) {\n if (area.area_id === UNDISCLOSED) continue;\n\n const newStates = domain === \"all\"\n ? area.entities.map((entity_id) => `states['${entity_id}']`)\n : area.domains[domain]?.map((entity_id) => `states['${entity_id}']`);\n if (newStates) {\n states.push(...newStates);\n }\n }\n }\n }\n\n const formatedValue = Array.isArray(value) ? JSON.stringify(value).replaceAll('\"', \"'\") : `'${value}'`;\n\n return `{% set entities = [${states}] %}{{ entities | selectattr('state','${operator}',${formatedValue}) | list | count }}`;\n }\n\n /**\n * Get a template string to define the number of a given device_class's entities with a certain state.\n *\n * States are compared against a given value by a given operator.\n *\n * @param {string} domain The domain of the entities.\n * @param {string} device_class The device class of the entities.\n * @param {string} operator The Comparison operator between state and value.\n * @param {string} value The value to which the state is compared against.\n * @param {string} area_id\n *\n * @return {string} The template string.\n * @static\n */\n static getDeviceClassCountTemplate(device_class: string, operator: string, value: string, area_slug: string | string[] = \"global\"): string {\n const states: string[] = [];\n\n if (!this.isInitialized()) {\n console.warn(\"Helper class should be initialized before calling this method!\");\n }\n\n const area_slugs = Array.isArray(area_slug) ? area_slug : [area_slug];\n\n for (const slug of area_slugs) {\n const newStates = slug === \"global\"\n ? this.domains[device_class]?.map((entity) => `states['${entity.entity_id}']`) ?? []\n : this.#areas[slug]?.domains[device_class]?.map((entity_id) => `states['${entity_id}']`) ?? [];\n states.push(...newStates);\n }\n\n const formattedValue = Array.isArray(value) ? JSON.stringify(value).replace(/\"/g, \"'\") : `'${value}'`;\n return `{% set entities = [${states}] %}{{ entities | selectattr('attributes.device_class', 'defined') | selectattr('attributes.device_class', 'eq', '${device_class}') | selectattr('state','${operator}',${formattedValue}) | list | count }}`;\n }\n\n /**\n * Get a template string to define the average state of sensor entities with a given device class.\n *\n * States are compared against a given value by a given operator.\n *\n * @param {string} device_class The device class of the entities.\n * @param {string} area_id\n *\n * @return {string} The template string.\n * @static\n */\n /**\n * Get a template string to define the average state of sensor entities with a given device class.\n *\n * @param {string} device_class The device class of the entities.\n * @param {string | string[]} area_slug The area slug(s) to filter entities by.\n *\n * @return {string} The template string.\n * @static\n */\n static getAverageStateTemplate(device_class: string, area_slug: string | string[] = \"global\"): string {\n const states: string[] = [];\n\n if (!this.isInitialized()) {\n console.warn(\"Helper class should be initialized before calling this method!\");\n }\n\n const areaSlugs = Array.isArray(area_slug) ? area_slug : [area_slug];\n\n for (const slug of areaSlugs) {\n const magic_entity = getMAEntity(slug!, \"sensor\", device_class);\n const newStates = magic_entity\n ? [`states['${magic_entity.entity_id}']`]\n : slug\n ? this.#areas[slug]?.domains[device_class]?.map((entity_id) => `states['${entity_id}']`) || []\n : [];\n states.push(...newStates);\n }\n\n return `{% set entities = [${states}] %}{{ (entities | selectattr('attributes.device_class', 'defined') | selectattr('attributes.device_class', 'eq', '${device_class}') | map(attribute='state') | map('float') | sum / entities | length) | round(1) }} {{ ${states[0]}.attributes.unit_of_measurement }}`;\n }\n\n /**\n * Get device entities from the entity registry, filtered by area and domain.\n *\n * The entity registry is a registry where Home-Assistant keeps track of all entities.\n * A device is represented in Home Assistant via one or more entities.\n *\n * The result excludes hidden and disabled entities.\n *\n * @param {AreaRegistryEntry} area Area entity.\n * @param {string} domain The domain of the entity-id.\n *\n * @return {StrategyEntity[]} Array of device entities.\n * @static\n */\n static getAreaEntities(area: StrategyArea, domain?: string): StrategyEntity[] {\n\n if (!this.isInitialized()) {\n console.warn(\"Helper class should be initialized before calling this method!\");\n }\n\n if (domain) {\n return area.domains[domain]?.map(entity_id => this.#entities[entity_id]) ?? []\n } else {\n return area.entities.map(entity_id => this.#entities[entity_id]) ?? []\n }\n }\n\n /**\n * Get state entities, filtered by area and domain.\n *\n * The result excludes hidden and disabled entities.\n *\n * @param {StrategyArea} area Area entity.\n * @param {string} domain Domain of the entity-id.\n *\n * @return {HassEntity[]} Array of state entities.\n */\n static getStateEntities(area: StrategyArea, domain: string): HassEntity[] {\n if (!this.isInitialized()) {\n console.warn(\"Helper class should be initialized before calling this method!\");\n }\n\n // Get states whose entity-id starts with the given string.\n const stateEntities = this.#areas[area.slug].domains[domain]?.map(entity_id => this.#hassStates[entity_id]);\n\n return stateEntities;\n }\n\n /**\n * Sanitize a classname.\n *\n * The name is sanitized by capitalizing the first character of the name or after an underscore.\n * Underscores are removed.\n *\n * @param {string} className Name of the class to sanitize.\n * @returns {string} The sanitized classname.\n */\n static sanitizeClassName(className: string): string {\n className = className.charAt(0).toUpperCase() + className.slice(1);\n\n return className.replace(/([-_][a-z])/g, (group) => group\n .toUpperCase()\n .replace(\"-\", \"\")\n .replace(\"_\", \"\"),\n );\n }\n\n /**\n * Get the ids of the views which aren't set to hidden in the strategy options.\n *\n * @return {string[]} An array of view ids.\n */\n static getExposedViewIds(): string[] {\n if (!this.isInitialized()) {\n console.warn(\"Helper class should be initialized before calling this method!\");\n }\n\n return this.#getObjectKeysByPropertyValue(this.#strategyOptions.views, \"hidden\", false);\n }\n\n /**\n * Get the ids of the domain ids which aren't set to hidden in the strategy options.\n *\n * @return {string[]} An array of domain ids.\n */\n static getExposedDomainIds(): string[] {\n if (!this.isInitialized()) {\n console.warn(\"Helper class should be initialized before calling this method!\");\n }\n\n return this.#getObjectKeysByPropertyValue(this.#strategyOptions.domains, \"hidden\", false);\n }\n\n /**\n * Get the keys of nested objects by its property value.\n *\n * @param {Object} object An object of objects.\n * @param {string|number} property The name of the property to evaluate.\n * @param {*} value The value which the property should match.\n *\n * @return {string[]} An array with keys.\n */\n static #getObjectKeysByPropertyValue(\n object: { [k: string]: any },\n property: string, value: any\n ): string[] {\n const keys: string[] = [];\n\n for (const key of Object.keys(object)) {\n if (object[key][property] === value) {\n keys.push(key);\n }\n }\n\n return keys;\n }\n\n /**\n * Logs an error message to the console.\n *\n * @param {string} userMessage - The error message to display.\n * @param {unknown} [e] - (Optional) The error object or additional information.\n *\n * @return {void}\n */\n static logError(userMessage: string, e?: unknown): void {\n if (Helper.debug) {\n console.error(userMessage, e);\n\n return;\n }\n\n console.error(userMessage);\n }\n\n /**\n * Get entity state.\n *\n * @return {HassEntity}\n */\n static getEntityState(entity_id: string): HassEntity {\n return this.#hassStates[entity_id]\n }\n\n /**\n * Get entity domain.\n *\n * @return {string}\n */\n static getEntityDomain(entityId: string): string {\n return entityId.split(\".\")[0];\n }\n\n /**\n * Get translation.\n *\n * @return {string}\n */\n static localize(translationKey: string): string {\n return this.#hassLocalize(translationKey) ?? \"translation not found\";\n }\n\n /**\n * Get valid entity.\n *\n * @return {StrategyEntity}\n */\n static getValidEntity(entity: StrategyEntity): Boolean {\n return entity.disabled_by === null && entity.hidden_by === null\n }\n\n static getFromDomainState({ domain, operator, value, ifReturn, elseReturn, area_slug }: { domain: string, operator?: string, value?: string | string[], ifReturn?: string, elseReturn?: string, area_slug?: string | string[] }): string {\n const states: string[] = [];\n\n if (!this.isInitialized()) {\n console.warn(\"Helper class should be initialized before calling this method!\");\n }\n\n const areaSlugs = Array.isArray(area_slug) ? area_slug : [area_slug];\n\n for (const slug of areaSlugs) {\n if (slug) {\n const magic_entity = getMAEntity(slug!, domain);\n const newStates = domain === \"all\"\n ? this.#areas[slug]?.entities.map((entity_id) => `states['${entity_id}']`)\n : magic_entity\n ? [`states['${magic_entity.entity_id}']`] : area_slug === \"global\"\n ? this.domains[domain]?.map((entity) => `states['${entity.entity_id}']`)\n : this.#areas[slug]?.domains[domain]?.map((entity_id) => `states['${entity_id}']`);\n if (newStates) {\n states.push(...newStates);\n }\n } else {\n // Get the ID of the devices which are linked to the given area.\n for (const area of Object.values(this.#areas)) {\n if (area.area_id === UNDISCLOSED) continue\n\n const newStates = domain === \"all\"\n ? this.#areas[area.slug]?.entities.map((entity_id) => `states['${entity_id}']`)\n : this.#areas[area.slug]?.domains[domain]?.map((entity_id) => `states['${entity_id}']`);\n if (newStates) {\n states.push(...newStates);\n }\n }\n }\n }\n\n if (domain === \"light\") {\n ifReturn = ifReturn ?? \"amber\";\n }\n if (domain === \"climate\") {\n operator = operator ?? \"ne\";\n value = value ?? \"off\";\n ifReturn = ifReturn ?? \"orange\";\n }\n if (domain === \"cover\") {\n value = value ?? \"open\";\n ifReturn = ifReturn ?? \"cyan\";\n }\n if (domain === \"fan\") {\n ifReturn = ifReturn ?? \"green\";\n }\n if (domain === \"media_player\") {\n value = value ?? \"playing\";\n ifReturn = ifReturn ?? \"dark-blue\";\n }\n if (domain === \"switch\") {\n ifReturn = ifReturn ?? \"blue\";\n }\n\n const formatedValue = Array.isArray(value) ? JSON.stringify(value).replaceAll('\"', \"'\") : `'${value ?? 'on'}'`;\n\n return `{% set entities = [${states}] %}{{ '${ifReturn ?? 'white'}' if entities | selectattr('state','${operator ?? 'eq'}', ${formatedValue}) | list | count > 0 else '${elseReturn ?? 'grey'}' }}`;\n }\n\n static getBinarySensorColorFromState(device_class: string, operator: string, value: string, ifReturn: string, elseReturn: string, area_slug: string | string[] = \"global\"): string {\n const states: string[] = [];\n\n if (!this.isInitialized()) {\n console.warn(\"Helper class should be initialized before calling this method!\");\n }\n\n const areaSlugs = Array.isArray(area_slug) ? area_slug : [area_slug];\n\n for (const slug of areaSlugs) {\n const magic_entity = getMAEntity(slug!, \"binary_sensor\", device_class);\n\n const newStates = magic_entity\n ? [`states['${magic_entity.entity_id}']`]\n : area_slug === \"global\"\n ? this.domains[device_class]?.map((entity) => `states['${entity.entity_id}']`)\n : this.#areas[slug]?.domains[device_class]?.map((entity_id) => `states['${entity_id}']`);\n\n if (newStates) states.push(...newStates);\n }\n\n return `\n {% set entities = [${states}] %}\n {{ '${ifReturn}' if entities | selectattr('attributes.device_class', 'defined') | selectattr('attributes.device_class', 'eq', '${device_class}') | selectattr('state','${operator}','${value}') | list | count else '${elseReturn}' }}`;\n }\n\n static getSensorColorFromState(device_class: string, area_slug: string | string[] = \"global\"): string | undefined {\n const states: string[] = [];\n\n if (!this.isInitialized()) {\n console.warn(\"Helper class should be initialized before calling this method!\");\n }\n\n const areaSlugs = Array.isArray(area_slug) ? area_slug : [area_slug];\n\n\n for (const slug of areaSlugs) {\n const magic_entity = getMAEntity(slug!, \"binary_sensor\", device_class);\n\n const newStates = magic_entity\n ? [`states['${magic_entity.entity_id}']`]\n : area_slug === \"global\"\n ? this.domains[device_class]?.map((entity) => `states['${entity.entity_id}']`)\n : this.#areas[slug]?.domains[device_class]?.map((entity_id) => `states['${entity_id}']`);\n\n if (newStates) states.push(...newStates);\n }\n\n if (device_class === \"battery\") {\n return `\n {% set entities = [${states}] %}\n {% set bl = entities | selectattr('attributes.device_class', 'defined') | selectattr('attributes.device_class', 'eq', '${device_class}') | map(attribute='state') | map('float') | sum / entities | length %}\n {% if bl < 20 %}\n red\n {% elif bl < 30 %}\n orange\n {% elif bl >= 30 %}\n green\n {% else %}\n disabled\n {% endif %}\n `;\n }\n\n if (device_class === \"temperature\") {\n return `\n {% set entities = [${states}] %}\n {% set bl = entities | selectattr('attributes.device_class', 'defined') | selectattr('attributes.device_class', 'eq', '${device_class}') | map(attribute='state') | map('float') | sum / entities | length %}\n {% if bl < 20 %}\n blue\n {% elif bl < 30 %}\n orange\n {% elif bl >= 30 %}\n red\n {% else %}\n disabled\n {% endif %}\n `;\n }\n\n if (device_class === \"humidity\") {\n return `\n {% set entities = [${states}] %}\n {% set humidity = entities | selectattr('attributes.device_class', 'defined') | selectattr('attributes.device_class', 'eq', '${device_class}') | map(attribute='state') | map('float') | sum / entities | length %}\n {% if humidity < 30 %}\n blue\n {% elif humidity >= 30 and humidity <= 60 %}\n green\n {% else %}\n red\n {% endif %}\n `;\n }\n\n return undefined;\n }\n\n static getSensorIconFromState(device_class: string, area_slug: string | string[] = \"global\"): string | undefined {\n const states: string[] = [];\n\n if (!this.isInitialized()) {\n console.warn(\"Helper class should be initialized before calling this method!\");\n }\n\n const areaSlugs = Array.isArray(area_slug) ? area_slug : [area_slug];\n\n for (const slug of areaSlugs) {\n const magic_entity = getMAEntity(slug!, \"sensor\", device_class);\n const newStates = magic_entity\n ? [`states['${magic_entity.entity_id}']`]\n : slug\n ? this.#areas[slug]?.domains[device_class]?.map((entity_id) => `states['${entity_id}']`) || []\n : [];\n states.push(...newStates);\n }\n\n if (device_class === \"battery\") {\n return `\n {% set entities = [${states}] %}\n {% set bl = entities | selectattr('attributes.device_class', 'defined') | selectattr('attributes.device_class', 'eq', '${device_class}') | map(attribute='state') | map('float') | sum / entities | length %}\n {% if bl == 'unknown' or bl == 'unavailable' %}\n {% elif bl < 10 %} mdi:battery-outline\n {% elif bl < 20 %} mdi:battery-10\n {% elif bl < 30 %} mdi:battery-20\n {% elif bl < 40 %} mdi:battery-30\n {% elif bl < 50 %} mdi:battery-40\n {% elif bl < 60 %} mdi:battery-50\n {% elif bl < 70 %} mdi:battery-60\n {% elif bl < 80 %} mdi:battery-70\n {% elif bl < 90 %} mdi:battery-80\n {% elif bl < 100 %} mdi:battery-90\n {% elif bl == 100 %} mdi:battery\n {% else %} mdi:battery{% endif %}\n `;\n }\n\n if (device_class === \"temperature\") {\n return `\n {% set entities = [${states}] %}\n {% set bl = entities | selectattr('attributes.device_class', 'defined') | selectattr('attributes.device_class', 'eq', '${device_class}') | map(attribute='state') | map('float') | sum / entities | length %}\n {% if bl < 20 %}\n mdi:thermometer-low\n {% elif bl < 30 %}\n mdi:thermometer\n {% elif bl >= 30 %}\n mdi:thermometer-high\n {% else %}\n disabled\n {% endif %}\n `;\n }\n\n return undefined;\n }\n}\n\nexport { Helper };\n","import { Helper } from \"../Helper\";\nimport { cards } from \"../types/strategy/cards\";\nimport { generic } from \"../types/strategy/generic\";\nimport { EntityCardConfig } from \"../types/lovelace-mushroom/cards/entity-card-config\";\n\n/**\n * Abstract Card Class\n *\n * To create a new card, extend the new class with this one.\n *\n * @class\n * @abstract\n */\nabstract class AbstractCard {\n /**\n * Entity to create the card for.\n *\n * @type {generic.RegistryEntry}\n */\n entity: generic.RegistryEntry;\n\n /**\n * Configuration of the card.\n *\n * @type {EntityCardConfig}\n */\n config: EntityCardConfig = {\n type: \"custom:mushroom-entity-card\",\n icon: \"mdi:help-circle\",\n };\n\n /**\n * Class constructor.\n *\n * @param {generic.RegistryEntry} entity The hass entity to create a card for.\n * @throws {Error} If the Helper module isn't initialized.\n */\n protected constructor(entity: generic.RegistryEntry) {\n if (!Helper.isInitialized()) {\n throw new Error(\"The Helper module must be initialized before using this one.\");\n }\n\n this.entity = entity;\n }\n\n /**\n * Get a card.\n *\n * @return {cards.AbstractCardConfig} A card object.\n */\n getCard(): cards.AbstractCardConfig {\n return {\n ...this.config,\n entity: this.entity && \"entity_id\" in this.entity ? this.entity.entity_id : undefined,\n };\n }\n}\n\nexport { AbstractCard };\n","import { StackCardConfig } from \"../types/homeassistant/lovelace/cards/types\";\nimport { LovelaceCardConfig } from \"../types/homeassistant/data/lovelace\";\nimport { getAggregateEntity, getAreaName, getFloorName, getStateContent, groupBy } from \"../utils\";\nimport { Helper } from \"../Helper\";\nimport { TemplateCardConfig } from \"../types/lovelace-mushroom/cards/template-card-config\";\nimport { UNDISCLOSED } from \"../variables\";\n\ninterface AggregateCardConfig {\n title?: string;\n subtitle?: string;\n device_name?: string;\n device_class?: string | string[];\n}\n\n/**\n * Aggregate Card class.\n *\n * Used for creating a Title Card with controls.\n *\n * @class\n */\nclass AggregateCard {\n /**\n * @type {string} The domain to control the entities of.\n * @private\n */\n readonly #domain: string;\n\n /**\n * Default configuration of the card.\n *\n * @type {AggregateCardConfig}\n * @private\n */\n readonly #defaultConfig: AggregateCardConfig = {\n device_name: \"Global\",\n };\n\n /**\n * Class constructor.\n *\n * @param {string} domain The domain to control the entities of.\n * @param {AggregateCardConfig} options Aggregate Card options.\n */\n constructor(domain: string, options: AggregateCardConfig = {}) {\n this.#domain = domain;\n this.#defaultConfig = {\n ...this.#defaultConfig,\n ...options,\n };\n }\n\n /**\n * Create a Aggregate card.\n *\n * @return {StackCardConfig} A Aggregate card.\n */\n createCard(): StackCardConfig {\n\n const domains = typeof (this.#domain) === \"string\" ? [this.#domain] : this.#domain;\n const deviceClasses = this.#defaultConfig.device_class && typeof (this.#defaultConfig.device_class) === \"string\" ? [this.#defaultConfig.device_class] : this.#defaultConfig.device_class;\n\n const cards: LovelaceCardConfig[] = [];\n\n const globalEntities = getAggregateEntity(Helper.magicAreasDevices[\"global\"], domains, deviceClasses)[0] ?? false\n\n if (globalEntities) {\n cards.push({\n type: \"tile\",\n entity: globalEntities.entity_id,\n state_content: getStateContent(globalEntities.entity_id),\n color: globalEntities.entity_id.startsWith('binary_sensor.') ? 'red' : false,\n icon_tap_action: this.#domain === \"light\" ? \"more-info\" : \"toggle\",\n });\n }\n\n\n\n for (const floor of Helper.orderedFloors) {\n if (floor.areas_slug.length === 0) continue\n\n let floorCards: (TemplateCardConfig)[] = [];\n floorCards.push({\n type: \"custom:mushroom-title-card\",\n subtitle: getFloorName(floor),\n card_mod: {\n style: `\n ha-card.header {\n padding-top: 8px;\n }\n `,\n }\n });\n\n let areaCards: (TemplateCardConfig)[] = [];\n\n for (const [i, area] of floor.areas_slug.map(area_slug => Helper.areas[area_slug]).entries()) {\n\n if (Helper.strategyOptions.areas[area?.slug]?.hidden) continue\n\n if (area.slug !== UNDISCLOSED) {\n const areaEntities = getAggregateEntity(Helper.magicAreasDevices[area.slug], domains, deviceClasses).map(e => e.entity_id).filter(Boolean)\n\n for (const areaEntity of areaEntities) {\n areaCards.push({\n type: \"tile\",\n entity: areaEntity,\n primary: getAreaName(area),\n state_content: getStateContent(areaEntity),\n color: areaEntity.startsWith('binary_sensor.') ? 'red' : false,\n });\n }\n }\n\n // Horizontally group every two area cards if all cards are created.\n if (i === floor.areas_slug.length - 1) {\n for (let i = 0; i < areaCards.length; i += 2) {\n floorCards.push({\n type: \"horizontal-stack\",\n cards: areaCards.slice(i, i + 2),\n });\n }\n }\n\n }\n\n if (areaCards.length === 0) floorCards.pop()\n\n if (floorCards.length > 1) cards.push(...floorCards)\n\n }\n\n return {\n type: \"vertical-stack\",\n cards: cards,\n };\n }\n}\n\nexport { AggregateCard };\n","import { AbstractCard } from \"./AbstractCard\";\nimport { EntityRegistryEntry } from \"../types/homeassistant/data/entity_registry\";\nimport { TileCardConfig } from \"../types/homeassistant/lovelace/cards/types\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Alarm Card Class\n *\n * Used to create a card for controlling an entity of the fan domain.\n *\n * @class\n * @extends AbstractCard\n */\nclass AlarmCard extends AbstractCard {\n /**\n * Default configuration of the card.\n *\n * @type {TileCardConfig}\n * @private\n */\n #defaultConfig: TileCardConfig = {\n type: \"tile\",\n entity: undefined,\n icon: undefined,\n features: [\n {\n type: \"alarm-modes\",\n modes: [\"armed_home\", \"armed_away\", \"armed_night\", \"armed_vacation\", \"armed_custom_bypass\", \"disarmed\"]\n }\n ]\n };\n\n /**\n * Class constructor.\n *\n * @param {EntityRegistryEntry} entity The hass entity to create a card for.\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor(entity: EntityRegistryEntry) {\n super(entity);\n\n this.config = Object.assign(this.config, this.#defaultConfig);\n }\n}\n\nexport { AlarmCard };\n","import { SensorCard } from \"./SensorCard\";\nimport { cards } from \"../types/strategy/cards\";\nimport { EntityRegistryEntry } from \"../types/homeassistant/data/entity_registry\";\nimport { EntityCardConfig } from \"../types/lovelace-mushroom/cards/entity-card-config\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Sensor Card Class\n *\n * Used to create a card for controlling an entity of the binary_sensor domain.\n *\n * @class\n * @extends SensorCard\n */\nclass BinarySensorCard extends SensorCard {\n /**\n * Default configuration of the card.\n *\n * @type {EntityCardConfig}\n * @private\n */\n #defaultConfig: EntityCardConfig = {\n type: \"tile\",\n icon: undefined,\n state_content: \"last_changed\",\n vertical: false,\n };\n\n /**\n * Class constructor.\n *\n * @param {EntityRegistryEntry} entity The hass entity to create a card for.\n * @param {cards.EntityCardOptions} [options={}] Options for the card.\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor(entity: EntityRegistryEntry, options: cards.EntityCardOptions = {}) {\n super(entity);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport { BinarySensorCard };\n","import {AbstractCard} from \"./AbstractCard\";\nimport {cards} from \"../types/strategy/cards\";\nimport {EntityRegistryEntry} from \"../types/homeassistant/data/entity_registry\";\nimport {PictureEntityCardConfig} from \"../types/homeassistant/panels/lovelave/cards/types\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Camera Card Class\n *\n * Used to create a card for controlling an entity of the camera domain.\n *\n * @class\n * @extends AbstractCard\n */\nclass CameraCard extends AbstractCard {\n /**\n * Default configuration of the card.\n *\n * @type {PictureEntityCardConfig}\n * @private\n */\n #defaultConfig: PictureEntityCardConfig = {\n entity: \"\",\n type: \"picture-entity\",\n show_name: false,\n show_state: false,\n camera_view: \"live\",\n };\n\n /**\n * Class constructor.\n *\n * @param {EntityRegistryEntry} entity The hass entity to create a card for.\n * @param {cards.PictureEntityCardOptions} [options={}] Options for the card.\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor(entity: EntityRegistryEntry, options: cards.PictureEntityCardOptions = {}) {\n super(entity);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport {CameraCard};\n","import { AbstractCard } from \"./AbstractCard\";\nimport { cards } from \"../types/strategy/cards\";\nimport { EntityRegistryEntry } from \"../types/homeassistant/data/entity_registry\";\nimport { ClimateCardConfig } from \"../types/lovelace-mushroom/cards/climate-card-config\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Climate Card Class\n *\n * Used to create a card for controlling an entity of the climate domain.\n *\n * @class\n * @extends AbstractCard\n */\nclass ClimateCard extends AbstractCard {\n /**\n * Default configuration of the card.\n *\n * @type {ClimateCardConfig}\n * @private\n */\n #defaultConfig: ClimateCardConfig = {\n type: \"thermostat\",\n icon: undefined,\n show_current_as_primary: true,\n vertical: false,\n features: [\n {\n type: \"target-temperature\"\n },\n {\n type: \"climate-preset-modes\",\n style: \"icons\",\n preset_modes: [\"home\", \"eco\", \"comfort\", \"away\", \"boost\"]\n },\n {\n type: \"climate-hvac-modes\",\n hvac_modes: [\n \"auto\",\n \"heat_cool\",\n \"heat\",\n \"cool\",\n \"dry\",\n \"fan_only\",\n \"off\",\n ]\n },\n {\n type: \"climate-fan-modes\",\n style: \"icons\",\n fan_modes: [\n \"off\",\n \"low\",\n \"medium\",\n \"high\",\n ]\n }\n ],\n\n layout_options: {\n grid_columns: 2,\n grid_rows: 1,\n },\n };\n\n /**\n * Class constructor.\n *\n * @param {EntityRegistryEntry} entity The hass entity to create a card for.\n * @param {cards.ClimateCardOptions} [options={}] Options for the card.\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor(entity: EntityRegistryEntry, options: cards.ClimateCardOptions = {}) {\n super(entity);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport { ClimateCard };\n","import { cards } from \"../types/strategy/cards\";\nimport { LovelaceBadgeConfig, LovelaceCardConfig } from \"../types/homeassistant/data/lovelace\";\nimport { Helper } from \"../Helper\";\nimport { getMAEntity, navigateTo } from \"../utils\";\nimport { HassServiceTarget } from \"home-assistant-js-websocket\";\n\n/**\n * Controller Card class.\n *\n * Used for creating a Title Card with controls.\n *\n * @class\n */\nclass ControllerCard {\n /**\n * @type {ExtendedHassServiceTarget} The target to control the entities of.\n * @private\n */\n readonly #target: HassServiceTarget;\n\n /**\n * @type {string} The target to control the entities of.\n * @private\n */\n readonly #domain: string;\n\n /**\n * @type {string} The target to control the entities of.\n * @private\n */\n readonly #magic_device_id: string;\n\n /**\n * Default configuration of the card.\n *\n * @type {cards.ControllerCardConfig}\n * @private\n */\n readonly #defaultConfig: cards.ControllerCardConfig = {\n type: \"custom:mushroom-title-card\",\n showControls: true,\n iconOn: \"mdi:power-on\",\n iconOff: \"mdi:power-off\",\n onService: \"none\",\n offService: \"none\",\n };\n\n /**\n * Class constructor.\n *\n * @param {HassServiceTarget} target The target to control the entities of.\n * @param {cards.ControllerCardOptions} options Controller Card options.\n */\n constructor(target: HassServiceTarget, options: cards.ControllerCardOptions = {}, domain: string, magic_device_id: string = \"global\") {\n this.#target = target;\n this.#domain = domain;\n this.#magic_device_id = magic_device_id;\n this.#defaultConfig = {\n ...this.#defaultConfig,\n ...options,\n };\n }\n\n /**\n * Create a Controller card.\n *\n * @return {LovelaceCardConfig[]} A Controller card.\n */\n createCard(): LovelaceCardConfig[] {\n const cards: LovelaceCardConfig[] = [];\n\n if (this.#defaultConfig.title) {\n cards.push({\n type: \"heading\",\n heading: this.#defaultConfig.title ?? \"No title\",\n icon: this.#defaultConfig.titleIcon,\n heading_style: \"title\",\n badges: [],\n layout_options: {\n grid_columns: \"full\",\n grid_rows: 1\n },\n ...(this.#defaultConfig.titleNavigate && {\n tap_action: navigateTo(this.#defaultConfig.titleNavigate)\n })\n })\n }\n\n if (this.#defaultConfig.subtitle) {\n cards.push({\n type: \"heading\",\n heading_style: \"subtitle\",\n badges: [],\n heading: this.#defaultConfig.subtitle,\n icon: this.#defaultConfig.subtitleIcon,\n layout_options: {\n grid_columns: \"full\",\n grid_rows: 1\n },\n ...(this.#defaultConfig.subtitleNavigate && {\n tap_action: navigateTo(this.#defaultConfig.subtitleNavigate),\n })\n })\n }\n\n if (this.#defaultConfig.showControls || this.#defaultConfig.extraControls) {\n\n const magic_device = Helper.magicAreasDevices[this.#magic_device_id ?? \"\"]\n const badges: LovelaceBadgeConfig[] = [];\n\n if (this.#defaultConfig.showControls) {\n\n const chipModule = Helper.strategyOptions.domains[this.#domain]?.controlChip;\n const chipOptions = {\n show_content: true,\n magic_device_id: this.#magic_device_id,\n tap_action: { action: \"more-info\" },\n ...this.#defaultConfig.controlChipOptions,\n };\n const chip = typeof chipModule === 'function' && new chipModule(chipOptions).getChip();\n\n badges.push({\n type: \"custom:mushroom-chips-card\",\n chips: [chip],\n card_mod: {\n style: `\n ha-card {\n min-width: 80px;\n }\n `,\n }\n });\n }\n\n if (magic_device && this.#defaultConfig.extraControls) {\n badges.push(...this.#defaultConfig.extraControls(magic_device)?.map((chip: any) => {\n return {\n type: \"custom:mushroom-chips-card\",\n chips: [chip]\n }\n }));\n }\n\n if (cards[0]?.badges && badges.length) {\n cards[0].badges = badges;\n }\n }\n\n return cards;\n }\n}\n\nexport { ControllerCard };\n","import {AbstractCard} from \"./AbstractCard\";\nimport {cards} from \"../types/strategy/cards\";\nimport {EntityRegistryEntry} from \"../types/homeassistant/data/entity_registry\";\nimport {CoverCardConfig} from \"../types/lovelace-mushroom/cards/cover-card-config\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Cover Card Class\n *\n * Used to create a card for controlling an entity of the cover domain.\n *\n * @class\n * @extends AbstractCard\n */\nclass CoverCard extends AbstractCard {\n /**\n * Default configuration of the card.\n *\n * @type {CoverCardConfig}\n * @private\n */\n #defaultConfig: CoverCardConfig = {\n type: \"tile\",\n icon: undefined,\n features: [\n {\n type: \"cover-open-close\"\n }\n ]\n };\n\n /**\n * Class constructor.\n *\n * @param {EntityRegistryEntry} entity The hass entity to create a card for.\n * @param {cards.CoverCardOptions} [options={}] Options for the card.\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor(entity: EntityRegistryEntry, options: cards.CoverCardOptions = {}) {\n super(entity);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport {CoverCard};\n","import {AbstractCard} from \"./AbstractCard\";\nimport {cards} from \"../types/strategy/cards\";\nimport {EntityRegistryEntry} from \"../types/homeassistant/data/entity_registry\";\nimport {FanCardConfig} from \"../types/lovelace-mushroom/cards/fan-card-config\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Fan Card Class\n *\n * Used to create a card for controlling an entity of the fan domain.\n *\n * @class\n * @extends AbstractCard\n */\nclass FanCard extends AbstractCard {\n /**\n * Default configuration of the card.\n *\n * @type {FanCardConfig}\n * @private\n */\n #defaultConfig: FanCardConfig = {\n type: \"tile\",\n icon: undefined,\n features:[\n {\n type: \"fan-speed\"\n }\n ]\n };\n\n /**\n * Class constructor.\n *\n * @param {EntityRegistryEntry} entity The hass entity to create a card for.\n * @param {cards.FanCardOptions} [options={}] Options for the card.\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor(entity: EntityRegistryEntry, options: cards.FanCardOptions = {}) {\n super(entity);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport {FanCard};\n","import { AbstractCard } from \"./AbstractCard\";\nimport { cards } from \"../types/strategy/cards\";\nimport { TemplateCardConfig } from \"../types/lovelace-mushroom/cards/template-card-config\";\nimport { Helper } from \"../Helper\";\nimport { ControlChip } from \"../chips/ControlChip\";\nimport { AggregateChip } from \"../chips/AggregateChip\";\nimport { AreaStateChip } from \"../chips/AreaStateChip\";\nimport { generic } from \"../types/strategy/generic\";\nimport StrategyArea = generic.StrategyArea;\nimport MagicAreaRegistryEntry = generic.MagicAreaRegistryEntry;\nimport { getAreaName, getMAEntity, slugify } from \"../utils\";\nimport { EntityRegistryEntry } from \"../types/homeassistant/data/entity_registry\";\nimport { ClimateChip } from \"../chips/ClimateChip\";\nimport { LightChip } from \"../chips/LightChip\";\nimport { ConditionalChip } from \"../chips/ConditionalChip\";\nimport { UNAVAILABLE, UNDISCLOSED } from \"../variables\";\n\n// Utility function to generate badge icon and color\nconst getBadgeIcon = (entityId: string) => `\n {% set bl = states('${entityId}') %}\n {% if bl == 'unknown' or bl == 'unavailable' %}\n {% elif bl | int() < 10 %} mdi:battery-outline\n {% elif bl | int() < 20 %} mdi:battery-10\n {% elif bl | int() < 30 %} mdi:battery-20\n {% elif bl | int() < 40 %} mdi:battery-30\n {% elif bl | int() < 50 %} mdi:battery-40\n {% elif bl | int() < 60 %} mdi:battery-50\n {% elif bl | int() < 70 %} mdi:battery-60\n {% elif bl | int() < 80 %} mdi:battery-70\n {% elif bl | int() < 90 %} mdi:battery-80\n {% elif bl | int() < 100 %} mdi:battery-90\n {% elif bl | int() == 100 %} mdi:battery\n {% else %} mdi:battery-unknown\n {% endif %}\n`;\n\nconst getBadgeColor = (entityId: string) => `\n {% set bl = states('${entityId}') %}\n {% if bl == 'unknown' or bl == 'unavailable' %} disabled\n {% elif bl | int() < 10 %} red\n {% elif bl | int() < 20 %} red\n {% elif bl | int() < 30 %} red\n {% elif bl | int() < 40 %} orange\n {% elif bl | int() < 50 %} orange\n {% elif bl | int() < 60 %} green\n {% elif bl | int() < 70 %} green\n {% elif bl | int() < 80 %} green\n {% elif bl | int() < 90 %} green\n {% elif bl | int() == 100 %} green\n {% else %} disabled\n {% endif %}\n`;\n\nclass HomeAreaCard extends AbstractCard {\n constructor(options: cards.HomeAreaCardOptions) {\n\n const magicAreasEntity: EntityRegistryEntry = getMAEntity(options.area_slug, \"area_state\") as EntityRegistryEntry;\n\n const area = Helper.areas[options.area_slug];\n\n super(magicAreasEntity);\n const defaultConfig = options?.area_slug === UNDISCLOSED ? this.getUndisclosedAreaConfig(area) : this.getDefaultConfig(area);\n this.config = { ...this.config, ...defaultConfig, ...options };\n }\n\n getDefaultConfig(area: StrategyArea): TemplateCardConfig {\n\n const device = Helper.magicAreasDevices[area.slug];\n\n const { area_state, all_lights, aggregate_temperature, aggregate_battery, aggregate_health, aggregate_window, aggregate_door, aggregate_cover, aggregate_climate, light_control } = device?.entities || {};\n const icon = area.icon || \"mdi:home-outline\";\n\n const cards = [\n this.getMainCard(area, icon, aggregate_temperature, aggregate_battery, area_state),\n ];\n\n if (device) {\n cards.push(this.getChipsCard(area, device, area_state, aggregate_health, aggregate_window, aggregate_door, aggregate_cover, aggregate_climate, all_lights, light_control))\n }\n\n if (all_lights) {\n cards.push(this.getLightCard(all_lights));\n }\n\n return {\n type: \"custom:stack-in-card\",\n cards: cards\n };\n }\n\n getUndisclosedAreaConfig(area: StrategyArea): TemplateCardConfig {\n return {\n type: \"custom:mushroom-template-card\",\n primary: getAreaName(area),\n icon: \"mdi:devices\",\n icon_color: \"grey\",\n fill_container: true,\n layout: \"horizontal\",\n tap_action: { action: \"navigate\", navigation_path: area.slug },\n card_mod: { style: this.getCardModStyle() }\n };\n }\n\n getMainCard(area: StrategyArea, icon: string, aggregate_temperature: EntityRegistryEntry, aggregate_battery: EntityRegistryEntry, area_state: EntityRegistryEntry): any {\n return {\n type: \"custom:mushroom-template-card\",\n primary: getAreaName(area),\n secondary: aggregate_temperature && this.getTemperatureTemplate(aggregate_temperature),\n icon: icon,\n icon_color: this.getIconColorTemplate(area_state),\n fill_container: true,\n layout: \"horizontal\",\n badge_icon: getBadgeIcon(aggregate_battery?.entity_id),\n badge_color: getBadgeColor(aggregate_battery?.entity_id),\n tap_action: { action: \"navigate\", navigation_path: slugify(area.name) },\n card_mod: { style: this.getCardModStyle() }\n };\n }\n\n getChipsCard(area: StrategyArea, device: MagicAreaRegistryEntry, area_state: EntityRegistryEntry, aggregate_health: EntityRegistryEntry, aggregate_window: EntityRegistryEntry, aggregate_door: EntityRegistryEntry, aggregate_cover: EntityRegistryEntry, aggregate_climate: EntityRegistryEntry, all_lights: EntityRegistryEntry, light_control: EntityRegistryEntry): any {\n return {\n type: \"custom:mushroom-chips-card\",\n alignment: \"end\",\n chips: [\n new ConditionalChip(\n [{ entity: area_state?.entity_id, state_not: UNAVAILABLE }],\n new AreaStateChip(device).getChip()\n ).getChip(),\n new ConditionalChip(\n [{ entity: aggregate_health?.entity_id, state_not: \"on\" }],\n new AggregateChip({ device_class: \"health\" }).getChip()\n ).getChip(),\n new ConditionalChip(\n [{ entity: aggregate_window?.entity_id, state: \"on\" }],\n new AggregateChip({ magic_device_id: area.slug, area_slug: area.slug, device_class: \"window\", show_content: false }).getChip()\n ).getChip(),\n new ConditionalChip(\n [{ entity: aggregate_door?.entity_id, state: \"on\" }],\n new AggregateChip({ magic_device_id: area.slug, area_slug: area.slug, device_class: \"door\", show_content: false }).getChip()\n ).getChip(),\n new ConditionalChip(\n [{ entity: aggregate_cover?.entity_id, state: \"on\" }],\n new AggregateChip({ magic_device_id: area.slug, area_slug: area.slug, device_class: \"cover\", show_content: false }).getChip()\n ).getChip(),\n new ConditionalChip(\n [{ entity: aggregate_climate?.entity_id, state_not: UNAVAILABLE }],\n new ClimateChip({ magic_device_id: area.slug, area_slug: area.slug }).getChip()\n ).getChip(),\n new ConditionalChip(\n [{ entity: all_lights?.entity_id, state_not: UNAVAILABLE, }],\n new LightChip({ area_slug: area.slug, magic_device_id: area.slug, tap_action: { action: \"toggle\" } }).getChip()\n ).getChip(),\n new ConditionalChip(\n [{ entity: all_lights?.entity_id, state_not: UNAVAILABLE }],\n new ControlChip(\"light\", light_control?.entity_id).getChip()\n ).getChip()\n ].filter(Boolean),\n card_mod: { style: this.getChipsCardModStyle() }\n };\n }\n\n getLightCard(all_lights: EntityRegistryEntry): any {\n return {\n type: \"tile\",\n features: [{ type: \"light-brightness\" }],\n hide_state: true,\n entity: all_lights.entity_id,\n card_mod: { style: this.getLightCardModStyle() }\n };\n }\n\n getTemperatureTemplate(aggregate_temperature: EntityRegistryEntry): string {\n if (!aggregate_temperature) return Helper.getAverageStateTemplate(\"temperature\");\n return `\n {% set t = states('${aggregate_temperature?.entity_id}') %}\n {% if t != 'unknown' and t != 'unavailable' %}\n {{ t | float | round(1) }}{{ state_attr('${aggregate_temperature?.entity_id}', 'unit_of_measurement')}}\n {% endif %}\n `;\n }\n\n getIconColorTemplate(area_state: EntityRegistryEntry): string {\n return `\n {{ \"indigo\" if \"dark\" in state_attr('${area_state?.entity_id}', 'states') else \"amber\" }}\n `;\n }\n\n getCardModStyle(): string {\n return `\n :host {\n background: #1f1f1f;\n height: 66px;\n }\n mushroom-badge-icon {\n left: 24px;\n top: 0px;\n }\n ha-card {\n box-shadow: none!important;\n border: none;\n }\n ha-state-icon {\n --icon-symbol-size: 40px;\n }\n\n `;\n }\n\n getChipsCardModStyle(): string {\n return `\n ha-card {\n --chip-box-shadow: none;\n --chip-spacing: 0px;\n width: -webkit-fill-available;\n margin-top: -12px;\n }\n `;\n }\n\n getLightCardModStyle(): string {\n return `\n ha-card {\n box-shadow: none!important;\n border: none;\n margin-top: -12px;\n }\n ha-tile-icon {\n display: none;\n }\n ha-tile-info {\n display: none;\n }\n `;\n }\n}\n\nexport { HomeAreaCard };\n","import { cards } from \"../types/strategy/cards\";\nimport { LovelaceCardConfig } from \"../types/homeassistant/data/lovelace\";\n\n\nexport interface ImageAreaCardConfig extends LovelaceCardConfig {\n type: \"area\";\n area: string;\n show_camera: boolean;\n alert_classes?: string[];\n sensor_classes?: string[];\n card_mod?: {\n style: string;\n };\n}\n\n/**\n * Scene Card Class\n *\n * Used to create a card for an entity of the Scene domain.\n *\n * @class\n */\nclass ImageAreaCard {\n /**\n * Configuration of the card.\n *\n * @type {EntityCardConfig}\n */\n config: ImageAreaCardConfig = {\n type: \"area\",\n area: \"\",\n show_camera: true,\n alert_classes: [],\n sensor_classes: [],\n card_mod: {\n style: `\n .sensors {\n display: none;\n }\n .buttons {\n display: none;\n }\n `\n }\n };\n\n /**\n * Class constructor.\n *\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor(area_slug: string) {\n\n this.config.area = area_slug;\n }\n\n /**\n * Get a card.\n *\n * @return {cards.AbstractCardConfig} A card object.\n */\n getCard(): cards.AbstractCardConfig {\n return this.config;\n }\n}\n\nexport { ImageAreaCard };\n","import {AbstractCard} from \"./AbstractCard\";\nimport {cards} from \"../types/strategy/cards\";\nimport {EntityRegistryEntry} from \"../types/homeassistant/data/entity_registry\";\nimport {LightCardConfig} from \"../types/lovelace-mushroom/cards/light-card-config\";\nimport {generic} from \"../types/strategy/generic\";\nimport isCallServiceActionConfig = generic.isCallServiceActionConfig;\nimport isCallServiceActionTarget = generic.isCallServiceActionTarget;\n\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Light Card Class\n *\n * Used to create a card for controlling an entity of the light domain.\n *\n * @class\n * @extends AbstractCard\n */\nclass LightCard extends AbstractCard {\n /**\n * Default configuration of the card.\n *\n * @type {LightCardConfig}\n * @private\n */\n #defaultConfig: LightCardConfig = {\n type: \"tile\",\n icon: undefined,\n vertical: false,\n };\n\n /**\n * Class constructor.\n *\n * @param {EntityRegistryEntry} entity The hass entity to create a card for.\n * @param {cards.LightCardOptions} [options={}] Options for the card.\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor(entity: EntityRegistryEntry, options: cards.LightCardOptions = {}) {\n super(entity);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport {LightCard};\n","import {AbstractCard} from \"./AbstractCard\";\nimport {cards} from \"../types/strategy/cards\";\nimport {EntityRegistryEntry} from \"../types/homeassistant/data/entity_registry\";\nimport {LockCardConfig} from \"../types/lovelace-mushroom/cards/lock-card-config\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Lock Card Class\n *\n * Used to create a card for controlling an entity of the lock domain.\n *\n * @class\n * @extends AbstractCard\n */\nclass LockCard extends AbstractCard {\n /**\n * Default configuration of the card.\n *\n * @type {LockCardConfig}\n * @private\n */\n #defaultConfig: LockCardConfig = {\n type: \"custom:mushroom-lock-card\",\n icon: undefined,\n };\n\n /**\n * Class constructor.\n *\n * @param {EntityRegistryEntry} entity The hass entity to create a card for.\n * @param {cards.LockCardOptions} [options={}] Options for the card.\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor(entity: EntityRegistryEntry, options: cards.LockCardOptions = {}) {\n super(entity);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport {LockCard};\n","import {AbstractCard} from \"./AbstractCard\";\nimport {cards} from \"../types/strategy/cards\";\nimport {EntityRegistryEntry} from \"../types/homeassistant/data/entity_registry\";\nimport {MediaPlayerCardConfig} from \"../types/lovelace-mushroom/cards/media-player-card-config\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Mediaplayer Card Class\n *\n * Used to create a card for controlling an entity of the media_player domain.\n *\n * @class\n * @extends AbstractCard\n */\nclass MediaPlayerCard extends AbstractCard {\n /**\n * Default configuration of the card.\n *\n * @type {MediaPlayerCardConfig}\n * @private\n */\n #defaultConfig: MediaPlayerCardConfig = {\n type: \"custom:mushroom-media-player-card\",\n use_media_info: true,\n media_controls: [\n \"on_off\",\n \"play_pause_stop\",\n ],\n show_volume_level: true,\n volume_controls: [\n \"volume_mute\",\n \"volume_set\",\n \"volume_buttons\",\n ],\n };\n\n /**\n * Class constructor.\n *\n * @param {EntityRegistryEntry} entity The hass entity to create a card for.\n * @param {cards.MediaPlayerCardOptions} [options={}] Options for the card.\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor(entity: EntityRegistryEntry, options: cards.MediaPlayerCardOptions = {}) {\n super(entity);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport {MediaPlayerCard};\n","import {AbstractCard} from \"./AbstractCard\";\nimport {cards} from \"../types/strategy/cards\";\nimport {EntityRegistryEntry} from \"../types/homeassistant/data/entity_registry\";\nimport {EntityCardConfig} from \"../types/lovelace-mushroom/cards/entity-card-config\";\n\n/**\n * Miscellaneous Card Class\n *\n * Used to create a card an entity of any domain.\n *\n * @class\n * @extends AbstractCard\n */\nclass MiscellaneousCard extends AbstractCard {\n /**\n * Default configuration of the card.\n *\n * @type {EntityCardConfig}\n * @private\n */\n #defaultConfig: EntityCardConfig = {\n type: \"tile\",\n icon: undefined,\n vertical: false,\n };\n\n /**\n * Class constructor.\n *\n * @param {EntityRegistryEntry} entity The hass entity to create a card for.\n * @param {cards.EntityCardOptions} [options={}] Options for the card.\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor(entity: EntityRegistryEntry, options: cards.EntityCardOptions = {}) {\n super(entity);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport {MiscellaneousCard};\n","import {AbstractCard} from \"./AbstractCard\";\nimport {cards} from \"../types/strategy/cards\";\nimport {EntityRegistryEntry} from \"../types/homeassistant/data/entity_registry\";\nimport {NumberCardConfig} from \"../types/lovelace-mushroom/cards/number-card-config\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported\n/**\n * Number Card Class\n *\n * Used to create a card for controlling an entity of the number domain.\n *\n * @class\n * @extends AbstractCard\n */\nclass NumberCard extends AbstractCard {\n /**\n * Default configuration of the card.\n *\n * @type {NumberCardConfig}\n * @private\n */\n #defaultConfig: NumberCardConfig = {\n type: \"custom:mushroom-number-card\",\n icon: undefined,\n };\n\n /**\n * Class constructor.\n *\n * @param {EntityRegistryEntry} entity The hass entity to create a card for.\n * @param {cards.NumberCardOptions} [options={}] Options for the card.\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor(entity: EntityRegistryEntry, options: cards.NumberCardOptions = {}) {\n super(entity);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport {NumberCard};\n","import { AbstractCard } from \"./AbstractCard\";\nimport { cards } from \"../types/strategy/cards\";\nimport { EntityRegistryEntry } from \"../types/homeassistant/data/entity_registry\";\nimport { PersonCardConfig } from \"../types/lovelace-mushroom/cards/person-card-config\";\n\n/**\n * Person Card Class\n *\n * Used to create a card for an entity of the Person domain.\n *\n * @class\n * @extends AbstractCard\n */\nclass PersonCard extends AbstractCard {\n /**\n * Default configuration of the card.\n *\n * @type {PersonCardConfig}\n * @private\n */\n #defaultConfig: PersonCardConfig = {\n type: \"custom:mushroom-person-card\",\n icon_type: \"entity-picture\",\n };\n\n /**\n * Class constructor.\n *\n * @param {EntityRegistryEntry} entity The hass entity to create a card for.\n * @param {cards.PersonCardOptions} [options={}] Options for the card.\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor(entity: EntityRegistryEntry, options: cards.PersonCardOptions = {}) {\n super(entity);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport { PersonCard };\n","import {AbstractCard} from \"./AbstractCard\";\nimport {cards} from \"../types/strategy/cards\";\nimport {EntityRegistryEntry} from \"../types/homeassistant/data/entity_registry\";\nimport { SceneCardConfig } from \"../types/lovelace-mushroom/cards/scene-card-config\";\n\n/**\n * Scene Card Class\n *\n * Used to create a card for an entity of the Scene domain.\n *\n * @class\n * @extends AbstractCard\n */\nclass SceneCard extends AbstractCard {\n /**\n * Default configuration of the card.\n *\n * @type {SceneCardConfig}\n * @private\n */\n #defaultConfig: SceneCardConfig = {\n type: \"tile\",\n icon: undefined,\n vertical: false,\n icon_type: \"entity-picture\",\n };\n\n /**\n * Class constructor.\n *\n * @param {EntityRegistryEntry} entity The hass entity to create a card for.\n * @param {cards.SceneCardOptions} [options={}] Options for the card.\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor(entity: EntityRegistryEntry, options: cards.SceneCardOptions = {}) {\n super(entity);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport {SceneCard};\n","import {AbstractCard} from \"./AbstractCard\";\nimport {cards} from \"../types/strategy/cards\";\nimport {EntityRegistryEntry} from \"../types/homeassistant/data/entity_registry\";\nimport {EntityCardConfig} from \"../types/lovelace-mushroom/cards/entity-card-config\";\n\n/**\n * Sensor Card Class\n *\n * Used to create a card for controlling an entity of the sensor domain.\n *\n * @class\n * @extends AbstractCard\n */\nclass SensorCard extends AbstractCard {\n /**\n * Default configuration of the card.\n *\n * @type {EntityCardConfig}\n * @private\n */\n #defaultConfig: EntityCardConfig = {\n type: \"custom:mushroom-entity-card\",\n icon: \"mdi:information\",\n animate: true,\n line_color: \"green\",\n };\n\n /**\n * Class constructor.\n *\n * @param {EntityRegistryEntry} entity The hass entity to create a card for.\n * @param {cards.EntityCardOptions} [options={}] Options for the card.\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor(entity: EntityRegistryEntry, options: cards.EntityCardOptions = {}) {\n super(entity);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport {SensorCard};\n","import {AbstractCard} from \"./AbstractCard\";\nimport { SwipeCardConfig } from \"../types/lovelace-mushroom/cards/swipe-card-config\";\nimport { SwiperOptions } from \"swiper/types/swiper-options\";\nimport { EntityCardConfig } from \"../types/lovelace-mushroom/cards/entity-card-config\";\n\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Swipe Card Class\n *\n * Used to create a card for controlling an entity of the light domain.\n *\n * @class\n * @extends AbstractCard\n */\nclass SwipeCard {\n\n /**\n * Configuration of the card.\n *\n * @type {SwipeCardConfig}\n */\n config: SwipeCardConfig = {\n type: \"custom:swipe-card\",\n start_card: 1,\n parameters: {\n centeredSlides: false,\n followFinger: true,\n spaceBetween: 16,\n grabCursor: true,\n },\n cards: [],\n };\n\n /**\n * Class constructor.\n *\n * @param {AbstractCard[]} cards The hass entity to create a card for.\n * @param {SwiperOptions} [options={}] Options for the card.\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor(cards: (AbstractCard | EntityCardConfig)[], options?: SwiperOptions) {\n\n this.config.cards = cards;\n\n const multipleSlicesPerView = 2.2\n const slidesPerView = cards.length > 2 ? multipleSlicesPerView : cards.length ?? 1\n\n this.config.parameters = {...this.config.parameters, slidesPerView, ...options};\n }\n\n /**\n * Get a card.\n *\n * @return {SwipeCardConfig} A card object.\n */\n getCard(): SwipeCardConfig {\n return {\n ...this.config,\n };\n }\n}\n\nexport {SwipeCard};\n","import {AbstractCard} from \"./AbstractCard\";\nimport {cards} from \"../types/strategy/cards\";\nimport {EntityRegistryEntry} from \"../types/homeassistant/data/entity_registry\";\nimport {EntityCardConfig} from \"../types/lovelace-mushroom/cards/entity-card-config\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Switch Card Class\n *\n * Used to create a card for controlling an entity of the switch domain.\n *\n * @class\n * @extends AbstractCard\n */\nclass SwitchCard extends AbstractCard {\n /**\n * Default configuration of the card.\n *\n * @type {EntityCardConfig}\n * @private\n */\n #defaultConfig: EntityCardConfig = {\n type: \"tile\",\n icon: undefined,\n vertical: false,\n tap_action: {\n action: \"toggle\",\n },\n };\n\n /**\n * Class constructor.\n *\n * @param {EntityRegistryEntry} entity The hass entity to create a card for.\n * @param {cards.EntityCardOptions} [options={}] Options for the card.\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor(entity: EntityRegistryEntry, options: cards.EntityCardOptions = {}) {\n super(entity);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport {SwitchCard};\n","import {AbstractCard} from \"./AbstractCard\";\nimport {cards} from \"../types/strategy/cards\";\nimport {EntityRegistryEntry} from \"../types/homeassistant/data/entity_registry\";\nimport {VACUUM_COMMANDS, VacuumCardConfig} from \"../types/lovelace-mushroom/cards/vacuum-card-config\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Vacuum Card Class\n *\n * Used to create a card for controlling an entity of the vacuum domain.\n *\n * @class\n * @extends AbstractCard\n */\nclass VacuumCard extends AbstractCard {\n /**\n * Default configuration of the card.\n *\n * @type {VacuumCardConfig}\n * @private\n */\n #defaultConfig: VacuumCardConfig = {\n type: \"custom:mushroom-vacuum-card\",\n icon: undefined,\n icon_animation: true,\n commands: [...VACUUM_COMMANDS],\n tap_action: {\n action: \"more-info\",\n }\n };\n\n /**\n * Class constructor.\n *\n * @param {EntityRegistryEntry} entity The hass entity to create a card for.\n * @param {cards.VacuumCardOptions} [options={}] Options for the card.\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor(entity: EntityRegistryEntry, options: cards.VacuumCardOptions = {}) {\n super(entity);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport {VacuumCard};\n","import { HassServiceTarget } from \"home-assistant-js-websocket\";\nimport { LovelaceChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { Helper } from \"../Helper\";\nimport { generic } from \"../types/strategy/generic\";\nimport isCallServiceActionConfig = generic.isCallServiceActionConfig;\n\n/**\n * Abstract Chip class.\n *\n * To create a new chip, extend this one.\n *\n * @class\n * @abstract\n */\nabstract class AbstractChip {\n /**\n * Configuration of the chip.\n *\n * @type {LovelaceChipConfig}\n */\n config: LovelaceChipConfig = {\n type: \"template\"\n };\n\n /**\n * Class Constructor.\n */\n protected constructor() {\n if (!Helper.isInitialized()) {\n throw new Error(\"The Helper module must be initialized before using this one.\");\n }\n }\n\n // noinspection JSUnusedGlobalSymbols Method is called on dymanically imported classes.\n /**\n * Get the chip.\n *\n * @returns {LovelaceChipConfig} A chip.\n */\n getChip(): LovelaceChipConfig {\n return this.config;\n }\n\n /**\n * Set the target to switch.\n *\n * @param {HassServiceTarget} target Target to switch.\n */\n setTapActionTarget(target: HassServiceTarget) {\n if (\"tap_action\" in this.config && isCallServiceActionConfig(this.config.tap_action)) {\n this.config.tap_action.target = target;\n\n return;\n }\n\n if (Helper.debug) {\n console.warn(\n this.constructor.name\n + \" - Target not set: Invalid target or tap action.\");\n }\n }\n}\n\nexport { AbstractChip };\n","import { chips } from \"../types/strategy/chips\";\nimport { DEVICE_CLASSES } from \"../variables\";\nimport { AbstractChip } from \"./AbstractChip\";\nimport { Helper } from \"../Helper\";\nimport { navigateTo } from \"../utils\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Climate Chip class.\n *\n * Used to create a chip to indicate climate level.\n */\nclass AggregateChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @type {TemplateChipConfig | undefined}\n *\n */\n getDefaultConfig({ device_class, show_content = true, magic_device_id = \"global\", area_slug, tap_action }: chips.AggregateChipOptions) {\n\n const domain = DEVICE_CLASSES.sensor.includes(device_class) ? \"sensor\" : \"binary_sensor\"\n let icon = Helper.icons[domain][device_class]?.default\n let icon_color = \"\"\n let content = \"\"\n\n const device = Helper.magicAreasDevices[magic_device_id]\n const magicEntity = device?.entities[`aggregate_${device_class}`]\n\n if (domain === \"binary_sensor\") {\n content = show_content ? Helper.getDeviceClassCountTemplate(device_class, \"eq\", \"on\", area_slug) : \"\"\n icon_color = Helper.getBinarySensorColorFromState(device_class, \"eq\", \"on\", \"red\", \"grey\", area_slug)\n }\n\n if (domain === \"sensor\") {\n\n content = show_content ? Helper.getAverageStateTemplate(device_class, area_slug) : \"\"\n icon_color = Helper.getSensorColorFromState(device_class, area_slug!) ?? \"white\"\n icon = Helper.getSensorIconFromState(device_class, area_slug!) ?? icon\n\n if (device_class === \"illuminance\") {\n if (magicEntity) {\n icon_color = `{{ 'blue' if 'dark' in state_attr('${device?.entities.area_state?.entity_id}', 'states') else 'amber' }}`\n }\n }\n }\n\n if (device_class === \"cover\") {\n\n if (magicEntity) {\n icon_color = `{{ 'red' if is_state('${magicEntity.entity_id}', 'open') else 'grey' }}`\n content = show_content ? Helper.getDeviceClassCountTemplate(device_class, \"eq\", \"open\", area_slug) : \"\"\n }\n }\n\n if (device_class === \"health\") {\n icon_color = `{{ 'red' if is_state(entity, 'on') else 'green' }}`\n }\n\n return {\n entity: magicEntity?.entity_id,\n icon_color,\n icon,\n content: content,\n tap_action: tap_action ?? navigateTo(device_class),\n }\n }\n\n /**\n * Class Constructor.\n *\n * @param {chips.AggregateChipOptions} options The chip options.\n */\n constructor(options: chips.AggregateChipOptions) {\n super();\n\n const defaultConfig = this.getDefaultConfig(options)\n\n this.config = Object.assign(this.config, defaultConfig);\n\n }\n}\n\nexport { AggregateChip };\n","import { chips } from \"../types/strategy/chips\";\nimport { AlarmChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { AbstractChip } from \"./AbstractChip\";\nimport { navigateTo } from \"../utils\";\n\n// noinspection JSUnusedGlobalSymbols False positive.\n/**\n * Alarm Chip class.\n *\n * Used to create a chip for showing the alarm.\n */\nclass AlarmChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @private\n * @readonly\n */\n readonly #defaultConfig: AlarmChipConfig = {\n type: \"alarm-control-panel\",\n tap_action: navigateTo('security')\n };\n\n /**\n * Class Constructor.\n *\n * @param {string} entityId Id of a alarm entity.\n * @param {chips.AlarmChipOptions} options Alarm Chip options.\n */\n constructor(entityId: string, options: chips.AlarmChipOptions = {}) {\n super();\n this.#defaultConfig = {\n ...this.#defaultConfig,\n ...{ entity: entityId },\n ...options,\n };\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport { AlarmChip };\n","\nimport { Helper } from \"../Helper\";\nimport { generic } from \"../types/strategy/generic\";\nimport MagicAreaRegistryEntry = generic.MagicAreaRegistryEntry;\nimport StrategyArea = generic.StrategyArea;\nimport { LovelaceChipConfig, TemplateChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { MAGIC_AREAS_DOMAIN, TOD_ORDER } from \"../variables\";\nimport { slugify } from \"../utils\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Area selects Chips class.\n *\n * Used to create a chip to indicate climate level.\n */\nclass AreaScenesChips {\n /**\n * Configuration of the chip.\n *\n * @type {LovelaceChipConfig[]}\n */\n config: LovelaceChipConfig[] = [];\n /**\n * Default configuration of the chip.\n *\n * @type {ConditionalChipConfig}\n *\n */\n getDefaultConfig(device: MagicAreaRegistryEntry, area: StrategyArea): TemplateChipConfig[] {\n\n const selects = TOD_ORDER.map(tod => Helper.getEntityState(device?.entities[`scene_${tod as 'morning'}`]?.entity_id)).filter(Boolean)\n\n const chips = [] as TemplateChipConfig[]\n\n if (selects.find(scene => scene?.state == \"Adaptive lighting\")) {\n chips.push({\n type: \"template\",\n icon: \"mdi:theme-light-dark\",\n content: \"AD\",\n tap_action: {\n action: \"call-service\",\n service: `${MAGIC_AREAS_DOMAIN}.area_light_adapt`,\n data: {\n area: slugify(device.name),\n }\n },\n })\n }\n\n selects.forEach((scene, index) => {\n if (scene?.state === \"Scène instantanée\") {\n const entity_id = `scene.${slugify(device.name)}_${TOD_ORDER[index]}_snapshot_scene`\n chips.push({\n type: \"template\",\n entity: scene?.entity_id,\n icon: scene?.attributes.icon,\n content: TOD_ORDER[index],\n tap_action: {\n action: \"call-service\",\n service: \"scene.turn_on\",\n data: { entity_id }\n },\n hold_action: {\n action: \"more-info\"\n }\n })\n } else if (scene?.state !== \"Adaptive lighting\") {\n const sceneEntity_id = Helper.getStateEntities(area, \"scene\").find(s => s.attributes.friendly_name === scene?.state)?.entity_id\n chips.push({\n type: \"template\",\n entity: scene?.entity_id,\n icon: scene?.attributes.icon,\n content: TOD_ORDER[index],\n tap_action: {\n action: \"call-service\",\n service: \"scene.turn_on\",\n data: {\n entity_id: sceneEntity_id,\n }\n },\n hold_action: {\n action: \"more-info\"\n }\n })\n }\n })\n\n return chips\n\n }\n\n /**\n * Class Constructor.\n *\n * @param {chips.TemplateChipOptions} options The chip options.\n */\n constructor(device: MagicAreaRegistryEntry, area: StrategyArea) {\n\n this.config = this.getDefaultConfig(device, area);\n\n }\n\n\n // noinspection JSUnusedGlobalSymbols Method is called on dymanically imported classes.\n /**\n * Get the chip.\n *\n * @returns {LovelaceChipConfig} A chip.\n */\n getChips(): LovelaceChipConfig[] {\n return this.config;\n }\n}\n\nexport { AreaScenesChips };\n","import { AreaInformations } from \"../popups/AreaInformationsPopup\";\nimport { generic } from \"../types/strategy/generic\";\nimport MagicAreaRegistryEntry = generic.MagicAreaRegistryEntry;\nimport { TemplateChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { AREA_STATE_ICONS, DEVICE_ICONS } from \"../variables\";\nimport { AbstractChip } from \"./AbstractChip\";\nimport { Helper } from \"../Helper\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Area state Chip class.\n *\n * Used to create a chip to indicate area state.\n */\nclass AreaStateChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @type {ConditionalChipConfig}\n *\n */\n getDefaultConfig(device: MagicAreaRegistryEntry, showContent: boolean = false): TemplateChipConfig {\n\n const { area_state, presence_hold, all_media_players, aggregate_motion } = device?.entities ?? {}\n return {\n type: \"template\",\n entity: area_state?.entity_id,\n icon_color: `\n {% set presence_hold = states('${presence_hold?.entity_id}')%}\n {% set motion = states('${aggregate_motion?.entity_id}')%}\n {% set media_player = states('${all_media_players?.entity_id}')%}\n {% set bl = state_attr('${area_state?.entity_id}', 'states')%}\n {% if motion == 'on' %}\n red\n {% elif media_player in ['on', 'playing'] %}\n blue\n {% elif presence_hold == 'on' %}\n red\n {% elif 'sleep' in bl %}\n blue\n {% elif 'extended' in bl %}\n orange\n {% elif 'occupied' in bl %}\n grey\n {% else %}\n transparent\n {% endif %}\n `,\n icon: `\n {% set presence_hold = states('${presence_hold?.entity_id}')%}\n {% set motion = states('${aggregate_motion?.entity_id}')%}\n {% set media_player = states('${all_media_players?.entity_id}')%}\n {% set bl = state_attr('${area_state?.entity_id}', 'states')%}\n {% if motion == 'on' %}\n ${Helper.icons.binary_sensor.motion?.default}\n {% elif media_player in ['on', 'playing'] %}\n ${Helper.icons.media_player._?.default}\n {% elif presence_hold == 'on' %}\n ${DEVICE_ICONS.presence_hold}\n {% elif 'sleep' in bl %}\n ${AREA_STATE_ICONS.sleep}\n {% elif 'extended' in bl %}\n ${AREA_STATE_ICONS.extended}\n {% elif 'occupied' in bl %}\n ${AREA_STATE_ICONS.occupied}\n {% else %}\n ${AREA_STATE_ICONS.clear}\n {% endif %}`,\n content: showContent ? `\n {% set presence_hold = states('${presence_hold?.entity_id}')%}\n {% set bl = state_attr('${area_state?.entity_id}', 'states')%}\n {% if presence_hold == 'on' %}\n presence_hold\n {% elif 'sleep' in bl %}\n sleep\n {% elif 'extended' in bl %}\n extended\n {% elif 'occupied' in bl %}\n occupied\n {% else %}\n clear\n {% endif %}` : \"\",\n tap_action: new AreaInformations(device, true).getPopup() as any\n }\n }\n\n /**\n * Class Constructor.\n *\n * @param {chips.TemplateChipOptions} options The chip options.\n */\n constructor(device: MagicAreaRegistryEntry, showContent: boolean = false) {\n super();\n\n const defaultConfig = this.getDefaultConfig(device, showContent)\n\n this.config = Object.assign(this.config, defaultConfig);\n\n }\n}\n\nexport { AreaStateChip };\n","import { Helper } from \"../Helper\";\nimport { AbstractChip } from \"./AbstractChip\";\nimport { chips } from \"../types/strategy/chips\";\nimport { TemplateChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { getMAEntity } from \"../utils\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Climate Chip class.\n *\n * Used to create a chip to indicate how many climates are operating.\n */\nclass ClimateChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @type {TemplateChipConfig}\n *\n * @readonly\n * @private\n */\n readonly #defaultConfig: TemplateChipConfig = {\n type: \"template\",\n icon: \"mdi:thermostat\",\n content: \"\",\n tap_action: {\n action: \"navigate\",\n navigation_path: \"climate\",\n },\n };\n\n /**\n * Class Constructor.\n *\n * @param {chips.ChipOptions} options The chip options.\n */\n constructor(options: chips.ChipOptions = {}) {\n super();\n\n if (options?.show_content) {\n this.#defaultConfig.content = Helper.getCountTemplate(\"climate\", \"ne\", \"off\", options?.area_slug);\n }\n\n this.#defaultConfig.icon_color = Helper.getFromDomainState({ domain: \"climate\", area_slug: options?.area_slug })\n\n const magicAreasEntity = getMAEntity(options.magic_device_id ?? \"global\", \"climate\");\n\n if (magicAreasEntity) {\n this.#defaultConfig.entity = magicAreasEntity.entity_id;\n }\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport { ClimateChip };\n","import { chips } from \"../types/strategy/chips\";\nimport { ConditionalChipConfig, LovelaceChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { getMAEntity } from \"../utils\";\nimport { generic } from \"../types/strategy/generic\";\nimport MagicAreaRegistryEntry = generic.MagicAreaRegistryEntry;\nimport { AbstractChip } from \"./AbstractChip\";\n\ntype ConditionalChipOptions = Omit\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Motion Chip class.\n *\n * Used to create a chip to indicate how many motions are operating.\n */\nclass ConditionalChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @type {ConditionalChipConfig}\n *\n * @readonly\n * @private\n */\n readonly #defaultConfig: ConditionalChipConfig = {\n type: \"conditional\",\n };\n\n /**\n * Class Constructor.\n *\n * @param {MagicAreaRegistryEntry} device The chip device.\n * @param {ConditionalChipOptions} options The chip options.\n */\n constructor(conditions: [{ entity: string; state_not: string; } | { entity: string; state: string; }], chip: LovelaceChipConfig) {\n super();\n\n this.#defaultConfig.conditions = conditions;\n this.#defaultConfig.chip = chip;\n\n\n this.config = Object.assign(this.config, this.#defaultConfig);\n }\n}\n\nexport { ConditionalChip };\n","import { AbstractChip } from \"./AbstractChip\";\nimport { TemplateChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { AREA_CONTROL_ICONS } from \"../variables\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Control Chip class.\n *\n * Used to create a chip to indicate how many lights are on and to turn all off.\n */\nclass ControlChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @type {TemplateChipConfig}\n *\n * @readonly\n * @private\n */\n readonly #defaultConfig: TemplateChipConfig = {\n type: \"template\",\n entity: undefined,\n content: \"\",\n icon: AREA_CONTROL_ICONS.media_player,\n icon_color: \"green\",\n tap_action: {\n action: \"more-info\"\n },\n };\n\n /**\n * Class Constructor.\n *\n * @param {chips.TemplateChipOptions} options The chip options.\n */\n constructor(domain: string, entity_id: string) {\n super();\n\n this.#defaultConfig.entity = entity_id\n this.#defaultConfig.icon = AREA_CONTROL_ICONS[domain as \"media_player\"]\n this.#defaultConfig.icon_color = `{{ \"green\" if states(\"${entity_id}\") == \"on\" else \"red\" }}`;\n\n this.config = Object.assign(this.config, this.#defaultConfig);\n\n }\n}\n\nexport { ControlChip };\n","import { Helper } from \"../Helper\";\nimport { chips } from \"../types/strategy/chips\";\nimport { AbstractChip } from \"./AbstractChip\";\nimport { TemplateChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Cover Chip class.\n *\n * Used to create a chip to indicate how many covers aren't closed.\n */\nclass CoverChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @type {TemplateChipConfig}\n *\n * @readonly\n * @private\n */\n readonly #defaultConfig: TemplateChipConfig = {\n type: \"template\",\n icon: \"mdi:window-open\",\n content: \"\",\n tap_action: {\n action: \"navigate\",\n navigation_path: \"cover\",\n },\n };\n\n /**\n * Class Constructor.\n *\n * @param {chips.ChipOptions} options The chip options.\n */\n constructor(options: chips.ChipOptions = {}) {\n super();\n\n if (options?.show_content) {\n this.#defaultConfig.content = Helper.getCountTemplate(\"cover\", \"eq\", \"open\", options?.area_slug);\n }\n\n this.#defaultConfig.icon_color = Helper.getFromDomainState({ domain: \"cover\", area_slug: options?.area_slug })\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport { CoverChip };\n","import { Helper } from \"../Helper\";\nimport { chips } from \"../types/strategy/chips\";\nimport { AbstractChip } from \"./AbstractChip\";\nimport { TemplateChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Fan Chip class.\n *\n * Used to create a chip to indicate how many fans are on and to turn all off.\n */\nclass FanChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @type {TemplateChipConfig}\n *\n * @readonly\n * @private\n */\n readonly #defaultConfig: TemplateChipConfig = {\n type: \"template\",\n icon: \"mdi:fan\",\n content: Helper.getCountTemplate(\"fan\", \"eq\", \"on\"),\n tap_action: {\n action: \"navigate\",\n navigation_path: \"fan\",\n },\n };\n\n /**\n * Class Constructor.\n *\n * @param {chips.ChipOptions} options The chip options.\n */\n constructor(options: chips.ChipOptions = {}) {\n super();\n\n if (options?.show_content) {\n this.#defaultConfig.content = Helper.getCountTemplate(\"fan\", \"eq\", \"on\", options?.area_slug);\n }\n\n this.#defaultConfig.icon_color = Helper.getFromDomainState({ domain: \"fan\", area_slug: options?.area_slug })\n\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport { FanChip };\n","import { Helper } from \"../Helper\";\nimport { chips } from \"../types/strategy/chips\";\nimport { AbstractChip } from \"./AbstractChip\";\nimport { TemplateChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { getMAEntity } from \"../utils\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Light Chip class.\n *\n * Used to create a chip to indicate how many lights are on and to turn all off.\n */\nclass LightChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @type {TemplateChipConfig}\n *\n * @readonly\n * @private\n */\n readonly #defaultConfig: TemplateChipConfig = {\n type: \"template\",\n icon: \"mdi:lightbulb-group\",\n icon_color: \"amber\",\n content: \"\",\n tap_action: {\n action: \"navigate\",\n navigation_path: \"light\",\n },\n };\n\n /**\n * Class Constructor.\n *\n * @param {chips.ChipOptions} options The chip options.\n */\n constructor(options: chips.ChipOptions) {\n super();\n\n if (options?.show_content) {\n this.#defaultConfig.content = Helper.getCountTemplate(\"light\", \"eq\", \"on\", options?.area_slug);\n }\n\n this.#defaultConfig.icon_color = Helper.getFromDomainState({ domain: \"light\", area_slug: options?.area_slug })\n\n const magicAreasEntity = getMAEntity(options?.magic_device_id ?? \"global\", \"light\");\n\n if (magicAreasEntity) {\n this.#defaultConfig.entity = magicAreasEntity.entity_id;\n }\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport { LightChip };\n","import { Helper } from \"../Helper\";\nimport { AbstractChip } from \"./AbstractChip\";\nimport { chips } from \"../types/strategy/chips\";\nimport { TemplateChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { getMAEntity } from \"../utils\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * MediaPlayer Chip class.\n *\n * Used to create a chip to indicate how many climates are operating.\n */\nclass MediaPlayerChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @type {TemplateChipConfig}\n *\n * @readonly\n * @private\n */\n readonly #defaultConfig: TemplateChipConfig = {\n type: \"template\",\n icon: Helper.icons.media_player._.default,\n content: \"\",\n tap_action: {\n action: \"navigate\",\n navigation_path: \"media_player\",\n },\n };\n\n /**\n * Class Constructor.\n *\n * @param {chips.ChipOptions} options The chip options.\n */\n constructor(options: chips.ChipOptions) {\n super();\n\n if (options?.show_content) {\n this.#defaultConfig.content = Helper.getCountTemplate(\"media_player\", \"eq\", \"playing\", options?.area_slug);\n }\n\n this.#defaultConfig.icon_color = Helper.getFromDomainState({ domain: \"media_player\", area_slug: options?.area_slug })\n\n const magicAreasEntity = getMAEntity(options?.magic_device_id ?? \"global\", \"media_player\");\n\n if (magicAreasEntity) {\n this.#defaultConfig.entity = magicAreasEntity.entity_id;\n }\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport { MediaPlayerChip };\n","import { Helper } from \"../Helper\";\nimport { AbstractChip } from \"./AbstractChip\";\nimport { chips } from \"../types/strategy/chips\";\nimport { TemplateChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Safety Chip class.\n *\n * Used to create a chip to indicate how many safetys are operating.\n */\nclass SafetyChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @type {TemplateChipConfig}\n *\n * @readonly\n * @private\n */\n readonly #defaultConfig: TemplateChipConfig = {\n type: \"template\",\n icon: Helper.icons.binary_sensor.safety?.default,\n icon_color: \"grey\",\n content: Helper.getDeviceClassCountTemplate(\"safety\", \"ne\", \"off\"),\n tap_action: {\n action: \"none\",\n },\n hold_action: {\n action: \"navigate\",\n navigation_path: \"safety\",\n },\n };\n\n /**\n * Class Constructor.\n *\n * @param {chips.TemplateChipOptions} options The chip options.\n */\n constructor(options: chips.TemplateChipOptions = {}) {\n super();\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport { SafetyChip };\n","import {Helper} from \"../Helper\";\nimport {chips} from \"../types/strategy/chips\";\nimport {AbstractChip} from \"./AbstractChip\";\nimport {TemplateChipConfig} from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Settings Chip class.\n *\n * Used to create a chip to indicate how many fans are on and to turn all off.\n */\nclass SettingsChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @type {TemplateChipConfig}\n *\n * @readonly\n * @private\n */\n readonly #defaultConfig: TemplateChipConfig = {\n \"type\": \"template\",\n \"icon\": \"mdi:cog\",\n };\n\n /**\n * Class Constructor.\n *\n * @param {chips.TemplateChipOptions} options The chip options.\n */\n constructor(options: chips.TemplateChipOptions = {}) {\n super();\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport {SettingsChip};\n","import { Helper } from \"../Helper\";\nimport { TemplateChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { AbstractChip } from \"./AbstractChip\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Spotify Chip class.\n *\n * Used to create a chip to indicate climate level.\n */\nclass SpotifyChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @type {ConditionalChipConfig}\n *\n */\n getDefaultConfig(entityId: string): TemplateChipConfig {\n\n return {\n type: \"template\",\n entity: entityId,\n icon_color: `{{ 'green' if is_state('${entityId}', 'playing') else 'grey' }}`,\n content: '{{ states(entity) }}',\n icon: \"mdi:spotify\",\n // content: show_content ? `{{ states('${entityId}') if not states('${entityId}') == 'on' else '' }}` : \"\",\n tap_action: {\n action: \"fire-dom-event\",\n browser_mod: {\n service: \"browser_mod.popup\",\n data: {\n title: \"Spotify\",\n \"content\":\n {\n type: \"vertical-stack\",\n cards: [\n ...([entityId].map(x => {\n\n const entity = Helper.getEntityState(x)\n const source_list = entity.attributes.source_list\n const chunkSize = 3;\n const source_cards_chunk = []\n\n for (let i = 0; i < source_list.length; i += chunkSize) {\n const chunk = source_list.slice(i, i + chunkSize);\n source_cards_chunk.push(chunk)\n }\n\n return {\n type: \"custom:stack-in-card\",\n cards: [\n {\n type: \"custom:mushroom-media-player-card\",\n entity: \"media_player.spotify_juicy\",\n icon: \"mdi:spotify\",\n icon_color: \"green\",\n use_media_info: true,\n use_media_artwork: false,\n show_volume_level: false,\n media_controls: [\n \"play_pause_stop\",\n \"previous\",\n \"next\"\n ],\n volume_controls: [\n \"volume_buttons\",\n \"volume_set\"\n ],\n fill_container: false,\n card_mod: {\n style: \"ha-card {\\n --rgb-state-media-player: var(--rgb-green);\\n}\\n\"\n }\n },\n {\n type: \"custom:swipe-card\",\n parameters: null,\n spaceBetween: 8,\n scrollbar: null,\n start_card: 1,\n hide: false,\n draggable: true,\n snapOnRelease: true,\n slidesPerView: 2.2,\n cards: [\n ...(source_cards_chunk.map(source_cards => (\n {\n type: \"horizontal-stack\",\n cards: [\n ...(source_cards.map((source: string) => (\n {\n type: \"custom:mushroom-template-card\",\n icon: \"mdi:speaker-play\",\n icon_color: `{% if states[entity].attributes.source == '${source}' %}\\namber\\n{% else %}\\ngrey\\n{% endif %}`,\n primary: null,\n secondary: source,\n entity: entity.entity_id,\n multiline_secondary: false,\n tap_action: {\n action: \"call-service\",\n service: \"spotcast.start\",\n data: {\n device_name: source,\n force_playback: true\n }\n },\n layout: \"vertical\",\n style: \"mushroom-card \\n background-size: 42px 32px;\\nmushroom-shape-icon {\\n --shape-color: none !important;\\n} \\n ha-card { \\n background: rgba(#1a1a2a;, 1.25);\\n {% if is_state('media_player.cuisine_media_players', 'playing') %}\\n {% else %}\\n background: rgba(var(--rgb-primary-background-color), 0.8);\\n {% endif %} \\n width: 115px;\\n border-radius: 30px;\\n margin-top: 10px;\\n margin-left: auto;\\n margin-right: auto;\\n margin-bottom: 20px;\\n }\\n\",\n card_mode: {\n style: \":host {\\n background: rgba(var(--rgb-primary-background-color), 0.8);\\n border-radius: 50px;!important\\n} \\n\"\n },\n line_width: 8,\n line_color: \"#FF6384\",\n card_mod: {\n style: `\n :host {\n --mush-icon-symbol-size: 0.75em;\n }\n `\n }\n\n }))\n ).filter(Boolean),\n ]\n }))\n ).filter(Boolean),\n ]\n },\n {\n type: \"custom:spotify-card\",\n always_play_random_song: true,\n hide_currently_playing: true,\n hide_playback_controls: true,\n hide_top_header: true,\n hide_warning: true,\n hide_chromecast_devices: true,\n display_style: \"Grid\",\n grid_covers_per_row: 5,\n limit: 20\n }\n ],\n card_mod: {\n style: \"ha-card {\\n {% if not is_state('media_player.spotify_juicy', 'off') and not is_state('media_player.spotify_juicy', 'idle') %}\\n background: url( '{{ state_attr(\\\"media_player.spotify_juicy\\\", \\\"entity_picture\\\") }}' ), linear-gradient(to left, transparent, rgb(var(--rgb-card-background-color)) 100%);\\n\\n {% if state_attr('media_player.spotify_juicy', 'media_content_type') == 'tvshow' %}\\n background-size: auto 100%, cover;\\n {% else %}\\n background-size: 130% auto, cover;\\n {% endif %}\\n\\n background-position: top right;\\n background-repeat: no-repeat;\\n background-blend-mode: saturation;\\n {% endif %}\\n}\\n\"\n }\n }\n })\n ).filter(Boolean),\n ],\n card_mod: {\n style: \"ha-card {\\n background:#4a1a1a;\\n}\\n\"\n }\n }\n }\n }\n }\n }\n }\n\n /**\n * Class Constructor.\n *\n * @param {chips.TemplateChipOptions} options The chip options.\n */\n constructor(entityId: string) {\n super();\n\n const defaultConfig = this.getDefaultConfig(entityId)\n\n this.config = Object.assign(this.config, defaultConfig);\n\n }\n}\n\nexport { SpotifyChip };\n","import { Helper } from \"../Helper\";\nimport { chips } from \"../types/strategy/chips\";\nimport { AbstractChip } from \"./AbstractChip\";\nimport { TemplateChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Switch Chip class.\n *\n * Used to create a chip to indicate how many switches are on and to turn all off.\n */\nclass SwitchChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @type {TemplateChipConfig}\n *\n * @readonly\n * @private\n */\n readonly #defaultConfig: TemplateChipConfig = {\n type: \"template\",\n icon: \"mdi:dip-switch\",\n content: \"\",\n tap_action: {\n action: \"navigate\",\n navigation_path: \"switch\",\n },\n };\n\n /**\n * Class Constructor.\n *\n * @param {chips.ChipOptions} options The chip options.\n */\n constructor(options: chips.ChipOptions = {}) {\n super();\n\n if (options?.show_content) {\n this.#defaultConfig.content = Helper.getCountTemplate(\"switch\", \"eq\", \"on\", options?.area_slug);\n }\n this.#defaultConfig.icon_color = Helper.getFromDomainState({ domain: \"switch\", area_slug: options?.area_slug })\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport { SwitchChip };\n","import { generic } from \"../types/strategy/generic\";\nimport MagicAreaRegistryEntry = generic.MagicAreaRegistryEntry;\nimport { TemplateChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { MAGIC_AREAS_DOMAIN } from \"../variables\";\nimport { AbstractChip } from \"./AbstractChip\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Climate Chip class.\n *\n * Used to create a chip to indicate climate level.\n */\nclass ToggleSceneChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @type {ConditionalChipConfig}\n *\n */\n getDefaultConfig(device: MagicAreaRegistryEntry): TemplateChipConfig {\n return {\n type: \"template\",\n entity: device?.entities.light_control?.entity_id,\n icon: \"mdi:recycle-variant\",\n // icon_color: \"{% if is_state(config.entity, 'on') %}green{% else %}red{% endif %}\",\n tap_action: {\n action: \"call-service\",\n service: `${MAGIC_AREAS_DOMAIN}.area_scene_toggle`,\n data: {\n area: device?.name,\n }\n },\n hold_action: {\n action: \"more-info\"\n }\n }\n }\n\n /**\n * Class Constructor.\n *\n * @param {chips.TemplateChipOptions} options The chip options.\n */\n constructor(device: MagicAreaRegistryEntry) {\n super();\n\n const defaultConfig = this.getDefaultConfig(device)\n\n this.config = Object.assign(this.config, defaultConfig);\n\n }\n}\n\nexport { ToggleSceneChip };\n","import { AbstractChip } from \"./AbstractChip\";\nimport { TemplateChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { navigateTo } from \"../utils\";\nimport { Helper } from \"../Helper\";\nimport { chips } from \"../types/strategy/chips\";\nimport { UNAVAILABLE } from \"../variables\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Unavailable Chip class.\n *\n * Used to create a chip to indicate unable entities.\n */\nclass UnavailableChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @type {TemplateChipConfig}\n *\n * @readonly\n * @private\n */\n readonly #defaultConfig: TemplateChipConfig = {\n type: \"template\",\n icon: 'mdi:alert-circle-outline',\n icon_color: \"orange\",\n content: \"\",\n };\n\n /**\n * Class Constructor.\n *\n * @param {chips.ChipOptions} options The chip options.\n */\n constructor(options: chips.ChipOptions = {}) {\n super();\n\n this.#defaultConfig.content = Helper.getCountTemplate(\"all\", \"eq\", UNAVAILABLE, options?.area_slug);\n\n this.#defaultConfig.icon = Helper.getFromDomainState({\n domain: \"all\",\n operator: \"eq\",\n value: UNAVAILABLE,\n ifReturn: this.#defaultConfig.icon,\n elseReturn: \"mdi:alert-circle-check-outline\",\n area_slug: options?.area_slug\n });\n\n\n this.#defaultConfig.icon_color = Helper.getFromDomainState({\n domain: \"all\",\n operator: \"eq\",\n value: UNAVAILABLE,\n ifReturn: this.#defaultConfig.icon_color,\n elseReturn: \"green\",\n area_slug: options?.area_slug\n });\n\n this.#defaultConfig.tap_action = navigateTo(\"unavailable\")\n\n this.config = Object.assign(this.config, this.#defaultConfig);\n }\n}\n\nexport { UnavailableChip };\n","import {chips} from \"../types/strategy/chips\";\nimport {WeatherChipConfig} from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport {AbstractChip} from \"./AbstractChip\";\nimport { WeatherPopup } from \"../popups/WeatherPopup\";\n\n// noinspection JSUnusedGlobalSymbols False positive.\n/**\n * Weather Chip class.\n *\n * Used to create a chip for showing the weather.\n */\nclass WeatherChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @private\n * @readonly\n */\n readonly #defaultConfig: WeatherChipConfig = {\n type: \"weather\",\n show_temperature: true,\n show_conditions: true,\n };\n\n /**\n * Class Constructor.\n *\n * @param {string} entityId Id of a weather entity.\n * @param {chips.WeatherChipOptions} options Weather Chip options.\n */\n constructor(entityId: string, options: chips.WeatherChipOptions = {}) {\n super();\n this.#defaultConfig = {\n ...this.#defaultConfig,\n tap_action: new WeatherPopup(entityId).getPopup() as any,\n ...{entity: entityId},\n ...options,\n };\n\n this.#defaultConfig.tap_action = new WeatherPopup(entityId).getPopup()\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport {WeatherChip};\n","import { generic } from \"./types/strategy/generic\";\nimport StrategyDefaults = generic.StrategyDefaults;\nimport MagicAreaRegistryEntry = generic.MagicAreaRegistryEntry;\nimport { ControlChip } from \"./chips/ControlChip\";\nimport { SettingsChip } from \"./chips/SettingsChip\";\nimport { LightSettings } from \"./popups/LightSettingsPopup\";\nimport { ToggleSceneChip } from \"./chips/ToggleSceneChip\";\nimport { SceneSettings } from \"./popups/SceneSettingsPopup\";\nimport { UNDISCLOSED } from \"./variables\";\nimport { ClimateChip } from \"./chips/ClimateChip\";\nimport { AggregateChip } from \"./chips/AggregateChip\";\nimport { LightChip } from \"./chips/LightChip\";\nimport { MediaPlayerChip } from \"./chips/MediaPlayerChip\";\nimport { CoverChip } from \"./chips/CoverChip\";\nimport { FanChip } from \"./chips/FanChip\";\nimport { SwitchChip } from \"./chips/SwitchChip\";\n\n/**\n * Default configuration for the mushroom strategy.\n */\nexport const configurationDefaults: StrategyDefaults = {\n areas: {\n undisclosed: {\n slug: UNDISCLOSED,\n aliases: [],\n area_id: UNDISCLOSED,\n name: \"Non assigné\",\n picture: null,\n hidden: false,\n domains: {},\n devices: [],\n entities: [],\n }\n },\n floors: {\n undisclosed: {\n aliases: [],\n floor_id: UNDISCLOSED,\n name: \"Non assigné\",\n hidden: false,\n areas_slug: [UNDISCLOSED]\n }\n },\n debug: true,\n domains: {\n _: {\n hide_config_entities: false,\n },\n default: {\n showControls: false,\n hidden: false,\n },\n light: {\n showControls: true,\n controlChip: LightChip,\n extraControls: (device: MagicAreaRegistryEntry) => {\n const chips = [];\n if (device?.entities.light_control?.entity_id) {\n chips.push(new ControlChip(\"light\", device?.entities.light_control?.entity_id).getChip());\n }\n if (device?.entities.all_lights?.entity_id) {\n chips.push(new SettingsChip({ tap_action: new LightSettings(device).getPopup() }).getChip());\n }\n return chips\n },\n controllerCardOptions: {\n onService: \"light.turn_on\",\n offService: \"light.turn_off\",\n toggleService: \"light.toggle\",\n },\n hidden: false,\n order: 1\n },\n climate: {\n showControls: true,\n controlChip: ClimateChip,\n controllerCardOptions: {\n onService: \"climate.turn_on\",\n offService: \"climate.turn_off\",\n toggleService: \"climate.toggle\",\n },\n hidden: false,\n order: 2,\n extraControls: (device: MagicAreaRegistryEntry) => {\n const chips = [];\n if (device?.entities.climate_control?.entity_id) {\n chips.push(new ControlChip(\"climate\", device?.entities.climate_control?.entity_id).getChip());\n }\n return chips\n },\n },\n media_player: {\n showControls: true,\n controlChip: MediaPlayerChip,\n controllerCardOptions: {\n onService: \"media_player.turn_on\",\n offService: \"media_player.turn_off\",\n toggleService: \"media_player.toggle\",\n },\n hidden: false,\n order: 3,\n extraControls: (device: MagicAreaRegistryEntry) => {\n const chips = [];\n if (device?.entities.media_player_control?.entity_id) {\n chips.push(new ControlChip(\"media_player\", device?.entities.media_player_control?.entity_id).getChip());\n }\n return chips\n },\n },\n cover: {\n showControls: true,\n controlChip: CoverChip,\n controllerCardOptions: {\n onService: \"cover.open_cover\",\n offService: \"cover.close_cover\",\n toggleService: \"cover.toggle\",\n },\n hidden: false,\n order: 4\n },\n scene: {\n showControls: false,\n extraControls: (device: MagicAreaRegistryEntry) => {\n const chips = [];\n if (device?.entities.all_lights?.entity_id) {\n chips.push(new ToggleSceneChip(device).getChip());\n chips.push(new SettingsChip({ tap_action: new SceneSettings(device).getPopup() }).getChip());\n }\n return chips\n },\n onService: \"scene.turn_on\",\n offService: \"scene.turn_off\",\n hidden: false,\n order: 5\n },\n fan: {\n showControls: true,\n controlChip: FanChip,\n controllerCardOptions: {\n onService: \"fan.turn_on\",\n offService: \"fan.turn_off\",\n toggleService: \"fan.toggle\",\n },\n hidden: false,\n order: 6\n },\n switch: {\n showControls: true,\n controlChip: SwitchChip,\n controllerCardOptions: {\n onService: \"switch.turn_on\",\n offService: \"switch.turn_off\",\n toggleService: \"switch.toggle\",\n },\n hidden: false,\n order: 7\n },\n camera: {\n showControls: false,\n controllerCardOptions: {\n },\n hidden: false,\n order: 8\n },\n lock: {\n showControls: false,\n controllerCardOptions: {\n },\n hidden: false,\n order: 9\n },\n vacuum: {\n showControls: true,\n controllerCardOptions: {\n onService: \"vacuum.start\",\n offService: \"vacuum.stop\",\n },\n hidden: false,\n order: 10\n },\n sensor: {\n controlChip: AggregateChip,\n showControls: true,\n hidden: false,\n },\n binary_sensor: {\n controlChip: AggregateChip,\n showControls: true,\n hidden: false,\n },\n number: {\n showControls: false,\n hidden: false,\n },\n temperature: {\n showControls: true,\n hidden: false,\n },\n },\n home_view: {\n hidden: [],\n },\n views: {\n home: {\n order: 1,\n hidden: false,\n },\n security: {\n order: 2,\n hidden: false,\n },\n light: {\n order: 3,\n hidden: false,\n },\n climate: {\n order: 4,\n hidden: false,\n },\n media_player: {\n order: 5,\n hidden: false,\n },\n cover: {\n order: 6,\n hidden: false,\n },\n scene: {\n order: 7,\n hidden: false,\n },\n fan: {\n order: 8,\n hidden: false,\n },\n switch: {\n order: 9,\n hidden: false,\n },\n camera: {\n order: 10,\n hidden: false,\n },\n vacuum: {\n order: 11,\n hidden: false,\n },\n securityDetails: {\n hidden: false,\n },\n motion: {\n hidden: false,\n },\n window: {\n hidden: false,\n },\n door: {\n hidden: false,\n },\n battery: {\n hidden: false,\n },\n temperature: {\n hidden: false,\n },\n }\n};\n","import { Helper } from \"./Helper\";\nimport { generic } from \"./types/strategy/generic\";\nimport { LovelaceConfig, LovelaceViewConfig } from \"./types/homeassistant/data/lovelace\";\nimport { CUSTOM_VIEWS, DEVICE_CLASSES, DOMAINS_VIEWS, VIEWS_ICONS } from \"./variables\";\nimport { AreaView } from \"./views/AreaView\";\nimport { getAreaName, getDomainTranslationKey, getFloorName } from \"./utils\";\nimport { FloorView } from \"./views/FloorView\";\nimport { ResourceKeys } from \"./types/homeassistant/data/frontend\";\n\n/**\n * Linus Dashboard Strategy.
\n *
\n * Linus dashboard strategy provides a strategy for Home-Assistant to create a dashboard automatically.
\n * The strategy makes use of Mushroom and Mini Graph cards to represent your entities.
\n *
\n * Features:
\n * 🛠 Automatically create a dashboard with minimal configuration.
\n * 😍 Built-in views for several standard domains.
\n * 🎨 Many options to customize to your needs.
\n *
\n * Check the [Repository]{@link https://github.com/AalianKhan/linus-strategy} for more information.\n */\nclass LinusStrategy extends HTMLTemplateElement {\n /**\n * Generate a dashboard.\n *\n * Called when opening a dashboard.\n *\n * @param {generic.DashBoardInfo} info Dashboard strategy information object.\n * @return {Promise}\n */\n static async generateDashboard(info: generic.DashBoardInfo): Promise {\n if (!Helper.isInitialized()) await Helper.initialize(info);\n\n // console.log('info', info);\n\n const views: LovelaceViewConfig[] = info.config?.views ?? [];\n\n LinusStrategy.createDomainSubviews(views);\n LinusStrategy.createUnavailableEntitiesSubview(views);\n LinusStrategy.createAreaSubviews(views);\n LinusStrategy.createFloorSubviews(views);\n\n if (Helper.strategyOptions.extra_views) {\n views.push(...Helper.strategyOptions.extra_views);\n }\n\n return { views };\n }\n\n /**\n * Create subviews for each domain.\n *\n * @param {LovelaceViewConfig[]} views Array of Lovelace view configurations.\n */\n private static createDomainSubviews(views: LovelaceViewConfig[]) {\n const exposedViewIds = Helper.getExposedViewIds();\n exposedViewIds.forEach(viewId => {\n if (![...CUSTOM_VIEWS, ...DOMAINS_VIEWS].includes(viewId)) return;\n if (DOMAINS_VIEWS.includes(viewId) && (Helper.domains[viewId] ?? []).length === 0) return;\n\n let domain = viewId;\n let device_class = \"_\";\n\n if (DEVICE_CLASSES.binary_sensor.includes(viewId)) {\n domain = \"binary_sensor\";\n device_class = viewId;\n } else if (DEVICE_CLASSES.sensor.includes(viewId)) {\n domain = \"sensor\";\n device_class = viewId;\n }\n\n views.push({\n title: Helper.localize(getDomainTranslationKey(domain, device_class)),\n icon: (VIEWS_ICONS as Record)[viewId] ?? Helper.icons[device_class === \"battery\" ? \"binary_sensor\" : domain as ResourceKeys]?.[device_class]?.default,\n path: viewId,\n subview: !Object.keys(VIEWS_ICONS).includes(viewId),\n strategy: {\n type: \"custom:linus-strategy\",\n options: { viewId },\n },\n });\n });\n }\n\n /**\n * Create a subview for unavailable entities.\n *\n * @param {LovelaceViewConfig[]} views Array of Lovelace view configurations.\n */\n private static createUnavailableEntitiesSubview(views: LovelaceViewConfig[]) {\n views.push({\n title: \"Unavailable\",\n path: \"unavailable\",\n subview: true,\n strategy: {\n type: \"custom:linus-strategy\",\n options: { viewId: \"unavailable\" },\n },\n });\n }\n\n /**\n * Create subviews for each area.\n *\n * @param {LovelaceViewConfig[]} views Array of Lovelace view configurations.\n */\n private static createAreaSubviews(views: LovelaceViewConfig[]) {\n for (let area of Helper.orderedAreas) {\n if (!area.hidden) {\n views.push({\n title: getAreaName(area),\n path: area.slug ?? area.name,\n subview: true,\n strategy: {\n type: \"custom:linus-strategy\",\n options: { area },\n },\n });\n }\n }\n }\n\n /**\n * Create subviews for each floor.\n *\n * @param {LovelaceViewConfig[]} views Array of Lovelace view configurations.\n */\n private static createFloorSubviews(views: LovelaceViewConfig[]) {\n for (let floor of Helper.orderedFloors) {\n if (!floor.hidden) {\n views.push({\n title: getFloorName(floor),\n path: floor.floor_id,\n subview: true,\n strategy: {\n type: \"custom:linus-strategy\",\n options: { floor },\n },\n });\n }\n }\n }\n\n /**\n * Generate a view.\n *\n * Called when opening a subview.\n *\n * @param {generic.ViewInfo} info The view's strategy information object.\n * @return {Promise}\n */\n /**\n * Generate a view.\n *\n * Called when opening a subview.\n *\n * @param {generic.ViewInfo} info The view's strategy information object.\n * @return {Promise}\n */\n static async generateView(info: generic.ViewInfo): Promise {\n const { viewId, floor, area } = info.view.strategy?.options ?? {};\n let view: LovelaceViewConfig = {};\n\n if (area) {\n try {\n view = await new AreaView(area).getView();\n } catch (e) {\n Helper.logError(`View for '${area?.name}' couldn't be loaded!`, e);\n }\n } else if (floor) {\n try {\n view = await new FloorView(floor).getView();\n } catch (e) {\n Helper.logError(`View for '${floor?.name}' couldn't be loaded!`, e);\n }\n } else if (viewId) {\n try {\n\n if (viewId === \"unavailable\") {\n\n const viewModule = await import(\"./views/UnavailableView\");\n view = await new viewModule.UnavailableView().getView();\n\n } else if ([...DEVICE_CLASSES.binary_sensor, ...DEVICE_CLASSES.sensor].includes(viewId)) {\n\n const viewModule = await import(\"./views/AggregateView\");\n view = await new viewModule.AggregateView({ device_class: viewId }).getView();\n\n } else {\n\n const viewType = Helper.sanitizeClassName(viewId + \"View\");\n const viewModule = await import(`./views/${viewType}`);\n view = await new viewModule[viewType](Helper.strategyOptions.views[viewId]).getView();\n\n }\n } catch (e) {\n Helper.logError(`View for '${viewId}' couldn't be loaded!`, e);\n }\n\n }\n\n return view;\n }\n}\n\ncustomElements.define(\"ll-strategy-linus-strategy\", LinusStrategy);\n\nexport const version = \"v0.0.1\";\nconsole.info(\n \"%c Linus Strategy %c \".concat(version, \" \"),\n \"color: #F5F5DC; background: #004225; font-weight: 700;\", \"color: #004225; background: #F5F5DC; font-weight: 700;\"\n);\n","import {Helper} from \"../Helper\";\nimport { PopupActionConfig } from \"../types/homeassistant/data/lovelace\";\n\n/**\n * Abstract Popup class.\n *\n * To create a new Popup, extend this one.\n *\n * @class\n * @abstract\n */\nabstract class AbstractPopup {\n /**\n * Configuration of the Popup.\n *\n * @type {PopupActionConfig}\n */\n config: PopupActionConfig = {\n action: \"fire-dom-event\",\n browser_mod: {}\n };\n\n /**\n * Class Constructor.\n */\n protected constructor() {\n if (!Helper.isInitialized()) {\n throw new Error(\"The Helper module must be initialized before using this one.\");\n }\n }\n\n // noinspection JSUnusedGlobalSymbols Method is called on dymanically imported classes.\n /**\n * Get the Popup.\n *\n * @returns {PopupActionConfig} A Popup.\n */\n getPopup(): PopupActionConfig {\n return this.config;\n }\n}\n\nexport {AbstractPopup};\n","import { Helper } from \"../Helper\";\nimport { generic } from \"../types/strategy/generic\";\nimport MagicAreaRegistryEntry = generic.MagicAreaRegistryEntry;\nimport { PopupActionConfig } from \"../types/homeassistant/data/lovelace\";\nimport { slugify } from \"../utils\";\nimport { AbstractPopup } from \"./AbstractPopup\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Light Chip class.\n *\n * Used to create a chip to indicate how many lights are on and to turn all off.\n */\nclass AreaInformations extends AbstractPopup {\n\n getDefaultConfig(device: MagicAreaRegistryEntry, minimalist: boolean): PopupActionConfig {\n\n const { area_state } = device?.entities ?? {}\n\n const { friendly_name, adjoining_areas, features, states, presence_sensors, on_states } = Helper.getEntityState(area_state?.entity_id)?.attributes ?? {}\n\n presence_sensors?.sort((a: string, b: string) => {\n const aState = Helper.getEntityState(a);\n const bState = Helper.getEntityState(b);\n const lastChangeA = new Date(aState?.last_changed).getTime();\n const lastChangeB = new Date(bState?.last_changed).getTime();\n if (a === `switch.magic_areas_presence_hold_${slugify(device?.name)}`) {\n return -1;\n } else if (b === `switch.magic_areas_presence_hold_${slugify(device?.name)}`) {\n return 1;\n } else {\n return lastChangeB - lastChangeA;\n }\n });\n\n return {\n action: \"fire-dom-event\",\n browser_mod: {\n service: \"browser_mod.popup\",\n data: {\n title: friendly_name,\n content: {\n type: \"vertical-stack\",\n cards: [\n {\n type: \"horizontal-stack\",\n cards: [\n {\n type: \"custom:mushroom-entity-card\",\n entity: area_state?.entity_id,\n name: \"Présence\",\n secondary_info: \"last-changed\",\n color: \"red\",\n tap_action: device?.id ? {\n action: \"fire-dom-event\",\n browser_mod: {\n service: \"browser_mod.sequence\",\n data: {\n sequence: [\n {\n service: \"browser_mod.close_popup\",\n data: {}\n },\n {\n service: \"browser_mod.navigate\",\n data: { path: `/config/devices/device/${device?.id}` }\n }\n ]\n }\n }\n } : \"more-info\"\n },\n {\n type: \"custom:mushroom-template-card\",\n primary: \"Recharger la pièce\",\n icon: \"mdi:refresh\",\n icon_color: \"blue\",\n tap_action: {\n action: \"call-service\",\n service: `homeassistant.reload_config_entry`,\n target: { \"device_id\": device?.id },\n }\n },\n ]\n },\n ...(!minimalist ? [\n {\n type: \"custom:mushroom-template-card\",\n primary: `Configuration de la pièce :`,\n card_mod: {\n style: `ha-card {padding: 4px 12px!important;}`\n }\n },\n {\n type: \"custom:mushroom-chips-card\",\n chips: [\n {\n type: \"template\",\n entity: area_state?.entity_id,\n content: `Type : {{ state_attr('${area_state?.entity_id}', 'type') }}`,\n icon: `\n {% set type = state_attr('${area_state?.entity_id}', 'type') %}\n {% if type == \"interior\" %}\n mdi:home-import-outline\n {% elif type == \"exterior\" %}\n mdi:home-import-outline\n {% else %}\n mdi:home-alert\n {% endif %}\n `,\n },\n {\n type: \"template\",\n entity: area_state?.entity_id,\n content: `Étage : {{ state_attr('${area_state?.entity_id}', 'floor') }}`,\n icon: `\n {% set floor = state_attr('${area_state?.entity_id}', 'floor') %}\n {% if floor == \"third\" %}\n mdi:home-floor-3\n {% elif floor == \"second\" %}\n mdi:home-floor-2\n {% elif floor == \"first\" %}\n mdi:home-floor-1\n {% elif floor == \"ground\" %}\n mdi:home-floor-g\n {% elif floor == \"basement\" %}\n mdi:home-floor-b\n {% else %}\n mdi:home-alert\n {% endif %}\n `,\n },\n {\n type: \"template\",\n entity: area_state?.entity_id,\n content: `Délai pièce vide : {{ state_attr('${area_state?.entity_id}', 'clear_timeout') }}s`,\n icon: `mdi:camera-timer`,\n },\n {\n type: \"template\",\n entity: area_state?.entity_id,\n content: `Interval mise à jour : {{ state_attr('${area_state?.entity_id}', 'update_interval') }}s`,\n icon: `mdi:update`,\n },\n {\n type: \"template\",\n entity: area_state?.entity_id,\n content: `Pièces adjacentes : ${adjoining_areas?.length ? adjoining_areas.join(' ') : 'Non défini'}`,\n icon: `mdi:view-dashboard-variant`,\n },\n ],\n card_mod: {\n style: `ha-card .chip-container * {margin-bottom: 0px!important;}`\n }\n }\n ] : []),\n {\n type: \"custom:mushroom-template-card\",\n primary: `Capteurs utilisé pour la détection de présence :`,\n card_mod: {\n style: `ha-card {padding: 4px 12px!important;}`\n }\n },\n (minimalist ? {\n type: \"vertical-stack\",\n cards: presence_sensors?.map((sensor: string) => ({\n type: \"custom:mushroom-entity-card\",\n entity: sensor,\n content_info: \"name\",\n secondary_info: \"last-changed\",\n icon_color: sensor.includes('media_player.') ? \"blue\" : \"red\",\n }))\n } :\n {\n type: \"custom:mushroom-chips-card\",\n chips: presence_sensors?.map((sensor: string) => ({\n type: \"entity\",\n entity: sensor,\n content_info: \"name\",\n icon_color: sensor.includes('media_player.') ? \"blue\" : \"red\",\n tap_action: {\n action: \"more-info\"\n }\n })),\n card_mod: {\n style: `ha-card .chip-container * {margin-bottom: 0px!important;}`\n }\n }),\n ...(!minimalist ? [\n {\n type: \"custom:mushroom-template-card\",\n primary: `Présence détecté pour les états :`,\n card_mod: {\n style: `ha-card {padding: 4px 12px!important;}`\n }\n },\n {\n type: \"custom:mushroom-chips-card\",\n chips: on_states?.map((sensor: string) => ({\n type: \"template\",\n content: sensor,\n })),\n card_mod: {\n style: `ha-card .chip-container * {margin-bottom: 0px!important;}`\n }\n },\n {\n type: \"custom:mushroom-template-card\",\n primary: `Fonctionnalitées disponibles :`,\n card_mod: {\n style: `ha-card {padding: 4px 12px!important;}`\n }\n },\n {\n type: \"custom:mushroom-chips-card\",\n chips: features?.map((sensor: string) => ({\n type: \"template\",\n content: sensor,\n })),\n card_mod: {\n style: `ha-card .chip-container * {margin-bottom: 0px!important;}`\n }\n },\n ] : [])\n ].filter(Boolean)\n }\n }\n }\n }\n }\n\n /**\n * Class Constructor.\n *\n * @param {chips.PopupActionConfig} options The chip options.\n */\n constructor(device: MagicAreaRegistryEntry, minimalist: boolean = false) {\n super();\n\n const defaultConfig = this.getDefaultConfig(device, minimalist)\n\n this.config = Object.assign(this.config, defaultConfig);\n\n }\n}\n\nexport { AreaInformations };\n","import { Helper } from \"../Helper\";\nimport { generic } from \"../types/strategy/generic\";\nimport MagicAreaRegistryEntry = generic.MagicAreaRegistryEntry;\nimport { PopupActionConfig } from \"../types/homeassistant/data/lovelace\";\nimport { slugify } from \"../utils\";\nimport { MAGIC_AREAS_DOMAIN } from \"../variables\";\nimport { AbstractPopup } from \"./AbstractPopup\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Light Chip class.\n *\n * Used to create a chip to indicate how many lights are on and to turn all off.\n */\nclass LightSettings extends AbstractPopup {\n\n getDefaultConfig(device: MagicAreaRegistryEntry): PopupActionConfig {\n\n const { aggregate_illuminance, adaptive_lighting_range, minimum_brightness, maximum_brightness, maximum_lighting_level } = device?.entities ?? {}\n\n const device_slug = slugify(device?.name ?? \"\")\n\n const OPTIONS_ADAPTIVE_LIGHTING_RANGE = {\n \"\": 1,\n \"Small\": 10,\n \"Medium\": 25,\n \"Large\": 50,\n \"Extra large\": 100,\n } as Record\n\n const adaptive_lighting_range_state = Helper.getEntityState(adaptive_lighting_range?.entity_id)?.state\n\n return {\n action: \"fire-dom-event\",\n browser_mod: {\n service: \"browser_mod.popup\",\n data: {\n title: \"Configurer l'éclairage adaptatif\",\n content: {\n type: \"vertical-stack\",\n cards: [\n {\n type: \"horizontal-stack\",\n cards: [\n {\n type: \"tile\",\n entity: `switch.adaptive_lighting_${device_slug}`,\n vertical: \"true\",\n },\n {\n type: \"tile\",\n entity: `switch.adaptive_lighting_adapt_brightness_${device_slug}`,\n vertical: \"true\",\n },\n {\n type: \"tile\",\n entity: `switch.adaptive_lighting_adapt_color_${device_slug}`,\n vertical: \"true\",\n },\n {\n type: \"tile\",\n entity: `switch.adaptive_lighting_sleep_mode_${device_slug}`,\n vertical: \"true\",\n }\n ]\n },\n {\n type: \"custom:mushroom-select-card\",\n entity: adaptive_lighting_range?.entity_id,\n secondary_info: \"last-changed\",\n icon_color: \"blue\",\n },\n {\n type: \"horizontal-stack\",\n cards: [\n {\n type: \"custom:mushroom-number-card\",\n entity: maximum_lighting_level?.entity_id,\n icon_color: \"red\",\n card_mod: {\n style: `\n :host {\n --mush-control-height: 20px;\n }\n `\n }\n },\n {\n type: \"custom:mushroom-template-card\",\n primary: \"Utiliser la valeur actuelle\",\n icon: \"mdi:pencil\",\n layout: \"vertical\",\n tap_action: {\n action: \"call-service\",\n service: `${MAGIC_AREAS_DOMAIN}.area_lux_for_lighting_max`,\n data: {\n area: device?.name\n }\n },\n },\n ],\n },\n {\n type: \"custom:mushroom-number-card\",\n entity: minimum_brightness?.entity_id,\n icon_color: \"green\",\n card_mod: {\n style: \":host {--mush-control-height: 10px;}\"\n }\n },\n {\n type: \"custom:mushroom-number-card\",\n entity: maximum_brightness?.entity_id,\n icon_color: \"green\",\n card_mod: {\n style: \":host {--mush-control-height: 10px;}\"\n }\n },\n {\n type: \"custom:apexcharts-card\",\n graph_span: \"15h\",\n header: {\n show: true,\n title: \"Luminosité en fonction du temps\",\n show_states: true,\n colorize_states: true\n },\n yaxis: [\n {\n id: \"illuminance\",\n min: 0,\n apex_config: {\n tickAmount: 4\n }\n },\n {\n id: \"brightness\",\n opposite: true,\n min: 0,\n max: 100,\n apex_config: {\n tickAmount: 4\n }\n }\n ],\n series: [\n (aggregate_illuminance?.entity_id ? {\n entity: aggregate_illuminance?.entity_id,\n yaxis_id: \"illuminance\",\n color: \"orange\",\n name: \"Luminosité ambiante (lx)\",\n type: \"line\",\n group_by: {\n func: \"last\",\n duration: \"30m\"\n }\n } : undefined),\n {\n entity: adaptive_lighting_range?.entity_id,\n type: \"area\",\n yaxis_id: \"illuminance\",\n show: {\n in_header: false\n },\n color: \"blue\",\n name: \"Zone d'éclairage adaptatif\",\n unit: \"lx\",\n transform: `return parseInt(hass.states['${maximum_lighting_level?.entity_id}'].state) + ${OPTIONS_ADAPTIVE_LIGHTING_RANGE[adaptive_lighting_range_state]};`,\n group_by: {\n func: \"last\",\n }\n },\n {\n entity: maximum_lighting_level?.entity_id,\n type: \"area\",\n yaxis_id: \"illuminance\",\n name: \"Zone d'éclairage à 100%\",\n color: \"red\",\n show: {\n in_header: false\n },\n group_by: {\n func: \"last\",\n }\n },\n ].filter(Boolean)\n },\n ]\n }\n }\n }\n }\n }\n\n /**\n * Class Constructor.\n *\n * @param {PopupActionConfig} options The chip options.\n */\n constructor(device: MagicAreaRegistryEntry) {\n super();\n\n const defaultConfig = this.getDefaultConfig(device)\n\n this.config = Object.assign(this.config, defaultConfig);\n\n }\n}\n\nexport { LightSettings };\n","\nimport { PopupActionConfig } from \"../types/homeassistant/data/lovelace\";\nimport { slugify } from \"../utils\";\nimport { MAGIC_AREAS_DOMAIN, TOD_ORDER } from \"../variables\";\nimport { AbstractPopup } from \"./AbstractPopup\";\nimport { generic } from \"../types/strategy/generic\";\nimport MagicAreaRegistryEntry = generic.MagicAreaRegistryEntry;\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Scene Chip class.\n *\n * Used to create a chip to indicate how many lights are on and to turn all off.\n */\nclass SceneSettings extends AbstractPopup {\n\n getDefaultConfig(device: MagicAreaRegistryEntry): PopupActionConfig {\n\n const { scene_morning, scene_daytime, scene_evening, scene_night } = device?.entities ?? {}\n const selectControl = [scene_morning, scene_daytime, scene_evening, scene_night].filter(Boolean)\n\n return {\n action: \"fire-dom-event\",\n browser_mod: {\n service: \"browser_mod.popup\",\n data: {\n title: \"Configurer les scènes\",\n content: {\n type: \"vertical-stack\",\n cards: [\n ...(selectControl.length ? TOD_ORDER.map(tod => (\n {\n type: \"custom:config-template-card\",\n variables: {\n SCENE_STATE: `states['${device?.entities[('scene_' + tod) as \"scene_morning\"]?.entity_id}'].state`\n },\n entities: [device?.entities[('scene_' + tod) as \"scene_morning\"]?.entity_id],\n card: {\n type: \"horizontal-stack\",\n cards: [\n {\n type: \"entities\",\n entities: [device?.entities[('scene_' + tod) as \"scene_morning\"]?.entity_id]\n },\n {\n type: \"conditional\",\n conditions: [\n {\n entity: \"${SCENE_STATE}\",\n state: \"on\"\n },\n // {\n // entity: \"${SCENE_STATE}\",\n // state: \"off\"\n // }\n ],\n card:\n {\n type: \"tile\",\n entity: \"${SCENE_STATE}\",\n show_entity_picture: true,\n tap_action: {\n action: \"toggle\"\n },\n }\n },\n {\n type: \"conditional\",\n conditions: [\n {\n entity: \"${SCENE_STATE}\",\n state: \"unavailable\"\n },\n // {\n // entity: \"${SCENE_STATE}\",\n // state: \"off\"\n // }\n ],\n card:\n\n {\n type: \"custom:mushroom-template-card\",\n secondary: \"Utiliser l'éclairage actuel\",\n multiline_secondary: true,\n icon: \"mdi:pencil\",\n layout: \"vertical\",\n tap_action: {\n action: \"call-service\",\n service: `${MAGIC_AREAS_DOMAIN}.snapshot_lights_as_tod_scene`,\n data: {\n area: slugify(device.name),\n tod\n }\n },\n },\n }\n ]\n }\n }\n )\n ) : [{\n type: \"custom:mushroom-template-card\",\n primary: \"Ajouter une nouvelle scène\",\n secondary: `Cliquer ici pour vous rendre sur la page des scènes`,\n multiline_secondary: true,\n icon: `mdi:palette`,\n tap_action: {\n action: \"fire-dom-event\",\n browser_mod: {\n service: \"browser_mod.sequence\",\n data: {\n sequence: [\n {\n service: \"browser_mod.navigate\",\n data: { path: `/config/scene/dashboard` }\n },\n {\n service: \"browser_mod.close_popup\",\n data: {}\n }\n ]\n }\n }\n },\n card_mod: {\n style: `\n ha-card {\n box-shadow: none!important;\n }\n `\n }\n }])\n ].filter(Boolean)\n }\n }\n }\n }\n }\n\n /**\n * Class Constructor.\n *\n * @param {chips.PopupActionConfig} options The chip options.\n */\n constructor(device: MagicAreaRegistryEntry) {\n super();\n\n const defaultConfig = this.getDefaultConfig(device)\n\n this.config = Object.assign(this.config, defaultConfig);\n\n\n }\n}\n\nexport { SceneSettings };\n","import { Helper } from \"../Helper\";\nimport { version } from \"../linus-strategy\";\nimport { PopupActionConfig } from \"../types/homeassistant/data/lovelace\";\nimport { AbstractPopup } from \"./AbstractPopup\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Linus Chip class.\n *\n * Used to create a chip to indicate how many lights are on and to turn all off.\n */\nclass SettingsPopup extends AbstractPopup {\n\n getDefaultConfig(): PopupActionConfig {\n\n const linusDeviceIds = Object.values(Helper.magicAreasDevices).map((area) => area?.id).flat()\n\n return {\n action: \"fire-dom-event\",\n browser_mod: {\n service: \"browser_mod.popup\",\n data: {\n title: Helper.localize(\"component.linus_dashboard.entity.button.settings_chip.name\"),\n content: {\n type: \"vertical-stack\",\n cards: [\n linusDeviceIds.length > 0 && {\n type: \"horizontal-stack\",\n cards: [\n {\n type: \"custom:mushroom-template-card\",\n primary: Helper.localize(\"component.linus_dashboard.entity.button.settings_chip.state.on\"),\n icon: \"mdi:refresh\",\n icon_color: \"blue\",\n tap_action: {\n action: \"call-service\",\n service: `homeassistant.reload_config_entry`,\n target: { \"device_id\": linusDeviceIds },\n }\n },\n {\n type: \"custom:mushroom-template-card\",\n primary: Helper.localize(\"component.linus_dashboard.entity.button.settings_chip.state.off\"),\n icon: \"mdi:restart\",\n icon_color: \"red\",\n tap_action: {\n action: \"call-service\",\n service: \"homeassistant.restart\",\n }\n },\n ]\n },\n {\n type: \"markdown\",\n content: `Linus dashboard est en version ${version}.`,\n },\n ].filter(Boolean)\n }\n }\n }\n }\n }\n\n /**\n * Class Constructor.\n *\n * @param {chips.PopupActionConfig} options The chip options.\n */\n constructor() {\n super();\n\n const defaultConfig = this.getDefaultConfig()\n\n this.config = Object.assign(this.config, defaultConfig);\n\n\n }\n}\n\nexport { SettingsPopup };\n","import { PopupActionConfig } from \"../types/homeassistant/data/lovelace\";\nimport { AbstractPopup } from \"./AbstractPopup\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Weather Chip class.\n *\n * Used to create a chip to indicate how many Weathers are on and to turn all off.\n */\nclass WeatherPopup extends AbstractPopup {\n\n getDefaultConfig(entityId: string): PopupActionConfig {\n return {\n action: \"fire-dom-event\",\n browser_mod: {\n service: \"browser_mod.popup\",\n data: {\n title: \"Météo\",\n content: {\n type: \"vertical-stack\",\n cards: [\n {\n type: \"weather-forecast\",\n entity: entityId,\n show_current: true,\n show_forecast: true\n },\n ]\n }\n }\n }\n }\n }\n\n /**\n * Class Constructor.\n *\n * @param {chips.PopupActionConfig} options The chip options.\n */\n constructor(entity_id: string) {\n super();\n\n this.config = Object.assign(this.config, this.getDefaultConfig(entity_id));\n\n\n }\n}\n\nexport {WeatherPopup};\n","import {ActionsSharedConfig} from \"../shared/config/actions-config\";\nimport {LovelaceCardConfig} from \"../../homeassistant/data/lovelace\";\nimport {EntitySharedConfig} from \"../shared/config/entity-config\";\nimport {AppearanceSharedConfig} from \"../shared/config/appearance-config\";\n\nexport const VACUUM_COMMANDS = [\n \"on_off\",\n \"start_pause\",\n \"stop\",\n \"locate\",\n \"clean_spot\",\n \"return_home\",\n] as const;\n\nexport type VacuumCommand = (typeof VACUUM_COMMANDS)[number];\n\n/**\n * Vacuum Card Config.\n *\n * @param {boolean} icon_animation Animate the icon when vacuum is cleaning.\n * @param {VacuumCommand[]} commands List of commands to display (start_pause, stop, locate, clean_spot, return_home).\n *\n * @see https://github.com/piitaya/lovelace-mushroom/blob/main/docs/cards/vacuum.md\n */\nexport type VacuumCardConfig = LovelaceCardConfig &\n EntitySharedConfig &\n AppearanceSharedConfig &\n ActionsSharedConfig & {\n icon_animation?: boolean;\n commands?: VacuumCommand[];\n};\n","import {\n CallServiceActionConfig,\n LovelaceCardConfig,\n LovelaceConfig,\n LovelaceViewConfig\n} from \"../homeassistant/data/lovelace\";\nimport { HomeAssistant } from \"../homeassistant/types\";\nimport { AreaRegistryEntry } from \"../homeassistant/data/area_registry\";\nimport { cards } from \"./cards\";\nimport { EntityRegistryEntry } from \"../homeassistant/data/entity_registry\";\nimport { LovelaceChipConfig } from \"../lovelace-mushroom/utils/lovelace/chip/types\";\nimport { HassServiceTarget } from \"home-assistant-js-websocket\";\nimport { FloorRegistryEntry } from \"../homeassistant/data/floor_registry\";\nimport { DeviceRegistryEntry } from \"../homeassistant/data/device_registry\";\n\nexport namespace generic {\n /**\n * An entry out of a Home Assistant Register.\n */\n export type RegistryEntry =\n | AreaRegistryEntry\n | DataTransfer\n | EntityRegistryEntry\n\n /**\n * View Entity.\n *\n * @property {number} [order] Ordering position of the entity in the list of available views.\n * @property {boolean} [hidden] True if the entity should be hidden from the dashboard.\n */\n export interface ViewConfig extends LovelaceViewConfig {\n hidden?: boolean;\n order?: number;\n }\n\n /**\n * Domain Configuration.\n *\n * @property {number} [order] Ordering position of the entity in the list of available views.\n * @property {boolean} [hidden] True if the entity should be hidden from the dashboard.\n * @property {boolean} [hide_config_entities] True if the entity's categorie is \"config\" and should be hidden from the\n * dashboard.\n */\n export interface DomainConfig extends Partial {\n hidden?: boolean;\n order?: number;\n hide_config_entities?: boolean\n }\n\n /**\n * Dashboard Information Object.\n *\n * Home Assistant passes this object to the Dashboard Generator method.\n *\n * @property {LovelaceConfig} config Dashboard configuration.\n * @property {HomeAssistant} hass The Home Assistant object.\n *\n * @see https://developers.home-assistant.io/docs/frontend/custom-ui/custom-strategy/#dashboard-strategies\n */\n export interface DashBoardInfo {\n config?: LovelaceConfig & {\n strategy: {\n options?: StrategyConfig\n }\n };\n hass: HomeAssistant;\n }\n\n /**\n * View Information Object.\n *\n * Home Assistant passes this object to the View Generator method.\n *\n * @property {LovelaceViewConfig} view View configuration.\n * @property {LovelaceConfig} config Dashboard configuration.\n * @property {HomeAssistant} hass The Home Assistant object.\n *\n * @see https://developers.home-assistant.io/docs/frontend/custom-ui/custom-strategy/#view-strategies\n */\n export interface ViewInfo {\n view: LovelaceViewConfig & {\n strategy?: {\n options?: StrategyConfig & { viewId: string, area: StrategyArea, floor: StrategyFloor }\n }\n };\n config: LovelaceConfig\n hass: HomeAssistant;\n }\n\n /**\n * Strategy Configuration.\n *\n * @property {Object.} areas List of areas.\n * @property {Object.} [card_options] Card options for entities.\n * @property {chips} [chips] List of chips to show in the Home view.\n * @property {boolean} [debug] Set to true for more verbose debugging info.\n * @property {Object.} domains List of domains.\n * @property {object[]} [extra_cards] List of cards to show below room cards.\n * @property {object[]} [extra_views] List of views to add to the dashboard.\n * @property {object[]} [quick_access_cards] List of cards to show between welcome card and rooms cards.\n * @property {Object.} views List of views.\n */\n export interface StrategyConfig {\n areas: { [k: string]: StrategyArea };\n floors: { [k: string]: StrategyFloor };\n card_options?: { [k: string]: CustomCardConfig };\n chips?: Chips;\n debug: boolean;\n domains: { [k: string]: DomainConfig };\n extra_cards?: LovelaceCardConfig[];\n extra_views?: ViewConfig[];\n home_view: {\n hidden: HiddenSectionType[]\n }\n quick_access_cards?: LovelaceCardConfig[];\n views: { [k: string]: ViewConfig };\n }\n\n const hiddenSectionList = [\"chips\", \"persons\", \"greeting\", \"areas\", \"areasTitle\"] as const;\n export type HiddenSectionType = typeof hiddenSectionList[number];\n\n /**\n * Represents the default configuration for a strategy.\n */\n export interface StrategyDefaults extends StrategyConfig {\n areas: {\n undisclosed: StrategyArea & {\n area_id: \"undisclosed\",\n },\n [k: string]: StrategyArea,\n },\n floors: {\n undisclosed: StrategyFloor & {\n floor_id: \"undisclosed\",\n },\n [k: string]: StrategyFloor,\n },\n domains: {\n default: DomainConfig,\n [k: string]: DomainConfig,\n }\n }\n\n /**\n * Strategy Device.\n *\n */\n export interface StrategyDevice extends DeviceRegistryEntry {\n floor_id: string | null;\n entities: string[];\n }\n\n export interface MagicAreaRegistryEntry extends DeviceRegistryEntry {\n entities: Record;\n area_name: string;\n }\n\n /**\n * Strategy Entity.\n *\n */\n export interface StrategyEntity extends EntityRegistryEntry {\n floor_id: string | null;\n }\n\n /**\n * Strategy Area.\n *\n * @property {number} [order] Ordering position of the area in the list of available areas.\n * @property {boolean} [hidden] True if the entity should be hidden from the dashboard.\n * @property {object[]} [extra_cards] An array of card configurations.\n * The configured cards are added to the dashboard.\n * @property {string} [type=default] The type of area card.\n */\n export interface StrategyArea extends AreaRegistryEntry {\n slug: string;\n domains: Record;\n order?: number;\n hidden?: boolean;\n extra_cards?: LovelaceCardConfig[];\n type?: string;\n devices: string[];\n entities: string[];\n magicAreaDevice?: StrategyDevice;\n }\n\n /**\n * Strategy Floor.\n *\n * @property {number} [order] Ordering position of the area in the list of available areas.\n * @property {boolean} [hidden] True if the entity should be hidden from the dashboard.\n */\n export interface StrategyFloor extends FloorRegistryEntry {\n order?: number;\n hidden?: boolean;\n type?: string;\n areas_slug: string[];\n }\n\n /**\n * A list of chips to show in the Home view.\n *\n * @property {boolean} light_count Chip to display the number of lights on.\n * @property {boolean} fan_count Chip to display the number of fans on.\n * @property {boolean} cover_count Chip to display the number of unclosed covers.\n * @property {boolean} switch_count Chip to display the number of switches on.\n * @property {boolean} climate_count Chip to display the number of climates which are not off.\n * @property {string} weather_entity Entity ID for the weather chip to use, accepts `weather.` only.\n * @property {object[]} extra_chips List of extra chips.\n */\n export interface Chips {\n extra_chips: LovelaceChipConfig[];\n\n light_count: boolean;\n fan_count: boolean;\n cover_count: boolean;\n switch_count: boolean;\n climate_count: boolean;\n weather_entity: string;\n alarm_entity: string;\n\n [key: string]: any;\n }\n\n /**\n * Custom Card Configuration for an entity.\n *\n * @property {boolean} hidden True if the entity should be hidden from the dashboard.\n */\n export interface CustomCardConfig extends LovelaceCardConfig {\n hidden?: boolean;\n }\n\n /**\n * Area Filter Context.\n *\n * @property {AreaRegistryEntry} area Area Entity.\n * @property {string[]} areaDeviceIds The id of devices which are linked to the area entity.\n * @property {string} domain Domain of the entity.\n * Example: `light`.\n */\n export interface AreaFilterContext {\n area: AreaRegistryEntry;\n areaDeviceIds: string[];\n domain: string;\n }\n\n /**\n * Checks if the given object is an instance of CallServiceActionConfig.\n *\n * @param {any} obj - The object to be checked.\n * @return {boolean} - Returns true if the object is an instance of CallServiceActionConfig, otherwise false.\n */\n export function isCallServiceActionConfig(obj: any): obj is CallServiceActionConfig {\n return obj && obj.action === \"call-service\" && [\"action\", \"service\"].every(key => key in obj);\n }\n\n /**\n * Checks if the given object is an instance of HassServiceTarget.\n *\n * @param {any} obj - The object to check.\n * @return {boolean} - True if the object is an instance of HassServiceTarget, false otherwise.\n */\n export function isCallServiceActionTarget(obj: any): obj is HassServiceTarget {\n return obj && [\"entity_id\", \"device_id\", \"area_id\"].some(key => key in obj);\n }\n}\n","import { Helper } from \"./Helper\";\nimport { EntityRegistryEntry } from \"./types/homeassistant/data/entity_registry\";\nimport { generic } from \"./types/strategy/generic\";\nimport MagicAreaRegistryEntry = generic.MagicAreaRegistryEntry;\nimport StrategyFloor = generic.StrategyFloor;\nimport StrategyArea = generic.StrategyArea;\nimport { ActionConfig } from \"./types/homeassistant/data/lovelace\";\nimport { DEVICE_CLASSES, AGGREGATE_DOMAINS, GROUP_DOMAINS, LIGHT_DOMAIN, UNDISCLOSED } from \"./variables\";\nimport { LovelaceChipConfig } from \"./types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { UnavailableChip } from \"./chips/UnavailableChip\";\nimport { chips } from \"./types/strategy/chips\";\n\n/**\n * Groups the elements of an array based on a provided function\n * @param {T[]} array - The array to group\n * @param {(item: T) => K} fn - The function to determine the group key for each element\n * @returns {Record} - An object where the keys are the group identifiers and the values are arrays of grouped elements\n */\nexport function groupBy(array: T[], fn: (item: T) => K): Record {\n return array.reduce((result, item) => {\n // Determine the group key for the current item\n const key = fn(item);\n\n // If the group key does not exist in the result, create an array for it\n if (!result[key]) {\n result[key] = [];\n }\n\n // Add the current item to the group\n result[key].push(item);\n\n return result;\n }, {} as Record);\n}\n\nexport function slugify(text: string | null, separator: string = \"_\"): string {\n if (text === \"\" || text === null) {\n return \"\";\n }\n const slug = text.toLowerCase()\n .normalize(\"NFD\")\n .replace(/[\\u0300-\\u036f]/g, \"\")\n .replace(/\\s+/g, separator)\n .replace(/-/g, \"_\");\n return slug === \"\" ? \"unknown\" : slug;\n}\n\nexport function getMagicAreaSlug(device: MagicAreaRegistryEntry): string {\n return slugify(device.name ?? \"\".replace('-', '_'));\n}\n\nexport function getStateContent(entity_id: string): string {\n return entity_id.startsWith('binary_sensor.') ? 'last-changed' : 'state'\n}\n\nexport function navigateTo(path: string): ActionConfig {\n return {\n action: \"navigate\",\n navigation_path: `${path}`,\n }\n}\n\nexport function getAggregateEntity(device: MagicAreaRegistryEntry, domains: string | string[], device_classes?: string | string[]): EntityRegistryEntry[] {\n const aggregateKeys: EntityRegistryEntry[] = [];\n const domainList = Array.isArray(domains) ? domains : [domains];\n const deviceClassList = Array.isArray(device_classes) ? device_classes : [device_classes];\n\n domainList.forEach(domain => {\n if (domain === \"light\") {\n Object.values(device?.entities ?? {}).forEach(entity => {\n if (entity.entity_id.endsWith('_lights')) {\n aggregateKeys.push(entity);\n }\n });\n } else if (GROUP_DOMAINS.includes(domain)) {\n aggregateKeys.push(device?.entities[`${domain}_group` as 'cover_group']);\n } else if (AGGREGATE_DOMAINS.includes(domain)) {\n deviceClassList.forEach(device_class => {\n aggregateKeys.push(device?.entities[`aggregate_${device_class}` as 'aggregate_motion']);\n });\n }\n });\n\n return aggregateKeys.filter(Boolean);\n}\n\nexport function getMAEntity(magic_device_id: string, domain: string, device_class?: string): EntityRegistryEntry | undefined {\n const magicAreaDevice = Helper.magicAreasDevices[magic_device_id];\n\n // TODO remove '' when new release\n if (domain === LIGHT_DOMAIN) return magicAreaDevice?.entities?.[''] ?? magicAreaDevice?.entities?.['all_lights']\n if (GROUP_DOMAINS.includes(domain)) return magicAreaDevice?.entities?.[`${domain}_group` as 'cover_group']\n if (device_class && [...DEVICE_CLASSES.binary_sensor, ...DEVICE_CLASSES.sensor].includes(device_class)) return magicAreaDevice?.entities?.[`aggregate_${device_class}` as 'aggregate_motion']\n return undefined\n}\n\nexport function groupEntitiesByDomain(entity_ids: string[]): Record {\n return entity_ids\n .reduce((acc: Record, entity_id) => {\n let domain = entity_id.split(\".\")[0];\n\n if (Object.keys(DEVICE_CLASSES).includes(domain)) {\n const entityState = Helper.getEntityState(entity_id);\n\n if (entityState?.attributes?.device_class) {\n domain = entityState.attributes.device_class\n }\n }\n if (!acc[domain]) {\n acc[domain] = [];\n }\n acc[domain].push(entity_id);\n return acc;\n }, {});\n}\n\n// Numeric chips.\nexport async function createChipsFromList(chipsList: string[], chipOptions?: Partial, magic_device_id: string = \"global\", area_slug?: string | string[]) {\n const chips: LovelaceChipConfig[] = [];\n\n const area_slugs = area_slug ? Array.isArray(area_slug) ? area_slug : [area_slug] : [];\n\n const domains = magic_device_id === \"global\"\n ? Object.keys(Helper.domains)\n : area_slugs.flatMap(area_slug => Object.keys(Helper.areas[area_slug]?.domains ?? {}));\n\n for (let chipType of chipsList) {\n if (!domains.includes(chipType)) continue;\n\n const className = Helper.sanitizeClassName(chipType + \"Chip\");\n\n try {\n let chipModule;\n if ([...DEVICE_CLASSES.binary_sensor, ...DEVICE_CLASSES.sensor].includes(chipType)) {\n chipModule = await import(\"./chips/AggregateChip\");\n const chip = new chipModule.AggregateChip({ ...chipOptions, device_class: chipType, area_slug, magic_device_id });\n chips.push(chip.getChip());\n } else {\n chipModule = await import(\"./chips/\" + className);\n const chip = new chipModule[className]({ ...chipOptions, area_slug });\n chips.push(chip.getChip());\n }\n } catch (e) {\n Helper.logError(`An error occurred while creating the ${chipType} chip!`, e);\n\n }\n }\n\n const unavailableChip = new UnavailableChip({ area_slug }).getChip();\n if (unavailableChip) chips.push(unavailableChip);\n\n return chips;\n}\n\nexport function getDomainTranslationKey(domain: string, device_class?: string) {\n if (domain === 'scene') return 'ui.dialogs.quick-bar.commands.navigation.scene'\n\n if (AGGREGATE_DOMAINS.includes(domain) && device_class) return `component.${domain}.entity_component.${device_class}.name`\n return `component.${domain}.entity_component._.name`\n}\n\nexport function getStateTranslationKey(state: string, domain: string, device_class?: string) {\n if (domain === 'scene') return 'ui.dialogs.quick-bar.commands.navigation.scene'\n\n if (AGGREGATE_DOMAINS.includes(domain)) return `component.${domain}.entity_component.${device_class}.state.${state}`\n\n return `component.${domain}.entity_component._.name`\n}\n\nexport function getFloorName(floor: StrategyFloor): string {\n return floor.floor_id === UNDISCLOSED ? Helper.localize(\"component.linus_dashboard.entity.button.floor_not_found.name\") : floor.name!\n}\n\nexport function getAreaName(area: StrategyArea): string {\n return area.area_id === UNDISCLOSED ? Helper.localize(\"ui.card.area.area_not_found\") : area.name!\n}","export const MAGIC_AREAS_DOMAIN = \"magic_areas\";\nexport const MAGIC_AREAS_NAME = \"Magic Areas\";\n\nexport const UNAVAILABLE = \"unavailable\";\nexport const UNDISCLOSED = \"undisclosed\";\n\nexport const TOD_ORDER = [\"morning\", \"daytime\", \"evening\", \"night\"];\n\nexport const LIGHT_DOMAIN = \"light\";\nexport const GROUP_DOMAINS = [\"climate\", \"media_player\", \"cover\"];\nexport const AGGREGATE_DOMAINS = [\"binary_sensor\", \"sensor\"];\n\nexport const DEVICE_CLASSES = {\n sensor: [\"illuminance\", \"temperature\", \"humidity\", \"battery\", \"energy\", \"power\"],\n binary_sensor: [\"motion\", \"door\", \"window\", \"vibration\", \"moisture\", \"smoke\"],\n};\n\nexport const AREA_CARDS_DOMAINS = [LIGHT_DOMAIN, \"switch\", \"climate\", \"fan\", \"camera\", \"cover\", \"vacuum\", \"media_player\", \"lock\", \"scene\", \"plant\", \"binary_sensor\", \"sensor\"];\n\nexport const CUSTOM_VIEWS = [\"home\", \"security\", \"security-details\"];\n\nexport const DOMAINS_VIEWS = [...AREA_CARDS_DOMAINS, ...DEVICE_CLASSES.binary_sensor, ...DEVICE_CLASSES.sensor];\n\nexport const HOME_EXPOSED_CHIPS = [\"weather\", \"alarm\", \"spotify\", LIGHT_DOMAIN, ...GROUP_DOMAINS, \"fan\", \"switch\", \"safety\", \"motion\", \"door\", \"window\"];\nexport const AREA_EXPOSED_CHIPS = [LIGHT_DOMAIN, ...GROUP_DOMAINS, \"fan\", \"switch\", \"safety\", ...DEVICE_CLASSES.binary_sensor, ...DEVICE_CLASSES.sensor];\n\nexport const DEVICE_ICONS = {\n presence_hold: 'mdi:car-brake-hold'\n};\n\nexport const VIEWS_ICONS = {\n home: \"mdi:home-assistant\",\n security: \"mdi:security\",\n};\n\nexport const AREA_STATE_ICONS = {\n occupied: \"mdi:account\",\n extended: \"mdi:account-clock\",\n clear: \"mdi:account-off\",\n bright: \"mdi:brightness-2\",\n dark: \"mdi:brightness-5\",\n sleep: \"mdi:bed\",\n};\n\nexport const AREA_CONTROL_ICONS = {\n light: \"mdi:lightbulb-auto-outline\",\n climate: \"mdi:thermostat-auto\",\n media_player: \"mdi:auto-mode\",\n};\n","import { AREA_CARDS_DOMAINS, UNDISCLOSED } from './../variables';\nimport { Helper } from \"../Helper\";\nimport { ControllerCard } from \"../cards/ControllerCard\";\nimport { LovelaceGridCardConfig, StackCardConfig } from \"../types/homeassistant/lovelace/cards/types\";\nimport { LovelaceCardConfig, LovelaceSectionConfig, LovelaceViewConfig } from \"../types/homeassistant/data/lovelace\";\nimport { HassServiceTarget } from \"home-assistant-js-websocket\";\nimport { TemplateCardConfig } from '../types/lovelace-mushroom/cards/template-card-config';\nimport { ChipsCardConfig } from '../types/lovelace-mushroom/cards/chips-card';\nimport { SwipeCard } from '../cards/SwipeCard';\nimport { getAreaName, getFloorName, slugify } from '../utils';\nimport { views } from '../types/strategy/views';\n\n/**\n * Abstract View Class.\n *\n * To create a new view, extend the new class with this one.\n *\n * @class\n * @abstract\n */\nabstract class AbstractView {\n /**\n * Configuration of the view.\n *\n * @type {views.ViewConfig}\n */\n config: views.ViewConfig = {\n icon: \"mdi:view-dashboard\",\n type: \"sections\",\n subview: false,\n };\n\n /**\n * A card to switch all entities in the view.\n *\n * @type {LovelaceCardConfig[]}\n */\n viewControllerCard: LovelaceCardConfig[] = []\n\n /**\n * The domain of which we operate the devices.\n *\n * @private\n * @readonly\n */\n readonly #domain: string;\n\n /**\n * The device class of the view.\n *\n * @private\n * @readonly\n */\n readonly #device_class?: string;\n\n /**\n * Class constructor.\n *\n * @param {string} [domain] The domain which the view is representing.\n * @param {string} [device_class] The device class which the view is representing.\n *\n * @throws {Error} If trying to instantiate this class.\n * @throws {Error} If the Helper module isn't initialized.\n */\n protected constructor(domain: string, device_class?: string) {\n if (!Helper.isInitialized()) {\n throw new Error(\"The Helper module must be initialized before using this one.\");\n }\n\n this.#domain = domain;\n this.#device_class = device_class;\n }\n\n /**\n * Create the cards to include in the view.\n *\n * @return {Promise<(StackCardConfig | TemplateCardConfig | ChipsCardConfig)[]>} Promise a View Card array.\n * @override\n */\n async createViewCards(): Promise<(StackCardConfig | TemplateCardConfig | ChipsCardConfig)[]> {\n return []\n }\n\n /**\n * Create the cards to include in the view.\n *\n * @return {Promise<(StackCardConfig | TemplateCardConfig | ChipsCardConfig)[]>} Promise a View Card array.\n * @override\n */\n async createSectionBadges(): Promise<(StackCardConfig | TemplateCardConfig | ChipsCardConfig)[]> {\n return []\n }\n\n /**\n * Create the cards to include in the view.\n *\n * @return {Promise} Promise a View Card array.\n * @override\n */\n async createSectionCards(): Promise {\n const viewSections: LovelaceGridCardConfig[] = [];\n const configEntityHidden = Helper.strategyOptions.domains[this.#domain ?? \"_\"].hide_config_entities\n || Helper.strategyOptions.domains[\"_\"].hide_config_entities;\n let isFirstLoop = true;\n\n for (const floor of Helper.orderedFloors) {\n if (floor.areas_slug.length === 0 || !AREA_CARDS_DOMAINS.includes(this.#domain ?? \"\")) continue;\n\n const floorCards = [];\n\n for (const area of floor.areas_slug.map(area_slug => Helper.areas[area_slug])) {\n const entities = Helper.getAreaEntities(area, this.#device_class ?? this.#domain);\n const className = Helper.sanitizeClassName(this.#domain + \"Card\");\n const cardModule = await import(`../cards/${className}`);\n\n if (entities.length === 0 || !cardModule) continue;\n\n let target: HassServiceTarget = { area_id: [area.slug] };\n if (area.area_id === UNDISCLOSED) {\n target = { entity_id: entities.map(entity => entity.entity_id) };\n }\n\n const entityCards = entities\n .filter(entity => !Helper.strategyOptions.card_options?.[entity.entity_id]?.hidden\n && !Helper.strategyOptions.card_options?.[entity.device_id ?? \"null\"]?.hidden\n && !(entity.entity_category === \"config\" && configEntityHidden))\n .map(entity => new cardModule[className](entity).getCard());\n\n if (entityCards.length) {\n const areaCards = entityCards.length > 2 ? [new SwipeCard(entityCards).getCard()] : entityCards;\n const titleCardOptions = {\n ...Helper.strategyOptions.domains[this.#domain].controllerCardOptions,\n subtitle: getAreaName(area),\n subtitleIcon: area.area_id === UNDISCLOSED ? \"mdi:help-circle\" : area.icon ?? \"mdi:floor-plan\",\n subtitleNavigate: area.slug\n } as any;\n if (this.#domain) {\n titleCardOptions.showControls = Helper.strategyOptions.domains[this.#domain].showControls;\n titleCardOptions.extraControls = Helper.strategyOptions.domains[this.#domain].extraControls;\n titleCardOptions.controlChipOptions = { device_class: this.#device_class, area_slug: area.slug }\n }\n const areaControllerCard = new ControllerCard(target, titleCardOptions, this.#domain, area.slug).createCard();\n\n floorCards.push(...areaControllerCard, ...areaCards);\n }\n }\n\n if (floorCards.length) {\n const titleSectionOptions: any = {\n ...Helper.strategyOptions.domains[this.#domain].controllerCardOptions,\n title: getFloorName(floor),\n titleIcon: floor.icon ?? \"mdi:floor-plan\",\n titleNavigate: slugify(floor.name)\n };\n if (this.#domain) {\n titleSectionOptions.showControls = Helper.strategyOptions.domains[this.#domain].showControls;\n titleSectionOptions.extraControls = Helper.strategyOptions.domains[this.#domain].extraControls;\n titleSectionOptions.controlChipOptions = {\n device_class: this.#device_class,\n area_slug: floor.areas_slug\n }\n }\n\n const area_ids = floor.areas_slug.map(area_slug => Helper.areas[area_slug].area_id);\n const floorControllerCard = new ControllerCard(\n { area_id: area_ids },\n titleSectionOptions,\n this.#domain,\n floor.floor_id\n ).createCard();\n\n const section = { type: \"grid\", cards: [] } as LovelaceGridCardConfig;\n if (isFirstLoop) {\n section.cards.push(...this.viewControllerCard);\n isFirstLoop = false;\n }\n\n section.cards.push(...floorControllerCard);\n section.cards.push(...floorCards);\n viewSections.push(section);\n }\n }\n\n\n return viewSections;\n }\n\n /**\n * Get a view object.\n *\n * The view includes the cards which are created by method createViewCards().\n *\n * @returns {Promise} The view object.\n */\n async getView(): Promise {\n return {\n ...this.config,\n badges: await this.createSectionBadges(),\n sections: await this.createSectionCards(),\n cards: await this.createViewCards(),\n };\n }\n\n /**\n * Get a target of entity IDs for the given domain.\n *\n * @param {string} domain - The target domain to retrieve entity IDs from.\n * @return {HassServiceTarget} - A target for a service call.\n */\n targetDomain(domain: string): HassServiceTarget {\n return {\n entity_id: Helper.domains[domain]?.filter(\n entity =>\n !entity.hidden_by\n && !Helper.strategyOptions.card_options?.[entity.entity_id]?.hidden\n ).map(entity => entity.entity_id),\n };\n }\n}\n\nexport { AbstractView };\n","import { Helper } from \"../Helper\";\nimport { ControllerCard } from \"../cards/ControllerCard\";\nimport { AbstractView } from \"./AbstractView\";\nimport { views } from \"../types/strategy/views\";\nimport { DEVICE_CLASSES } from \"../variables\";\nimport { getDomainTranslationKey } from \"../utils\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Aggregate View Class.\n *\n * Used to create a view for entities of the fan domain.\n *\n * @class AggregateView\n * @extends AbstractView\n */\nclass AggregateView extends AbstractView {\n\n /**\n * Default configuration of the view.\n *\n * @type {views.ViewConfig}\n * @private\n */\n #defaultConfig: views.ViewConfig = {\n title: \"Aggregates\",\n icon: \"mdi:fan\",\n subview: true,\n };\n\n /**\n * Class constructor.\n *\n * @param {views.AggregateViewOptions} [options={}] Options for the view.\n */\n constructor(options: views.AggregateViewOptions) {\n const domain = DEVICE_CLASSES.sensor.includes(options?.device_class) ? \"sensor\" : \"binary_sensor\";\n super(domain, options?.device_class);\n\n // Create a Controller card to switch all entities of the domain.\n this.viewControllerCard = new ControllerCard(\n this.targetDomain(options?.device_class),\n {\n title: `${Helper.localize(getDomainTranslationKey(domain, options?.device_class))}s`,\n // subtitle: Helper.getDeviceClassCountTemplate(options?.device_class, \"eq\", \"on\") + ` ${Helper.localize(getStateTranslationKey(\"on\", domain, options?.device_class))}s`,\n controlChipOptions: { device_class: options?.device_class },\n }, domain, \"global\").createCard();\n\n }\n}\n\nexport { AggregateView };\n","import { Helper } from \"../Helper\";\nimport { views } from \"../types/strategy/views\";\nimport { ChipsCardConfig } from \"../types/lovelace-mushroom/cards/chips-card\";\nimport { LovelaceGridCardConfig, StackCardConfig } from \"../types/homeassistant/lovelace/cards/types\";\nimport { TemplateCardConfig } from \"../types/lovelace-mushroom/cards/template-card-config\";\nimport { LovelaceViewConfig } from \"../types/homeassistant/data/lovelace\";\nimport { generic } from \"../types/strategy/generic\";\nimport StrategyArea = generic.StrategyArea;\nimport { SwipeCard } from \"../cards/SwipeCard\";\nimport { EntityCardConfig } from \"../types/lovelace-mushroom/cards/entity-card-config\";\nimport { ControllerCard } from \"../cards/ControllerCard\";\nimport { HassServiceTarget } from \"home-assistant-js-websocket\";\nimport { ImageAreaCard } from \"../cards/ImageAreaCard\";\nimport { AREA_EXPOSED_CHIPS, UNDISCLOSED } from \"../variables\";\nimport { LovelaceChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { AreaStateChip } from \"../chips/AreaStateChip\";\nimport { createChipsFromList, getDomainTranslationKey } from \"../utils\";\nimport { ResourceKeys } from \"../types/homeassistant/data/frontend\";\n\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Area View Class.\n *\n * Used to create a Area view.\n *\n * @class AreaView\n */\nclass AreaView {\n /**\n * Default configuration of the view.\n *\n * @type {views.ViewConfig}\n * @private\n */\n config: views.ViewConfig = {\n icon: \"mdi:home-assistant\",\n type: \"sections\",\n subview: true,\n };\n\n\n /**\n * Default configuration of the view.\n *\n * @type {StrategyArea}\n * @private\n */\n area: StrategyArea\n\n /**\n * Class constructor.\n *\n * @param {views.ViewConfig} [options={}] Options for the view.\n */\n constructor(area: StrategyArea, options: views.ViewConfig = {}) {\n\n this.area = area;\n\n this.config = { ...this.config, ...options };\n }\n\n /**\n * Create the cards to include in the view.\n *\n * @return {Promise<(StackCardConfig | TemplateCardConfig | ChipsCardConfig)[]>} Promise a View Card array.\n * @override\n */\n async createSectionBadges(): Promise<(StackCardConfig | TemplateCardConfig | ChipsCardConfig)[]> {\n\n if (Helper.strategyOptions.home_view.hidden.includes(\"chips\")) {\n // Chips section is hidden.\n\n return [];\n }\n\n const chips: LovelaceChipConfig[] = [];\n\n const device = Helper.magicAreasDevices[this.area.slug];\n\n if (device) {\n chips.push(new AreaStateChip(device, true).getChip());\n }\n\n\n const areaChips = await createChipsFromList(AREA_EXPOSED_CHIPS, { show_content: true }, this.area.slug, this.area.slug);\n if (areaChips) {\n chips.push(...areaChips);\n }\n\n // (device?.entities.all_lights && device?.entities.all_lights.entity_id !== \"unavailable\" ? {\n // type: \"custom:mushroom-chips-card\",\n // alignment: \"center\",\n // chips: new AreaScenesChips(device, area).getChips()\n // } : undefined)\n\n return chips.map(chip => ({\n type: \"custom:mushroom-chips-card\",\n alignment: \"center\",\n chips: [chip],\n }));\n }\n\n /**\n * Create the cards to include in the view.\n *\n * @return {Promise} Promise a View Card array.\n * @override\n */\n async createSectionCards(): Promise {\n const viewSections: LovelaceGridCardConfig[] = [];\n const exposedDomainIds = Helper.getExposedDomainIds();\n\n // Create global section card if area is not undisclosed\n if (this.area.area_id !== UNDISCLOSED && this.area.picture) {\n viewSections.push({\n type: \"grid\",\n column_span: 1,\n cards: [new ImageAreaCard(this.area.area_id).getCard()],\n });\n }\n\n let target: HassServiceTarget = { area_id: [this.area.slug] };\n\n for (const domain of exposedDomainIds) {\n if (domain === \"default\") continue;\n\n try {\n const cardModule = await import(`../cards/${Helper.sanitizeClassName(domain + \"Card\")}`);\n const entities = Helper.getAreaEntities(this.area, domain);\n const configEntityHidden = Helper.strategyOptions.domains[domain]?.hide_config_entities || Helper.strategyOptions.domains[\"_\"].hide_config_entities;\n\n if (this.area.area_id === UNDISCLOSED) {\n target = { entity_id: entities.map(entity => entity.entity_id) };\n }\n\n const domainCards: EntityCardConfig[] = [];\n\n if (entities.length) {\n const titleCardOptions = {\n ...Helper.strategyOptions.domains[domain].controllerCardOptions,\n subtitle: Helper.localize(getDomainTranslationKey(domain)),\n domain,\n subtitleIcon: Helper.icons[domain as ResourceKeys]._?.default,\n subtitleNavigate: domain,\n };\n\n if (domain) {\n titleCardOptions.showControls = Helper.strategyOptions.domains[domain].showControls;\n titleCardOptions.extraControls = Helper.strategyOptions.domains[domain].extraControls;\n titleCardOptions.controlChipOptions = { area_slug: this.area.slug };\n }\n\n const titleCard = new ControllerCard(target, titleCardOptions, domain, this.area.slug).createCard();\n\n const entityCards = entities\n .filter(entity => {\n const cardOptions = Helper.strategyOptions.card_options?.[entity.entity_id];\n const deviceOptions = Helper.strategyOptions.card_options?.[entity.device_id ?? \"null\"];\n return !cardOptions?.hidden && !deviceOptions?.hidden && !(entity.entity_category === \"config\" && configEntityHidden);\n })\n .map(entity => {\n const cardOptions = Helper.strategyOptions.card_options?.[entity.entity_id];\n if (domain === \"sensor\" && Helper.getEntityState(entity.entity_id)?.attributes.unit_of_measurement) {\n return new cardModule[Helper.sanitizeClassName(domain + \"Card\")](entity, {\n type: \"custom:mini-graph-card\",\n entities: [entity.entity_id],\n ...cardOptions,\n }).getCard();\n }\n return new cardModule[Helper.sanitizeClassName(domain + \"Card\")](entity, cardOptions).getCard();\n });\n\n if (entityCards.length) {\n domainCards.push(...(entityCards.length > 2 ? [new SwipeCard(entityCards).getCard()] : entityCards));\n domainCards.unshift(...titleCard);\n }\n\n viewSections.push({\n type: \"grid\",\n column_span: 1,\n cards: domainCards,\n });\n }\n } catch (e) {\n Helper.logError(\"An error occurred while creating the domain cards!\", e);\n }\n }\n\n // Handle default domain if not hidden\n if (!Helper.strategyOptions.domains.default.hidden) {\n const areaDevices = this.area.devices.filter(device_id => Helper.devices[device_id].area_id === this.area.area_id);\n const miscellaneousEntities = this.area.entities.filter(entity_id => {\n const entity = Helper.entities[entity_id];\n const entityLinked = areaDevices.includes(entity.device_id ?? \"null\") || entity.area_id === this.area.area_id;\n const entityUnhidden = entity.hidden_by === null && entity.disabled_by === null;\n const domainExposed = exposedDomainIds.includes(entity.entity_id.split(\".\", 1)[0]);\n\n return entityUnhidden && !domainExposed && entityLinked;\n });\n\n if (miscellaneousEntities.length) {\n try {\n const cardModule = await import(\"../cards/MiscellaneousCard\");\n\n const swipeCard = miscellaneousEntities\n .filter(entity_id => {\n const entity = Helper.entities[entity_id];\n const cardOptions = Helper.strategyOptions.card_options?.[entity.entity_id];\n const deviceOptions = Helper.strategyOptions.card_options?.[entity.device_id ?? \"null\"];\n return !cardOptions?.hidden && !deviceOptions?.hidden && !(entity.entity_category === \"config\" && Helper.strategyOptions.domains[\"_\"].hide_config_entities);\n })\n .map(entity_id => new cardModule.MiscellaneousCard(Helper.entities[entity_id], Helper.strategyOptions.card_options?.[entity_id]).getCard());\n\n viewSections.push({\n type: \"grid\",\n column_span: 1,\n cards: [new SwipeCard(swipeCard).getCard()],\n });\n } catch (e) {\n Helper.logError(\"An error occurred while creating the domain cards!\", e);\n }\n }\n }\n\n return viewSections;\n }\n\n\n /**\n * Get a view object.\n *\n * The view includes the cards which are created by method createSectionCards().\n *\n * @returns {Promise} The view object.\n */\n async getView(): Promise {\n return {\n ...this.config,\n badges: await this.createSectionBadges(),\n sections: await this.createSectionCards(),\n };\n }\n\n}\n\nexport { AreaView };","import { ControllerCard } from \"../cards/ControllerCard\";\nimport { AbstractView } from \"./AbstractView\";\nimport { views } from \"../types/strategy/views\";\nimport { cards } from \"../types/strategy/cards\";\nimport { Helper } from \"../Helper\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Camera View Class.\n *\n * Used to create a view for entities of the camera domain.\n *\n * @class CameraView\n * @extends AbstractView\n */\nclass CameraView extends AbstractView {\n /**\n * Domain of the view's entities.\n *\n * @type {string}\n * @static\n * @private\n */\n static #domain: string = \"camera\";\n\n /**\n * Default configuration of the view.\n *\n * @type {views.ViewConfig}\n * @private\n */\n #defaultConfig: views.ViewConfig = {\n title: \"Cameras\",\n icon: \"mdi:cctv\",\n subview: false,\n };\n\n /**\n * Default configuration of the view's Controller card.\n *\n * @type {cards.ControllerCardOptions}\n * @private\n */\n #viewControllerCardConfig: cards.ControllerCardOptions = {\n title: `${Helper.localize(`component.camera.entity_component._.name`)}s`,\n // subtitle: Helper.getCountTemplate(CameraView.#domain, \"ne\", \"off\") + ` ${Helper.localize(\"component.light.entity_component._.state.on\")}`,\n };\n\n /**\n * Class constructor.\n *\n * @param {views.ViewConfig} [options={}] Options for the view.\n */\n constructor(options: views.ViewConfig = {}) {\n super(CameraView.#domain);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n\n // Create a Controller card to switch all entities of the domain.\n this.viewControllerCard = new ControllerCard(\n this.targetDomain(CameraView.#domain),\n {\n ...this.#viewControllerCardConfig,\n ...Helper.strategyOptions.domains.camera.controllerCardOptions,\n }, CameraView.#domain).createCard();\n }\n}\n\nexport { CameraView };\n","import { Helper } from \"../Helper\";\nimport { ControllerCard } from \"../cards/ControllerCard\";\nimport { AbstractView } from \"./AbstractView\";\nimport { views } from \"../types/strategy/views\";\nimport { cards } from \"../types/strategy/cards\";\nimport { ClimateCard } from \"../cards/ClimateCard\";\nimport { ClimateChip } from \"../chips/ClimateChip\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Climate View Class.\n *\n * Used to create a view for entities of the climate domain.\n *\n * @class ClimateView\n * @extends AbstractView\n */\nclass ClimateView extends AbstractView {\n /**\n * Domain of the view's entities.\n *\n * @type {string}\n * @static\n * @private\n */\n static #domain: string = \"climate\";\n\n /**\n * Default configuration of the view.\n *\n * @type {views.ViewConfig}\n * @private\n */\n #defaultConfig: views.ViewConfig = {\n title: \"Climates\",\n icon: \"mdi:thermostat\",\n subview: false,\n };\n\n /**\n * Default configuration of the view's Controller card.\n *\n * @type {cards.ControllerCardOptions}\n * @private\n */\n #viewControllerCardConfig: cards.ControllerCardOptions = {\n title: `${Helper.localize(`component.climate.entity_component._.name`)}s`,\n // subtitle: Helper.getCountTemplate(ClimateView.#domain, \"ne\", \"off\") + ` ${Helper.localize(`component.fan.entity_component._.state.on`)}s`,\n };\n\n /**\n * Class constructor.\n *\n * @param {views.ViewConfig} [options={}] Options for the view.\n */\n constructor(options: views.ViewConfig = {}) {\n super(ClimateView.#domain);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n\n // Create a Controller card to switch all entities of the domain.\n this.viewControllerCard = new ControllerCard(\n this.targetDomain(ClimateView.#domain),\n {\n ...this.#viewControllerCardConfig,\n ...Helper.strategyOptions.domains.climate.controllerCardOptions,\n }, ClimateView.#domain).createCard();\n }\n}\n\nexport { ClimateView };\n","import { Helper } from \"../Helper\";\nimport { ControllerCard } from \"../cards/ControllerCard\";\nimport { AbstractView } from \"./AbstractView\";\nimport { views } from \"../types/strategy/views\";\nimport { cards } from \"../types/strategy/cards\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Cover View Class.\n *\n * Used to create a view for entities of the cover domain.\n *\n * @class CoverView\n * @extends AbstractView\n */\nclass CoverView extends AbstractView {\n /**\n * Domain of the view's entities.\n *\n * @type {string}\n * @static\n * @private\n */\n static #domain: string = \"cover\";\n\n /**\n * Default configuration of the view.\n *\n * @type {views.ViewConfig}\n * @private\n */\n #defaultConfig: views.ViewConfig = {\n title: \"Covers\",\n icon: \"mdi:window-open\",\n subview: false,\n };\n\n /**\n * Default configuration of the view's Controller card.\n *\n * @type {cards.ControllerCardOptions}\n * @private\n */\n #viewControllerCardConfig: cards.ControllerCardOptions = {\n title: `${Helper.localize(`component.cover.entity_component._.name`)}`,\n // subtitle: Helper.getCountTemplate(CoverView.#domain, \"eq\", \"open\") + ` ${Helper.localize(`component.cover.entity_component._.state.open`)}`,\n };\n\n /**\n * Class constructor.\n *\n * @param {views.ViewConfig} [options={}] Options for the view.\n */\n constructor(options: views.ViewConfig = {}) {\n super(CoverView.#domain);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n\n // Create a Controller card to switch all entities of the domain.\n this.viewControllerCard = new ControllerCard(\n this.targetDomain(CoverView.#domain),\n {\n ...this.#viewControllerCardConfig,\n ...Helper.strategyOptions.domains.cover.controllerCardOptions,\n }, CoverView.#domain).createCard();\n }\n}\n\nexport { CoverView };\n","import { Helper } from \"../Helper\";\nimport { ControllerCard } from \"../cards/ControllerCard\";\nimport { AbstractView } from \"./AbstractView\";\nimport { views } from \"../types/strategy/views\";\nimport { cards } from \"../types/strategy/cards\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Fan View Class.\n *\n * Used to create a view for entities of the fan domain.\n *\n * @class FanView\n * @extends AbstractView\n */\nclass FanView extends AbstractView {\n /**\n * Domain of the view's entities.\n *\n * @type {string}\n * @static\n * @private\n */\n static #domain: string = \"fan\";\n\n /**\n * Default configuration of the view.\n *\n * @type {views.ViewConfig}\n * @private\n */\n #defaultConfig: views.ViewConfig = {\n title: \"Fans\",\n icon: \"mdi:fan\",\n subview: false,\n };\n\n /**\n * Default configuration of the view's Controller card.\n *\n * @type {cards.ControllerCardOptions}\n * @private\n */\n #viewControllerCardConfig: cards.ControllerCardOptions = {\n title: `${Helper.localize(`component.fan.entity_component._.name`)}s`,\n // subtitle: Helper.getCountTemplate(FanView.#domain, \"eq\", \"on\") + ` ${Helper.localize(`component.fan.entity_component._.state.on`)}s`,\n };\n\n /**\n * Class constructor.\n *\n * @param {views.ViewConfig} [options={}] Options for the view.\n */\n constructor(options: views.ViewConfig = {}) {\n super(FanView.#domain);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n\n // Create a Controller card to switch all entities of the domain.\n this.viewControllerCard = new ControllerCard(\n this.targetDomain(FanView.#domain),\n {\n ...this.#viewControllerCardConfig,\n ...Helper.strategyOptions.domains.fan.controllerCardOptions,\n }, FanView.#domain).createCard();\n }\n}\n\nexport { FanView };\n","import { Helper } from \"../Helper\";\nimport { views } from \"../types/strategy/views\";\nimport { ChipsCardConfig } from \"../types/lovelace-mushroom/cards/chips-card\";\nimport { LovelaceGridCardConfig, StackCardConfig } from \"../types/homeassistant/lovelace/cards/types\";\nimport { TemplateCardConfig } from \"../types/lovelace-mushroom/cards/template-card-config\";\nimport { LovelaceCardConfig, LovelaceViewConfig } from \"../types/homeassistant/data/lovelace\";\nimport { generic } from \"../types/strategy/generic\";\nimport StrategyFloor = generic.StrategyFloor;\nimport { SwipeCard } from \"../cards/SwipeCard\";\nimport { EntityCardConfig } from \"../types/lovelace-mushroom/cards/entity-card-config\";\nimport { ControllerCard } from \"../cards/ControllerCard\";\nimport { HassServiceTarget } from \"home-assistant-js-websocket\";\nimport { AREA_EXPOSED_CHIPS } from \"../variables\";\nimport { LovelaceChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { AreaStateChip } from \"../chips/AreaStateChip\";\nimport { createChipsFromList, getDomainTranslationKey } from \"../utils\";\n\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Floor View Class.\n *\n * Used to create a Floor view.\n *\n * @class FloorView\n */\nclass FloorView {\n /**\n * Default configuration of the view.\n *\n * @type {views.ViewConfig}\n * @private\n */\n config: views.ViewConfig = {\n icon: \"mdi:home-assistant\",\n type: \"sections\",\n subview: true,\n };\n\n\n /**\n * Default configuration of the view.\n *\n * @type {StrategyFloor}\n * @private\n */\n floor: StrategyFloor;\n\n /**\n * View controller card.\n *\n * @type {LovelaceGridCardConfig[]}\n * @private\n */\n viewControllerCard: LovelaceGridCardConfig[] = [];\n\n /**\n * Class constructor.\n *\n * @param {views.ViewConfig} [options={}] Options for the view.\n */\n constructor(floor: StrategyFloor, options: views.ViewConfig = {}) {\n\n this.floor = floor;\n\n this.config = { ...this.config, ...options };\n }\n\n /**\n * Create the cards to include in the view.\n *\n * @return {Promise<(StackCardConfig | TemplateCardConfig | ChipsCardConfig)[]>} Promise a View Card array.\n * @override\n */\n async createSectionBadges(): Promise<(StackCardConfig | TemplateCardConfig | ChipsCardConfig)[]> {\n\n if (Helper.strategyOptions.home_view.hidden.includes(\"chips\")) {\n // Chips section is hidden.\n return [];\n }\n\n const chips: LovelaceChipConfig[] = [];\n\n const device = Helper.magicAreasDevices[this.floor.floor_id];\n\n if (device) {\n chips.push(new AreaStateChip(device, true).getChip());\n }\n\n const areaChips = await createChipsFromList(AREA_EXPOSED_CHIPS, { show_content: true }, this.floor.floor_id, this.floor.areas_slug);\n if (areaChips) {\n chips.push(...areaChips);\n }\n\n return chips.map(chip => ({\n type: \"custom:mushroom-chips-card\",\n alignment: \"center\",\n chips: [chip],\n }));\n }\n\n /**\n * Create the cards to include in the view.\n *\n * @return {Promise} Promise a View Card array.\n * @override\n */\n async createSectionCards(): Promise {\n const viewSections: LovelaceGridCardConfig[] = [];\n const exposedDomainIds = Helper.getExposedDomainIds();\n let isFirstLoop = true;\n\n let target: HassServiceTarget = { area_id: this.floor.areas_slug };\n\n for (const domain of exposedDomainIds) {\n if (domain === \"default\") continue;\n\n const domainCards: LovelaceCardConfig[] = [];\n\n try {\n const cardModule = await import(`../cards/${Helper.sanitizeClassName(domain + \"Card\")}`);\n const configEntityHidden = Helper.strategyOptions.domains[domain]?.hide_config_entities || Helper.strategyOptions.domains[\"_\"].hide_config_entities;\n\n for (const area of this.floor.areas_slug.map(area_slug => Helper.areas[area_slug])) {\n\n if (!area) continue\n\n\n const areaEntities = Helper.getAreaEntities(area, domain);\n\n if (areaEntities.length) {\n const entityCards: EntityCardConfig[] = areaEntities\n .filter(entity => {\n const cardOptions = Helper.strategyOptions.card_options?.[entity.entity_id];\n const deviceOptions = Helper.strategyOptions.card_options?.[entity.device_id ?? \"null\"];\n return !cardOptions?.hidden && !deviceOptions?.hidden && !(entity.entity_category === \"config\" && configEntityHidden);\n })\n .map(entity => {\n const cardOptions = Helper.strategyOptions.card_options?.[entity.entity_id];\n if (domain === \"sensor\" && Helper.getEntityState(entity.entity_id)?.attributes.unit_of_measurement) {\n return new cardModule[Helper.sanitizeClassName(domain + \"Card\")](entity, {\n type: \"custom:mini-graph-card\",\n entities: [entity.entity_id],\n ...cardOptions,\n }).getCard();\n }\n return new cardModule[Helper.sanitizeClassName(domain + \"Card\")](entity, cardOptions).getCard();\n });\n\n if (entityCards.length) {\n const titleCardOptions = {\n ...Helper.strategyOptions.domains[domain].controllerCardOptions,\n subtitle: area.name,\n domain,\n subtitleIcon: area.icon,\n subtitleNavigate: area.slug,\n };\n\n if (domain) {\n titleCardOptions.showControls = Helper.strategyOptions.domains[domain].showControls;\n titleCardOptions.extraControls = Helper.strategyOptions.domains[domain].extraControls;\n titleCardOptions.controlChipOptions = { area_slug: area.slug };\n }\n\n const titleCard = new ControllerCard(target, titleCardOptions, domain, area.slug).createCard();\n\n let areaCards;\n areaCards = entityCards.length > 2 ? [new SwipeCard(entityCards).getCard()] : entityCards;\n areaCards.unshift(...titleCard);\n\n domainCards.push(...areaCards);\n }\n }\n }\n\n if (domainCards.length) {\n const titleSectionOptions: any = {\n ...Helper.strategyOptions.domains[domain].controllerCardOptions,\n title: Helper.localize(getDomainTranslationKey(domain)),\n titleIcon: Helper.icons[domain as keyof typeof Helper.icons]._?.default ?? \"mdi:floor-plan\",\n titleNavigate: domain,\n };\n if (domain) {\n titleSectionOptions.showControls = Helper.strategyOptions.domains[domain].showControls;\n titleSectionOptions.extraControls = Helper.strategyOptions.domains[domain].extraControls;\n titleSectionOptions.controlChipOptions = { area_slug: this.floor.areas_slug };\n }\n\n const area_ids = this.floor.areas_slug.map(area_slug => Helper.areas[area_slug].area_id);\n const domainControllerCard = new ControllerCard(\n { area_id: area_ids },\n titleSectionOptions,\n domain,\n this.floor.floor_id\n ).createCard();\n\n const section = { type: \"grid\", cards: [] } as LovelaceGridCardConfig;\n if (isFirstLoop) {\n section.cards.push(...this.viewControllerCard);\n isFirstLoop = false;\n }\n\n section.cards.push(...domainControllerCard);\n section.cards.push(...domainCards);\n viewSections.push(section);\n }\n\n\n // // Handle default domain if not hidden\n // if (!Helper.strategyOptions.domains.default.hidden) {\n // const areaDevices = area.devices.filter(device_id => Helper.devices[device_id].area_id === floor.area_id);\n // const miscellaneousEntities = floor.entities.filter(entity_id => {\n // const entity = Helper.entities[entity_id];\n // const entityLinked = areaDevices.includes(entity.device_id ?? \"null\") || entity.area_id === floor.area_id;\n // const entityUnhidden = entity.hidden_by === null && entity.disabled_by === null;\n // const domainExposed = exposedDomainIds.includes(entity.entity_id.split(\".\", 1)[0]);\n\n // return entityUnhidden && !domainExposed && entityLinked;\n // });\n\n // if (miscellaneousEntities.length) {\n // try {\n // const cardModule = await import(\"../cards/MiscellaneousCard\");\n\n // const swipeCard = miscellaneousEntities\n // .filter(entity_id => {\n // const entity = Helper.entities[entity_id];\n // const cardOptions = Helper.strategyOptions.card_options?.[entity.entity_id];\n // const deviceOptions = Helper.strategyOptions.card_options?.[entity.device_id ?? \"null\"];\n // return !cardOptions?.hidden && !deviceOptions?.hidden && !(entity.entity_category === \"config\" && Helper.strategyOptions.domains[\"_\"].hide_config_entities);\n // })\n // .map(entity_id => new cardModule.MiscellaneousCard(Helper.entities[entity_id], Helper.strategyOptions.card_options?.[entity_id]).getCard());\n\n // viewSections.push({\n // type: \"grid\",\n // column_span: 1,\n // cards: [new SwipeCard(swipeCard).getCard()],\n // });\n // } catch (e) {\n // Helper.logError(\"An error occurred while creating the domain cards!\", e);\n // }\n // }\n // }\n } catch (e) {\n Helper.logError(\"An error occurred while creating the domain cards!\", e);\n }\n }\n\n return viewSections;\n }\n\n\n /**\n * Get a view object.\n *\n * The view includes the cards which are created by method createSectionCards().\n *\n * @returns {Promise} The view object.\n */\n async getView(): Promise {\n return {\n ...this.config,\n badges: await this.createSectionBadges(),\n sections: await this.createSectionCards(),\n };\n }\n\n}\n\nexport { FloorView };\n","import { Helper } from \"../Helper\";\nimport { AbstractView } from \"./AbstractView\";\nimport { views } from \"../types/strategy/views\";\nimport { LovelaceChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { ChipsCardConfig } from \"../types/lovelace-mushroom/cards/chips-card\";\nimport { LovelaceGridCardConfig, StackCardConfig } from \"../types/homeassistant/lovelace/cards/types\";\nimport { TemplateCardConfig } from \"../types/lovelace-mushroom/cards/template-card-config\";\nimport { ActionConfig, LovelaceSectionConfig, LovelaceViewConfig } from \"../types/homeassistant/data/lovelace\";\nimport { PersonCardConfig } from \"../types/lovelace-mushroom/cards/person-card-config\";\nimport { SettingsChip } from \"../chips/SettingsChip\";\nimport { SettingsPopup } from \"../popups/SettingsPopup\";\nimport { HOME_EXPOSED_CHIPS, UNAVAILABLE, UNDISCLOSED } from \"../variables\";\nimport { createChipsFromList, getFloorName, getMAEntity, navigateTo, slugify } from \"../utils\";\nimport { WeatherChip } from \"../chips/WeatherChip\";\nimport { AggregateChip } from \"../chips/AggregateChip\";\nimport { PersonCard } from \"../cards/PersonCard\";\nimport { ConditionalChip } from \"../chips/ConditionalChip\";\n\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Home View Class.\n *\n * Used to create a Home view.\n *\n * @class HomeView\n */\nclass HomeView {\n /**\n * Default configuration of the view.\n *\n * @type {views.ViewConfig}\n * @private\n */\n config: views.ViewConfig = {\n title: \"Home\",\n icon: \"mdi:home-assistant\",\n type: \"sections\",\n subview: false,\n };\n\n /**\n * Class constructor.\n *\n * @throws {Error} If trying to instantiate this class.\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor() {\n if (!Helper.isInitialized()) {\n throw new Error(\"The Helper module must be initialized before using this one.\");\n }\n }\n\n /**\n * Create the cards to include in the view.\n *\n * @return {Promise<(StackCardConfig | TemplateCardConfig | ChipsCardConfig)[]>} Promise a View Card array.\n * @override\n */\n async createSectionBadges(): Promise<(StackCardConfig | TemplateCardConfig | ChipsCardConfig)[]> {\n\n if (Helper.strategyOptions.home_view.hidden.includes(\"chips\")) {\n // Chips section is hidden.\n\n return [];\n }\n\n const chips: LovelaceChipConfig[] = [];\n const chipOptions = Helper.strategyOptions.chips;\n\n let chipModule;\n\n // Weather chip.\n const weatherEntityId = Helper.linus_dashboard_config?.weather_entity_id;\n\n if (weatherEntityId) {\n try {\n const weatherChip = new WeatherChip(weatherEntityId);\n chips.push(weatherChip.getChip());\n } catch (e) {\n Helper.logError(\"An error occurred while creating the weather chip!\", e);\n }\n }\n\n // Alarm chip.\n const alarmEntityId = Helper.linus_dashboard_config?.alarm_entity_id\n\n if (alarmEntityId) {\n try {\n chipModule = await import(\"../chips/AlarmChip\");\n const alarmChip = new chipModule.AlarmChip(alarmEntityId);\n\n chips.push(alarmChip.getChip());\n } catch (e) {\n Helper.logError(\"An error occurred while creating the alarm chip!\", e);\n }\n }\n\n // Spotify chip.\n const spotifyEntityId = chipOptions?.spotify_entity ?? Helper.domains.media_player?.find(\n (entity) => entity.entity_id.startsWith(\"media_player.spotify_\") && entity.disabled_by === null && entity.hidden_by === null,\n )?.entity_id;\n\n if (spotifyEntityId) {\n try {\n chipModule = await import(\"../chips/SpotifyChip\");\n const spotifyChip = new chipModule.SpotifyChip(spotifyEntityId);\n\n chips.push(spotifyChip.getChip());\n } catch (e) {\n Helper.logError(\"An error occurred while creating the spotify chip!\", e);\n }\n }\n\n const homeChips = await createChipsFromList(HOME_EXPOSED_CHIPS, { show_content: true });\n if (homeChips) {\n chips.push(...homeChips);\n }\n\n const linusSettings = new SettingsChip({ tap_action: new SettingsPopup().getPopup() })\n\n chips.push(linusSettings.getChip());\n\n return chips.map(chip => ({\n type: \"custom:mushroom-chips-card\",\n alignment: \"center\",\n chips: [chip],\n }));\n }\n\n /**\n * Create the cards to include in the view.\n *\n * @return {Promise} Promise a View Card array.\n * @override\n */\n async createSectionCards(): Promise {\n return await Promise.all([\n this.#createPersonCards(),\n this.#createAreaSection(),\n ]).then(([personCards, areaSections]) => {\n const options = Helper.strategyOptions;\n const firstSection: LovelaceGridCardConfig = {\n type: \"grid\",\n column_span: 1,\n cards: []\n };\n\n if (personCards.length) {\n // TODO: Create the stack at this.#createPersonCards()\n firstSection.cards.push({\n type: \"horizontal-stack\",\n cards: personCards,\n } as StackCardConfig);\n }\n\n if (!Helper.strategyOptions.home_view.hidden.includes(\"greeting\")) {\n const tod = Helper.magicAreasDevices.global?.entities.time_of_the_day;\n\n firstSection.cards.push({\n type: \"custom:mushroom-template-card\",\n primary: `\n {% set tod = states(\"${tod?.entity_id}\") %}\n {% if (tod == \"evening\") %} Bonne soirée, {{user}} !\n {% elif (tod == \"daytime\") %} Bonne après-midi, {{user}} !\n {% elif (tod == \"night\") %} Bonne nuit, {{user}} !\n {% else %} Bonjour, {{user}} !\n {% endif %}`,\n icon: \"mdi:hand-wave\",\n icon_color: \"orange\",\n layout_options: {\n grid_columns: 4,\n grid_rows: 1,\n },\n tap_action: {\n action: \"none\",\n } as ActionConfig,\n double_tap_action: {\n action: \"none\",\n } as ActionConfig,\n hold_action: {\n action: \"none\",\n } as ActionConfig,\n } as TemplateCardConfig);\n }\n\n\n // Add quick access cards.\n if (options.quick_access_cards) {\n firstSection.cards.push(...options.quick_access_cards);\n }\n\n // Add custom cards.\n if (options.extra_cards) {\n firstSection.cards.push(...options.extra_cards);\n }\n\n return [firstSection, ...areaSections];\n });\n }\n\n /**\n * Create the person cards to include in the view.\n *\n * @return {Promise} A Person Card array.\n */\n async #createPersonCards(): Promise {\n if (Helper.strategyOptions.home_view.hidden.includes(\"persons\")) {\n // Person section is hidden.\n\n return [];\n }\n\n const cards: PersonCardConfig[] = [];\n const persons = Helper.domains.person.filter((entity) => {\n return entity.hidden_by == null\n && entity.disabled_by == null\n });\n\n for (const person of persons) {\n cards.push(new PersonCard(person).getCard());\n }\n\n\n return cards;\n }\n\n /**\n * Create the area cards to include in the view.\n *\n * Area cards are grouped into two areas per row.\n *\n * @return {Promise} Promise an Area Card Section.\n */\n async #createAreaSection(): Promise {\n if (Helper.strategyOptions.home_view.hidden.includes(\"areas\")) {\n // Areas section is hidden.\n\n return [];\n }\n\n const groupedSections: LovelaceGridCardConfig[] = [];\n let isFirstLoop = true;\n\n for (const floor of Helper.orderedFloors) {\n if (floor.areas_slug.length === 0) continue\n\n let floorSection = {\n type: \"grid\",\n column_span: 1,\n cards: [],\n } as LovelaceGridCardConfig;\n\n if (isFirstLoop && !Helper.strategyOptions.home_view.hidden.includes(\"areasTitle\")) {\n floorSection.cards.push({\n type: \"heading\",\n heading: `${Helper.localize(\"ui.components.area-picker.area\")}s`,\n heading_style: \"title\",\n });\n\n isFirstLoop = false;\n }\n\n const temperatureEntity = getMAEntity(floor.floor_id, \"sensor\", \"temperature\");\n\n\n floorSection.cards.push(\n {\n type: \"heading\",\n heading: getFloorName(floor),\n heading_style: \"subtitle\",\n icon: floor.icon ?? \"mdi:floor-plan\",\n badges: [{\n type: \"custom:mushroom-chips-card\",\n alignment: \"end\",\n chips: [\n new ConditionalChip(\n [{ entity: temperatureEntity?.entity_id!, state_not: UNAVAILABLE }],\n new AggregateChip({ device_class: \"temperature\", show_content: true, magic_device_id: floor.floor_id, area_slug: floor.areas_slug }).getChip()\n ).getChip(),\n ],\n card_mod: {\n style: `\n ha-card {\n min-width: 80px;\n }\n `,\n }\n }],\n tap_action: floor.floor_id !== UNDISCLOSED ? navigateTo(slugify(floor.name)) : undefined,\n }\n );\n\n for (const area of floor.areas_slug.map(area_slug => Helper.areas[area_slug]).values()) {\n\n type ModuleType = typeof import(\"../cards/HomeAreaCard\");\n\n let module: ModuleType;\n let moduleName =\n Helper.strategyOptions.areas[area.slug]?.type ??\n Helper.strategyOptions.areas[\"_\"]?.type ??\n \"default\";\n\n // Load module by type in strategy options.\n try {\n module = await import((`../cards/${moduleName}`));\n } catch (e) {\n // Fallback to the default strategy card.\n module = await import(\"../cards/HomeAreaCard\");\n\n if (Helper.strategyOptions.debug && moduleName !== \"default\") {\n console.error(e);\n }\n }\n\n // Get a card for the area.\n if (!Helper.strategyOptions.areas[area.slug as string]?.hidden) {\n let options = {\n ...Helper.strategyOptions.areas[\"_\"],\n ...Helper.strategyOptions.areas[area.slug],\n area_slug: area.slug,\n };\n\n floorSection.cards.push({\n ...new module.HomeAreaCard(options).getCard(),\n layout_options: {\n grid_columns: 2\n }\n });\n }\n }\n\n\n if (floor.floor_id === UNDISCLOSED) {\n floorSection.cards.push({\n type: \"custom:mushroom-template-card\",\n primary: Helper.localize(\"component.linus_dashboard.entity.button.add_new_area.state.on\"),\n secondary: Helper.localize(\"component.linus_dashboard.entity.button.add_new_area.state.off\"),\n multiline_secondary: true,\n icon: \"mdi:view-dashboard-variant\",\n fill_container: true,\n layout_options: {\n grid_columns: 4,\n grid_rows: 1,\n },\n tap_action: {\n action: \"navigate\",\n navigation_path: \"/config/areas/dashboard\",\n },\n } as any);\n }\n\n groupedSections.push(floorSection);\n }\n\n return groupedSections;\n }\n\n /**\n * Get a view object.\n *\n * The view includes the cards which are created by method createViewCards().\n *\n * @returns {Promise} The view object.\n */\n async getView(): Promise {\n return {\n ...this.config,\n badges: await this.createSectionBadges(),\n sections: await this.createSectionCards(),\n };\n }\n}\n\nexport { HomeView };\n","import { Helper } from \"../Helper\";\nimport { ControllerCard } from \"../cards/ControllerCard\";\nimport { AbstractView } from \"./AbstractView\";\nimport { views } from \"../types/strategy/views\";\nimport { cards } from \"../types/strategy/cards\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Light View Class.\n *\n * Used to create a view for entities of the light domain.\n *\n * @class LightView\n * @extends AbstractView\n */\nclass LightView extends AbstractView {\n /**\n * Domain of the view's entities.\n *\n * @type {string}\n * @static\n * @private\n */\n static #domain: string = \"light\";\n\n /**\n * Default configuration of the view.\n *\n * @type {views.ViewConfig}\n * @private\n */\n #defaultConfig: views.ViewConfig = {\n icon: \"mdi:lightbulb-group\",\n subview: false,\n };\n\n /**\n * Default configuration of the view's Controller card.\n *\n * @type {cards.ControllerCardOptions}\n * @private\n */\n #viewControllerCardConfig: cards.ControllerCardOptions = {\n title: `${Helper.localize(`component.light.entity_component._.name`)}s`,\n // subtitle: Helper.getCountTemplate(LightView.#domain, \"eq\", \"on\") + ` ${Helper.localize(\"component.light.entity_component._.state.on\")}`,\n };\n\n /**\n * Class constructor.\n *\n * @param {views.ViewConfig} [options={}] Options for the view.\n */\n constructor(options: views.ViewConfig = {}) {\n super(LightView.#domain);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n\n // Create a Controller card to switch all entities of the domain.\n this.viewControllerCard = new ControllerCard(\n this.targetDomain(LightView.#domain),\n {\n ...this.#viewControllerCardConfig,\n ...Helper.strategyOptions.domains.light.controllerCardOptions,\n }, LightView.#domain, \"global\").createCard();\n\n }\n}\n\nexport { LightView };\n","import { Helper } from \"../Helper\";\nimport { ControllerCard } from \"../cards/ControllerCard\";\nimport { AbstractView } from \"./AbstractView\";\nimport { views } from \"../types/strategy/views\";\nimport { cards } from \"../types/strategy/cards\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * MediaPlayer View Class.\n *\n * Used to create a view for entities of the media_player domain.\n *\n * @class MediaPlayerView\n * @extends AbstractView\n */\nclass MediaPlayerView extends AbstractView {\n /**\n * Domain of the view's entities.\n *\n * @type {string}\n * @static\n * @private\n */\n static #domain: string = \"media_player\";\n\n /**\n * Default configuration of the view.\n *\n * @type {views.ViewConfig}\n * @private\n */\n #defaultConfig: views.ViewConfig = {\n title: \"MediaPlayers\",\n icon: \"mdi:cast\",\n subview: false,\n };\n\n /**\n * Default configuration of the view's Controller card.\n *\n * @type {cards.ControllerCardOptions}\n * @private\n */\n #viewControllerCardConfig: cards.ControllerCardOptions = {\n title: `${Helper.localize(`component.media_player.entity_component._.name`)}s`,\n // subtitle: Helper.getCountTemplate(MediaPlayerView.#domain, \"ne\", \"off\") + \" media players on\",\n };\n\n /**\n * Class constructor.\n *\n * @param {views.ViewConfig} [options={}] Options for the view.\n */\n constructor(options: views.ViewConfig = {}) {\n super(MediaPlayerView.#domain);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n\n // Create a Controller card to switch all entities of the domain.\n this.viewControllerCard = new ControllerCard(\n this.targetDomain(MediaPlayerView.#domain),\n {\n ...this.#viewControllerCardConfig,\n ...Helper.strategyOptions.domains.media_player.controllerCardOptions,\n }, MediaPlayerView.#domain).createCard();\n }\n}\n\nexport { MediaPlayerView };\n","import { Helper } from \"../Helper\";\nimport { ControllerCard } from \"../cards/ControllerCard\";\nimport { AbstractView } from \"./AbstractView\";\nimport { views } from \"../types/strategy/views\";\nimport { cards } from \"../types/strategy/cards\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Scene View Class.\n *\n * Used to create a view for entities of the scene domain.\n *\n * @class SceneView\n * @extends AbstractView\n */\nclass SceneView extends AbstractView {\n /**\n * Domain of the view's entities.\n *\n * @type {string}\n * @static\n * @private\n */\n static #domain: string = \"scene\";\n\n /**\n * Default configuration of the view.\n *\n * @type {views.ViewConfig}\n * @private\n */\n #defaultConfig: views.ViewConfig = {\n title: \"Scenes\",\n icon: \"mdi:palette\",\n subview: false,\n };\n\n /**\n * Default configuration of the view's Controller card.\n *\n * @type {cards.ControllerCardOptions}\n * @private\n */\n #viewControllerCardConfig: cards.ControllerCardOptions = {\n title: `${Helper.localize(`ui.dialogs.quick-bar.commands.navigation.scene`)}`,\n // subtitle: Helper.getCountTemplate(SceneView.#domain, \"ne\", \"on\") + ` ${Helper.localize(`ui.dialogs.quick-bar.commands.navigation.scene`)}`,\n };\n\n /**\n * Class constructor.\n *\n * @param {views.ViewConfig} [options={}] Options for the view.\n */\n constructor(options: views.ViewConfig = {}) {\n super(SceneView.#domain);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n\n // Create a Controller card to scene all entities of the domain.\n this.viewControllerCard = new ControllerCard(\n this.targetDomain(SceneView.#domain),\n {\n ...this.#viewControllerCardConfig,\n ...Helper.strategyOptions.domains.scene.controllerCardOptions,\n }, SceneView.#domain).createCard();\n }\n}\n\nexport { SceneView };\n","import { Helper } from \"../Helper\";\nimport { StackCardConfig } from \"../types/homeassistant/lovelace/cards/types\";\nimport { LovelaceCardConfig, LovelaceViewConfig } from \"../types/homeassistant/data/lovelace\";\nimport { TitleCardConfig } from \"../types/lovelace-mushroom/cards/title-card-config\";\nimport { AggregateCard } from \"../cards/AggregateCard\";\n\n/**\n * Security View Class.\n *\n * To create a new view, extend the new class with this one.\n *\n * @class\n * @abstract\n */\nabstract class SecurityDetailsView {\n /**\n * Configuration of the view.\n *\n * @type {LovelaceViewConfig}\n */\n config: LovelaceViewConfig = {\n title: Helper.localize(\"component.binary_sensor.entity_component.safety.name\"),\n icon: \"mdi:security\",\n subview: true,\n };\n\n /**\n * A card to switch all entities in the view.\n *\n * @type {StackCardConfig}\n */\n viewControllerCard: StackCardConfig = {\n cards: [],\n type: \"\",\n };\n\n /**\n * Class constructor.\n *\n * @throws {Error} If trying to instantiate this class.\n * @throws {Error} If the Helper module isn't initialized.\n */\n protected constructor() {\n if (!Helper.isInitialized()) {\n throw new Error(\"The Helper module must be initialized before using this one.\");\n }\n }\n\n /**\n * Create the cards to include in the view.\n *\n * @return {Promise<(StackCardConfig | TitleCardConfig)[]>} An array of card objects.\n */\n async createViewCards(): Promise<(StackCardConfig | TitleCardConfig)[]> {\n const viewCards: LovelaceCardConfig[] = [];\n\n const globalDevice = Helper.magicAreasDevices[\"global\"];\n\n if (!globalDevice) {\n console.debug(\"Security view : Global device not found\");\n return [];\n }\n\n const {\n aggregate_motion,\n aggregate_door,\n aggregate_window,\n } = globalDevice?.entities;\n\n\n if (aggregate_motion?.entity_id) {\n viewCards.push(new AggregateCard('binary_sensor', { device_class: 'motion', title: Helper.localize(\"component.binary_sensor.entity_component.motion.name\") }).createCard())\n // viewCards.push(new AggregateCard({ entity_id: aggregate_motion.entity_id }, { title: `${Helper.localize(\"component.binary_sensor.entity_component.motion.name\")}s` }).createCard())\n }\n\n if (aggregate_door?.entity_id || aggregate_window?.entity_id) {\n viewCards.push(new AggregateCard('binary_sensor', { device_class: ['door', 'window'], title: Helper.localize(\"component.binary_sensor.entity_component.opening.name\") }).createCard())\n // viewCards.push(new AggregateCard({ entity_id: [aggregate_door?.entity_id, aggregate_window?.entity_id] }, { title: `${Helper.localize(\"component.binary_sensor.entity_component.opening.name\")}s` }).createCard())\n }\n\n return viewCards;\n }\n\n /**\n * Get a view object.\n *\n * The view includes the cards which are created by method createViewCards().\n *\n * @returns {Promise} The view object.\n */\n async getView(): Promise {\n return {\n ...this.config,\n cards: await this.createViewCards(),\n };\n }\n}\n\nexport { SecurityDetailsView };\n","import { Helper } from \"../Helper\";\nimport { LovelaceGridCardConfig, StackCardConfig } from \"../types/homeassistant/lovelace/cards/types\";\nimport { LovelaceCardConfig, LovelaceSectionConfig, LovelaceViewConfig } from \"../types/homeassistant/data/lovelace\";\nimport { AlarmCard } from \"../cards/AlarmCard\";\nimport { PersonCard } from \"../cards/PersonCard\";\nimport { BinarySensorCard } from \"../cards/BinarySensorCard\";\nimport { getAreaName, getFloorName, navigateTo } from \"../utils\";\nimport { HassServiceTarget } from \"home-assistant-js-websocket\";\nimport { SwipeCard } from \"../cards/SwipeCard\";\nimport { ControllerCard } from \"../cards/ControllerCard\";\nimport { views } from \"../types/strategy/views\";\n\n/**\n * Security View Class.\n *\n * To create a new view, extend the new class with this one.\n *\n * @class\n * @abstract\n */\nclass SecurityView {\n /**\n * Default configuration of the view.\n *\n * @type {views.ViewConfig}\n * @private\n */\n config: views.ViewConfig = {\n title: Helper.localize(\"component.binary_sensor.entity_component.safety.name\"),\n icon: \"mdi:security\",\n type: \"sections\",\n };\n\n /**\n * A card to switch all entities in the view.\n *\n * @type {LovelaceCardConfig[]}\n */\n viewControllerCard: LovelaceCardConfig[] = []\n\n /**\n * Class constructor.\n *\n * @throws {Error} If trying to instantiate this class.\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor() {\n if (!Helper.isInitialized()) {\n throw new Error(\"The Helper module must be initialized before using this one.\");\n }\n }\n\n /**\n * Create the cards to include in the view.\n *\n * @return {Promise} Promise a View Card array.\n */\n async createSectionCards(): Promise {\n const globalSection: LovelaceGridCardConfig = {\n type: \"grid\",\n column_span: 1,\n cards: []\n };\n\n const alarmEntityId = Helper.linus_dashboard_config?.alarm_entity_id\n if (alarmEntityId) {\n globalSection.cards.push(\n {\n type: \"heading\",\n heading: \"Sécurité\",\n heading_style: \"title\",\n }\n )\n globalSection.cards.push(\n {\n type: \"heading\",\n heading: \"Alarme\",\n heading_style: \"subtitle\",\n })\n globalSection.cards.push(new AlarmCard(Helper.entities[alarmEntityId]).getCard())\n }\n\n const persons = Helper.domains.person\n if (persons?.length) {\n globalSection.cards.push(\n {\n type: \"heading\",\n heading: \"Personnes\",\n heading_style: \"subtitle\",\n })\n\n for (const person of persons) {\n globalSection.cards.push(new PersonCard(person, {\n layout: \"horizontal\",\n primary_info: \"name\",\n secondary_info: \"state\"\n }).getCard())\n }\n }\n\n const globalDevice = Helper.magicAreasDevices[\"global\"];\n\n if (!globalDevice) {\n console.debug(\"Security view : Global device not found\");\n return [];\n }\n\n const {\n aggregate_motion,\n aggregate_door,\n aggregate_window,\n } = globalDevice?.entities;\n\n if (aggregate_motion || aggregate_door || aggregate_window) {\n globalSection.cards.push(\n {\n type: \"heading\",\n heading: \"Capteurs\",\n heading_style: \"subtitle\",\n })\n if (aggregate_motion?.entity_id) globalSection.cards.push(new BinarySensorCard(aggregate_motion, { tap_action: navigateTo('security-details') }).getCard());\n if (aggregate_door?.entity_id) globalSection.cards.push(new BinarySensorCard(aggregate_door, { tap_action: navigateTo('security-details') }).getCard());\n if (aggregate_window?.entity_id) globalSection.cards.push(new BinarySensorCard(aggregate_window, { tap_action: navigateTo('security-details') }).getCard());\n }\n\n const sections = [globalSection]\n if (Helper.domains.camera?.length) sections.push(await this.createCamerasSection())\n\n return sections;\n }\n\n /**\n * Create the cards to include in the view.\n *\n * @return {Promise} An array of card objects.\n */\n async createCamerasSection(): Promise {\n const domain = \"camera\";\n const camerasSection: LovelaceGridCardConfig = {\n type: \"grid\",\n column_span: 1,\n cards: [\n {\n type: \"heading\",\n heading: `${Helper.localize(`component.camera.entity_component._.name`)}s`,\n heading_style: \"title\",\n badges: [],\n layout_options: {\n grid_columns: \"full\",\n grid_rows: 1\n },\n icon: Helper.icons[domain]._?.default,\n }]\n };\n\n const orderedFloors = Object.values(Helper.floors).sort((a, b) => {\n // Check if 'level' is undefined in either object\n if (a.level === undefined) return 1; // a should come after b\n if (b.level === undefined) return -1; // b should come after a\n\n // Both 'level' values are defined, compare them\n return a.level - b.level;\n });\n\n for (const floor of orderedFloors) {\n\n if (floor.areas_slug.length === 0) continue\n\n let floorCards: LovelaceCardConfig[] = [\n {\n type: \"heading\",\n heading: getFloorName(floor),\n heading_style: \"title\",\n badges: [],\n layout_options: {\n grid_columns: \"full\",\n grid_rows: 1\n },\n icon: floor.icon ?? \"mdi:floor-plan\",\n }\n ]\n\n // Create cards for each area.\n for (const [i, area] of floor.areas_slug.map(area_slug => Helper.areas[area_slug]).entries()) {\n const entities = Helper.getAreaEntities(area, domain);\n const className = Helper.sanitizeClassName(domain + \"Card\");\n\n const cardModule = await import(`../cards/${className}`);\n\n if (entities.length === 0 || !cardModule) {\n continue;\n }\n\n // Set the target for controller cards to the current area.\n let target: HassServiceTarget = {\n area_id: [area.slug],\n };\n\n let areaCards: LovelaceCardConfig[] = [];\n\n const entityCards = []\n\n // Create a card for each domain-entity of the current area.\n for (const entity of entities) {\n let cardOptions = Helper.strategyOptions.card_options?.[entity.entity_id];\n let deviceOptions = Helper.strategyOptions.card_options?.[entity.device_id ?? \"null\"];\n\n if (cardOptions?.hidden || deviceOptions?.hidden) {\n continue;\n }\n\n const configEntityHidden =\n Helper.strategyOptions.domains[domain ?? \"_\"].hide_config_entities\n || Helper.strategyOptions.domains[\"_\"].hide_config_entities;\n if (entity.entity_category === \"config\" && configEntityHidden) {\n continue;\n }\n entityCards.push(new cardModule[className](entity, cardOptions).getCard());\n }\n\n if (entityCards.length) {\n if (entityCards.length > 2) {\n areaCards.push(new SwipeCard(entityCards).getCard());\n } else {\n areaCards.push(...entityCards);\n }\n }\n\n // Vertical stack the area cards if it has entities.\n if (areaCards.length) {\n const titleCardOptions: any = {};\n titleCardOptions.subtitle = getAreaName(area)\n titleCardOptions.subtitleIcon = area.icon ?? \"mdi:floor-plan\";\n titleCardOptions.navigate = area.slug;\n if (domain) {\n titleCardOptions.showControls = Helper.strategyOptions.domains[domain].showControls;\n titleCardOptions.extraControls = Helper.strategyOptions.domains[domain].extraControls;\n }\n\n // Create and insert a Controller card.\n areaCards.unshift(...new ControllerCard(target, titleCardOptions, domain).createCard())\n\n floorCards.push(...areaCards);\n }\n }\n\n if (floorCards.length > 1) camerasSection.cards.push(...floorCards)\n }\n\n return camerasSection;\n }\n\n /**\n * Get a view object.\n *\n * The view includes the cards which are created by method createViewCards().\n *\n * @returns {Promise} The view object.\n */\n async getView(): Promise {\n return {\n ...this.config,\n sections: await this.createSectionCards(),\n };\n }\n}\n\nexport { SecurityView };\n","import { Helper } from \"../Helper\";\nimport { ControllerCard } from \"../cards/ControllerCard\";\nimport { AbstractView } from \"./AbstractView\";\nimport { views } from \"../types/strategy/views\";\nimport { cards } from \"../types/strategy/cards\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Sensor View Class.\n *\n * Used to create a view for entities of the scene domain.\n *\n * @class SensorView\n * @extends AbstractView\n */\nclass SensorView extends AbstractView {\n /**\n * Domain of the view's entities.\n *\n * @type {string}\n * @static\n * @private\n */\n static #domain: string = \"sensor\";\n\n /**\n * Default configuration of the view.\n *\n * @type {views.ViewConfig}\n * @private\n */\n #defaultConfig: views.ViewConfig = {\n title: \"Sensors\",\n icon: \"mdi:palette\",\n subview: false,\n };\n\n /**\n * Default configuration of the view's Controller card.\n *\n * @type {cards.ControllerCardOptions}\n * @private\n */\n #viewControllerCardConfig: cards.ControllerCardOptions = {\n title: `${Helper.localize(`component.sensor.entity_component._.name`)}s`,\n // subtitle: Helper.getCountTemplate(SensorView.#domain, \"ne\", \"on\") + ` ${Helper.localize(`ui.dialogs.quick-bar.commands.navigation.scene`)}`,\n };\n\n /**\n * Class constructor.\n *\n * @param {views.ViewConfig} [options={}] Options for the view.\n */\n constructor(options: views.ViewConfig = {}) {\n super(SensorView.#domain);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n\n // Create a Controller card to scene all entities of the domain.\n this.viewControllerCard = new ControllerCard(\n this.targetDomain(SensorView.#domain),\n {\n ...this.#viewControllerCardConfig,\n ...Helper.strategyOptions.domains.scene.controllerCardOptions,\n }, SensorView.#domain).createCard();\n }\n}\n\nexport { SensorView };\n","import { Helper } from \"../Helper\";\nimport { ControllerCard } from \"../cards/ControllerCard\";\nimport { AbstractView } from \"./AbstractView\";\nimport { views } from \"../types/strategy/views\";\nimport { cards } from \"../types/strategy/cards\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Switch View Class.\n *\n * Used to create a view for entities of the switch domain.\n *\n * @class SwitchView\n * @extends AbstractView\n */\nclass SwitchView extends AbstractView {\n /**\n * Domain of the view's entities.\n *\n * @type {string}\n * @static\n * @private\n */\n static #domain: string = \"switch\";\n\n /**\n * Default configuration of the view.\n *\n * @type {views.ViewConfig}\n * @private\n */\n #defaultConfig: views.ViewConfig = {\n title: \"Switches\",\n icon: \"mdi:dip-switch\",\n subview: false,\n };\n\n /**\n * Default configuration of the view's Controller card.\n *\n * @type {cards.ControllerCardOptions}\n * @private\n */\n #viewControllerCardConfig: cards.ControllerCardOptions = {\n title: `${Helper.localize(`component.switch.entity_component._.name`)}s`,\n // subtitle: Helper.getCountTemplate(SwitchView.#domain, \"eq\", \"on\") + \" switches on\",\n };\n\n /**\n * Class constructor.\n *\n * @param {views.ViewConfig} [options={}] Options for the view.\n */\n constructor(options: views.ViewConfig = {}) {\n super(SwitchView.#domain);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n\n // Create a Controller card to switch all entities of the domain.\n this.viewControllerCard = new ControllerCard(\n this.targetDomain(SwitchView.#domain),\n {\n ...this.#viewControllerCardConfig,\n ...Helper.strategyOptions.domains.switch.controllerCardOptions,\n }, SwitchView.#domain).createCard();\n }\n}\n\nexport { SwitchView };\n","import { AREA_CARDS_DOMAINS, UNAVAILABLE, UNDISCLOSED } from '../variables';\nimport { Helper } from \"../Helper\";\nimport { ControllerCard } from \"../cards/ControllerCard\";\nimport { LovelaceGridCardConfig, StackCardConfig } from \"../types/homeassistant/lovelace/cards/types\";\nimport { LovelaceCardConfig, LovelaceSectionConfig, LovelaceViewConfig } from \"../types/homeassistant/data/lovelace\";\nimport { HassServiceTarget } from \"home-assistant-js-websocket\";\nimport { TemplateCardConfig } from '../types/lovelace-mushroom/cards/template-card-config';\nimport { ChipsCardConfig } from '../types/lovelace-mushroom/cards/chips-card';\nimport { SwipeCard } from '../cards/SwipeCard';\nimport { getAreaName, getFloorName, slugify } from '../utils';\nimport { views } from '../types/strategy/views';\n\n/**\n * Abstract View Class.\n *\n * To create a new view, extend the new class with this one.\n *\n * @class\n * @abstract\n */\nclass UnavailableView {\n /**\n * Configuration of the view.\n *\n * @type {views.ViewConfig}\n */\n config: views.ViewConfig = {\n title: Helper.localize(\"state.default.unavailable\"),\n icon: \"mdi:view-dashboard\",\n type: \"sections\",\n subview: true,\n };\n\n /**\n * A card to switch all entities in the view.\n *\n * @type {LovelaceCardConfig[]}\n */\n viewControllerCard: LovelaceCardConfig[] = []\n\n /**\n * Class constructor.\n *\n * @throws {Error} If trying to instantiate this class.\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor() {\n if (!Helper.isInitialized()) {\n throw new Error(\"The Helper module must be initialized before using this one.\");\n }\n }\n\n /**\n * Create the cards to include in the view.\n *\n * @return {Promise} Promise a View Card array.\n * @override\n */\n async createSectionCards(): Promise {\n const viewSections: LovelaceGridCardConfig[] = [];\n\n for (const floor of Helper.orderedFloors) {\n if (floor.areas_slug.length === 0) continue;\n\n const floorCards = [];\n\n for (const area of floor.areas_slug.map(area_slug => Helper.areas[area_slug]).values()) {\n const entities = Helper.areas[area.slug].entities;\n const unavailableEntities = entities?.filter(entity_id => AREA_CARDS_DOMAINS.includes(Helper.getEntityDomain(entity_id)) && Helper.getEntityState(entity_id)?.state === UNAVAILABLE).map(entity_id => Helper.entities[entity_id]);\n const cardModule = await import(`../cards/MiscellaneousCard`);\n\n if (entities.length === 0 || !cardModule) continue;\n\n let target: HassServiceTarget = { area_id: [area.slug] };\n if (area.area_id === UNDISCLOSED) {\n target = { entity_id: unavailableEntities.map(entity => entity.entity_id) };\n }\n\n const entityCards = unavailableEntities\n .filter(entity => !Helper.strategyOptions.card_options?.[entity.entity_id]?.hidden\n && !Helper.strategyOptions.card_options?.[entity.device_id ?? \"null\"]?.hidden\n && !(entity.entity_category === \"config\"))\n .map(entity => new cardModule.MiscellaneousCard(entity).getCard());\n\n if (entityCards.length) {\n const areaCards = entityCards.length > 2 ? [new SwipeCard(entityCards).getCard()] : entityCards;\n floorCards.push(...areaCards);\n }\n }\n\n if (floorCards.length) {\n const titleSectionOptions: any = {\n title: getFloorName(floor),\n titleIcon: floor.icon ?? \"mdi:floor-plan\",\n titleNavigate: slugify(floor.name)\n };\n viewSections.push({ type: \"grid\", cards: floorCards });\n }\n }\n\n if (viewSections.length) {\n viewSections.unshift({ type: \"grid\", cards: this.viewControllerCard });\n }\n\n return viewSections;\n }\n\n /**\n * Get a view object.\n *\n * The view includes the cards which are created by method createViewCards().\n *\n * @returns {Promise} The view object.\n */\n async getView(): Promise {\n return {\n ...this.config,\n sections: await this.createSectionCards(),\n };\n }\n\n /**\n * Get a target of entity IDs for the given domain.\n *\n * @param {string} domain - The target domain to retrieve entity IDs from.\n * @return {HassServiceTarget} - A target for a service call.\n */\n targetDomain(domain: string): HassServiceTarget {\n return {\n entity_id: Helper.domains[domain]?.filter(\n entity =>\n !entity.hidden_by\n && !Helper.strategyOptions.card_options?.[entity.entity_id]?.hidden\n ).map(entity => entity.entity_id),\n };\n }\n}\n\nexport { UnavailableView };\n","import { Helper } from \"../Helper\";\nimport { ControllerCard } from \"../cards/ControllerCard\";\nimport { AbstractView } from \"./AbstractView\";\nimport { views } from \"../types/strategy/views\";\nimport { cards } from \"../types/strategy/cards\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Vacuum View Class.\n *\n * Used to create a view for entities of the vacuum domain.\n *\n * @class VacuumView\n * @extends AbstractView\n */\nclass VacuumView extends AbstractView {\n /**\n * Domain of the view's entities.\n *\n * @type {string}\n * @static\n * @private\n */\n static #domain: string = \"vacuum\";\n\n /**\n * Default configuration of the view.\n *\n * @type {views.ViewConfig}\n * @private\n */\n #defaultConfig: views.ViewConfig = {\n title: \"Vacuums\",\n icon: \"mdi:robot-vacuum\",\n subview: false,\n };\n\n /**\n * Default configuration of the view's Controller card.\n *\n * @type {cards.ControllerCardOptions}\n * @private\n */\n #viewControllerCardConfig: cards.ControllerCardOptions = {\n title: `${Helper.localize(`component.vacuum.entity_component._.name`)}s`,\n // subtitle: Helper.getCountTemplate(VacuumView.#domain, \"ne\", \"off\") + ` ${Helper.localize(`component.vacuum.entity_component._.state.on`)}`,\n };\n\n /**\n * Class constructor.\n *\n * @param {views.ViewConfig} [options={}] Options for the view.\n */\n constructor(options: views.ViewConfig = {}) {\n super(VacuumView.#domain);\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n\n // Create a Controller card to switch all entities of the domain.\n this.viewControllerCard = new ControllerCard(\n this.targetDomain(VacuumView.#domain),\n {\n ...this.#viewControllerCardConfig,\n ...Helper.strategyOptions.domains.vacuum.controllerCardOptions,\n }, VacuumView.#domain).createCard();\n }\n}\n\nexport { VacuumView };\n","var map = {\n\t\"./AbstractCard\": [\n\t\t\"./src/cards/AbstractCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./AbstractCard.ts\": [\n\t\t\"./src/cards/AbstractCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./AggregateCard\": [\n\t\t\"./src/cards/AggregateCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./AggregateCard.ts\": [\n\t\t\"./src/cards/AggregateCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./AlarmCard\": [\n\t\t\"./src/cards/AlarmCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./AlarmCard.ts\": [\n\t\t\"./src/cards/AlarmCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./BinarySensorCard\": [\n\t\t\"./src/cards/BinarySensorCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./BinarySensorCard.ts\": [\n\t\t\"./src/cards/BinarySensorCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./CameraCard\": [\n\t\t\"./src/cards/CameraCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./CameraCard.ts\": [\n\t\t\"./src/cards/CameraCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./ClimateCard\": [\n\t\t\"./src/cards/ClimateCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./ClimateCard.ts\": [\n\t\t\"./src/cards/ClimateCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./ControllerCard\": [\n\t\t\"./src/cards/ControllerCard.ts\"\n\t],\n\t\"./ControllerCard.ts\": [\n\t\t\"./src/cards/ControllerCard.ts\"\n\t],\n\t\"./CoverCard\": [\n\t\t\"./src/cards/CoverCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./CoverCard.ts\": [\n\t\t\"./src/cards/CoverCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./FanCard\": [\n\t\t\"./src/cards/FanCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./FanCard.ts\": [\n\t\t\"./src/cards/FanCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./HomeAreaCard\": [\n\t\t\"./src/cards/HomeAreaCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./HomeAreaCard.ts\": [\n\t\t\"./src/cards/HomeAreaCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./ImageAreaCard\": [\n\t\t\"./src/cards/ImageAreaCard.ts\"\n\t],\n\t\"./ImageAreaCard.ts\": [\n\t\t\"./src/cards/ImageAreaCard.ts\"\n\t],\n\t\"./LightCard\": [\n\t\t\"./src/cards/LightCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./LightCard.ts\": [\n\t\t\"./src/cards/LightCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./LockCard\": [\n\t\t\"./src/cards/LockCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./LockCard.ts\": [\n\t\t\"./src/cards/LockCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./MediaPlayerCard\": [\n\t\t\"./src/cards/MediaPlayerCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./MediaPlayerCard.ts\": [\n\t\t\"./src/cards/MediaPlayerCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./MiscellaneousCard\": [\n\t\t\"./src/cards/MiscellaneousCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./MiscellaneousCard.ts\": [\n\t\t\"./src/cards/MiscellaneousCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./NumberCard\": [\n\t\t\"./src/cards/NumberCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./NumberCard.ts\": [\n\t\t\"./src/cards/NumberCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./PersonCard\": [\n\t\t\"./src/cards/PersonCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./PersonCard.ts\": [\n\t\t\"./src/cards/PersonCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./SceneCard\": [\n\t\t\"./src/cards/SceneCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./SceneCard.ts\": [\n\t\t\"./src/cards/SceneCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./SensorCard\": [\n\t\t\"./src/cards/SensorCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./SensorCard.ts\": [\n\t\t\"./src/cards/SensorCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./SwipeCard\": [\n\t\t\"./src/cards/SwipeCard.ts\"\n\t],\n\t\"./SwipeCard.ts\": [\n\t\t\"./src/cards/SwipeCard.ts\"\n\t],\n\t\"./SwitchCard\": [\n\t\t\"./src/cards/SwitchCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./SwitchCard.ts\": [\n\t\t\"./src/cards/SwitchCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./VacuumCard\": [\n\t\t\"./src/cards/VacuumCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./VacuumCard.ts\": [\n\t\t\"./src/cards/VacuumCard.ts\",\n\t\t\"main\"\n\t]\n};\nfunction webpackAsyncContext(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\treturn Promise.resolve().then(() => {\n\t\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\t\te.code = 'MODULE_NOT_FOUND';\n\t\t\tthrow e;\n\t\t});\n\t}\n\n\tvar ids = map[req], id = ids[0];\n\treturn Promise.all(ids.slice(1).map(__webpack_require__.e)).then(() => {\n\t\treturn __webpack_require__(id);\n\t});\n}\nwebpackAsyncContext.keys = () => (Object.keys(map));\nwebpackAsyncContext.id = \"./src/cards lazy recursive ^\\\\.\\\\/.*$\";\nmodule.exports = webpackAsyncContext;","var map = {\n\t\"./AbstractChip\": [\n\t\t\"./src/chips/AbstractChip.ts\"\n\t],\n\t\"./AbstractChip.ts\": [\n\t\t\"./src/chips/AbstractChip.ts\"\n\t],\n\t\"./AggregateChip\": [\n\t\t\"./src/chips/AggregateChip.ts\"\n\t],\n\t\"./AggregateChip.ts\": [\n\t\t\"./src/chips/AggregateChip.ts\"\n\t],\n\t\"./AlarmChip\": [\n\t\t\"./src/chips/AlarmChip.ts\",\n\t\t\"main\"\n\t],\n\t\"./AlarmChip.ts\": [\n\t\t\"./src/chips/AlarmChip.ts\",\n\t\t\"main\"\n\t],\n\t\"./AreaScenesChips\": [\n\t\t\"./src/chips/AreaScenesChips.ts\",\n\t\t\"main\"\n\t],\n\t\"./AreaScenesChips.ts\": [\n\t\t\"./src/chips/AreaScenesChips.ts\",\n\t\t\"main\"\n\t],\n\t\"./AreaStateChip\": [\n\t\t\"./src/chips/AreaStateChip.ts\"\n\t],\n\t\"./AreaStateChip.ts\": [\n\t\t\"./src/chips/AreaStateChip.ts\"\n\t],\n\t\"./ClimateChip\": [\n\t\t\"./src/chips/ClimateChip.ts\"\n\t],\n\t\"./ClimateChip.ts\": [\n\t\t\"./src/chips/ClimateChip.ts\"\n\t],\n\t\"./ConditionalChip\": [\n\t\t\"./src/chips/ConditionalChip.ts\",\n\t\t\"main\"\n\t],\n\t\"./ConditionalChip.ts\": [\n\t\t\"./src/chips/ConditionalChip.ts\",\n\t\t\"main\"\n\t],\n\t\"./ControlChip\": [\n\t\t\"./src/chips/ControlChip.ts\"\n\t],\n\t\"./ControlChip.ts\": [\n\t\t\"./src/chips/ControlChip.ts\"\n\t],\n\t\"./CoverChip\": [\n\t\t\"./src/chips/CoverChip.ts\"\n\t],\n\t\"./CoverChip.ts\": [\n\t\t\"./src/chips/CoverChip.ts\"\n\t],\n\t\"./FanChip\": [\n\t\t\"./src/chips/FanChip.ts\"\n\t],\n\t\"./FanChip.ts\": [\n\t\t\"./src/chips/FanChip.ts\"\n\t],\n\t\"./LightChip\": [\n\t\t\"./src/chips/LightChip.ts\"\n\t],\n\t\"./LightChip.ts\": [\n\t\t\"./src/chips/LightChip.ts\"\n\t],\n\t\"./MediaPlayerChip\": [\n\t\t\"./src/chips/MediaPlayerChip.ts\"\n\t],\n\t\"./MediaPlayerChip.ts\": [\n\t\t\"./src/chips/MediaPlayerChip.ts\"\n\t],\n\t\"./SafetyChip\": [\n\t\t\"./src/chips/SafetyChip.ts\",\n\t\t\"main\"\n\t],\n\t\"./SafetyChip.ts\": [\n\t\t\"./src/chips/SafetyChip.ts\",\n\t\t\"main\"\n\t],\n\t\"./SettingsChip\": [\n\t\t\"./src/chips/SettingsChip.ts\"\n\t],\n\t\"./SettingsChip.ts\": [\n\t\t\"./src/chips/SettingsChip.ts\"\n\t],\n\t\"./SpotifyChip\": [\n\t\t\"./src/chips/SpotifyChip.ts\",\n\t\t\"main\"\n\t],\n\t\"./SpotifyChip.ts\": [\n\t\t\"./src/chips/SpotifyChip.ts\",\n\t\t\"main\"\n\t],\n\t\"./SwitchChip\": [\n\t\t\"./src/chips/SwitchChip.ts\"\n\t],\n\t\"./SwitchChip.ts\": [\n\t\t\"./src/chips/SwitchChip.ts\"\n\t],\n\t\"./ToggleSceneChip\": [\n\t\t\"./src/chips/ToggleSceneChip.ts\"\n\t],\n\t\"./ToggleSceneChip.ts\": [\n\t\t\"./src/chips/ToggleSceneChip.ts\"\n\t],\n\t\"./UnavailableChip\": [\n\t\t\"./src/chips/UnavailableChip.ts\"\n\t],\n\t\"./UnavailableChip.ts\": [\n\t\t\"./src/chips/UnavailableChip.ts\"\n\t],\n\t\"./WeatherChip\": [\n\t\t\"./src/chips/WeatherChip.ts\",\n\t\t\"main\"\n\t],\n\t\"./WeatherChip.ts\": [\n\t\t\"./src/chips/WeatherChip.ts\",\n\t\t\"main\"\n\t]\n};\nfunction webpackAsyncContext(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\treturn Promise.resolve().then(() => {\n\t\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\t\te.code = 'MODULE_NOT_FOUND';\n\t\t\tthrow e;\n\t\t});\n\t}\n\n\tvar ids = map[req], id = ids[0];\n\treturn Promise.all(ids.slice(1).map(__webpack_require__.e)).then(() => {\n\t\treturn __webpack_require__(id);\n\t});\n}\nwebpackAsyncContext.keys = () => (Object.keys(map));\nwebpackAsyncContext.id = \"./src/chips lazy recursive ^\\\\.\\\\/.*$\";\nmodule.exports = webpackAsyncContext;","var map = {\n\t\"./AbstractView\": [\n\t\t\"./src/views/AbstractView.ts\",\n\t\t\"main\"\n\t],\n\t\"./AbstractView.ts\": [\n\t\t\"./src/views/AbstractView.ts\",\n\t\t\"main\"\n\t],\n\t\"./AggregateView\": [\n\t\t\"./src/views/AggregateView.ts\",\n\t\t\"main\"\n\t],\n\t\"./AggregateView.ts\": [\n\t\t\"./src/views/AggregateView.ts\",\n\t\t\"main\"\n\t],\n\t\"./AreaView\": [\n\t\t\"./src/views/AreaView.ts\"\n\t],\n\t\"./AreaView.ts\": [\n\t\t\"./src/views/AreaView.ts\"\n\t],\n\t\"./CameraView\": [\n\t\t\"./src/views/CameraView.ts\",\n\t\t\"main\"\n\t],\n\t\"./CameraView.ts\": [\n\t\t\"./src/views/CameraView.ts\",\n\t\t\"main\"\n\t],\n\t\"./ClimateView\": [\n\t\t\"./src/views/ClimateView.ts\",\n\t\t\"main\"\n\t],\n\t\"./ClimateView.ts\": [\n\t\t\"./src/views/ClimateView.ts\",\n\t\t\"main\"\n\t],\n\t\"./CoverView\": [\n\t\t\"./src/views/CoverView.ts\",\n\t\t\"main\"\n\t],\n\t\"./CoverView.ts\": [\n\t\t\"./src/views/CoverView.ts\",\n\t\t\"main\"\n\t],\n\t\"./FanView\": [\n\t\t\"./src/views/FanView.ts\",\n\t\t\"main\"\n\t],\n\t\"./FanView.ts\": [\n\t\t\"./src/views/FanView.ts\",\n\t\t\"main\"\n\t],\n\t\"./FloorView\": [\n\t\t\"./src/views/FloorView.ts\"\n\t],\n\t\"./FloorView.ts\": [\n\t\t\"./src/views/FloorView.ts\"\n\t],\n\t\"./HomeView\": [\n\t\t\"./src/views/HomeView.ts\",\n\t\t\"main\"\n\t],\n\t\"./HomeView.ts\": [\n\t\t\"./src/views/HomeView.ts\",\n\t\t\"main\"\n\t],\n\t\"./LightView\": [\n\t\t\"./src/views/LightView.ts\",\n\t\t\"main\"\n\t],\n\t\"./LightView.ts\": [\n\t\t\"./src/views/LightView.ts\",\n\t\t\"main\"\n\t],\n\t\"./MediaPlayerView\": [\n\t\t\"./src/views/MediaPlayerView.ts\",\n\t\t\"main\"\n\t],\n\t\"./MediaPlayerView.ts\": [\n\t\t\"./src/views/MediaPlayerView.ts\",\n\t\t\"main\"\n\t],\n\t\"./SceneView\": [\n\t\t\"./src/views/SceneView.ts\",\n\t\t\"main\"\n\t],\n\t\"./SceneView.ts\": [\n\t\t\"./src/views/SceneView.ts\",\n\t\t\"main\"\n\t],\n\t\"./SecurityDetailsView\": [\n\t\t\"./src/views/SecurityDetailsView.ts\",\n\t\t\"main\"\n\t],\n\t\"./SecurityDetailsView.ts\": [\n\t\t\"./src/views/SecurityDetailsView.ts\",\n\t\t\"main\"\n\t],\n\t\"./SecurityView\": [\n\t\t\"./src/views/SecurityView.ts\",\n\t\t\"main\"\n\t],\n\t\"./SecurityView.ts\": [\n\t\t\"./src/views/SecurityView.ts\",\n\t\t\"main\"\n\t],\n\t\"./SensorView\": [\n\t\t\"./src/views/SensorView.ts\",\n\t\t\"main\"\n\t],\n\t\"./SensorView.ts\": [\n\t\t\"./src/views/SensorView.ts\",\n\t\t\"main\"\n\t],\n\t\"./SwitchView\": [\n\t\t\"./src/views/SwitchView.ts\",\n\t\t\"main\"\n\t],\n\t\"./SwitchView.ts\": [\n\t\t\"./src/views/SwitchView.ts\",\n\t\t\"main\"\n\t],\n\t\"./UnavailableView\": [\n\t\t\"./src/views/UnavailableView.ts\",\n\t\t\"main\"\n\t],\n\t\"./UnavailableView.ts\": [\n\t\t\"./src/views/UnavailableView.ts\",\n\t\t\"main\"\n\t],\n\t\"./VacuumView\": [\n\t\t\"./src/views/VacuumView.ts\",\n\t\t\"main\"\n\t],\n\t\"./VacuumView.ts\": [\n\t\t\"./src/views/VacuumView.ts\",\n\t\t\"main\"\n\t]\n};\nfunction webpackAsyncContext(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\treturn Promise.resolve().then(() => {\n\t\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\t\te.code = 'MODULE_NOT_FOUND';\n\t\t\tthrow e;\n\t\t});\n\t}\n\n\tvar ids = map[req], id = ids[0];\n\treturn Promise.all(ids.slice(1).map(__webpack_require__.e)).then(() => {\n\t\treturn __webpack_require__(id);\n\t});\n}\nwebpackAsyncContext.keys = () => (Object.keys(map));\nwebpackAsyncContext.id = \"./src/views lazy recursive ^\\\\.\\\\/.*$\";\nmodule.exports = webpackAsyncContext;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","// The chunk loading function for additional chunks\n// Since all referenced chunks are already included\n// in this file, this function is empty here.\n__webpack_require__.e = () => (Promise.resolve());","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(\"./src/linus-strategy.ts\");\n",""],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/src/Helper.ts b/src/Helper.ts index 0e9c633..808e6f8 100644 --- a/src/Helper.ts +++ b/src/Helper.ts @@ -462,7 +462,7 @@ class Helper { }), ); - console.log('this.#areas', this.#areas, this.#magicAreasDevices) + // console.log('this.#areas', this.#areas, this.#magicAreasDevices) this.#initialized = true; } diff --git a/src/chips/FanChip.ts b/src/chips/FanChip.ts index da2a861..98f954f 100644 --- a/src/chips/FanChip.ts +++ b/src/chips/FanChip.ts @@ -24,7 +24,7 @@ class FanChip extends AbstractChip { content: Helper.getCountTemplate("fan", "eq", "on"), tap_action: { action: "navigate", - navigation_path: "fans", + navigation_path: "fan", }, }; diff --git a/src/chips/LightChip.ts b/src/chips/LightChip.ts index 039299b..9ce2a72 100644 --- a/src/chips/LightChip.ts +++ b/src/chips/LightChip.ts @@ -26,7 +26,7 @@ class LightChip extends AbstractChip { content: "", tap_action: { action: "navigate", - navigation_path: "lights", + navigation_path: "light", }, }; diff --git a/src/chips/MediaPlayerChip.ts b/src/chips/MediaPlayerChip.ts index 360f509..e3cfb4c 100644 --- a/src/chips/MediaPlayerChip.ts +++ b/src/chips/MediaPlayerChip.ts @@ -25,7 +25,7 @@ class MediaPlayerChip extends AbstractChip { content: "", tap_action: { action: "navigate", - navigation_path: "media_players", + navigation_path: "media_player", }, }; diff --git a/src/chips/SwitchChip.ts b/src/chips/SwitchChip.ts index 94eb0bb..9f83537 100644 --- a/src/chips/SwitchChip.ts +++ b/src/chips/SwitchChip.ts @@ -24,7 +24,7 @@ class SwitchChip extends AbstractChip { content: "", tap_action: { action: "navigate", - navigation_path: "switches", + navigation_path: "switch", }, }; diff --git a/src/linus-strategy.ts b/src/linus-strategy.ts index 40cc78f..ae5f58f 100644 --- a/src/linus-strategy.ts +++ b/src/linus-strategy.ts @@ -3,7 +3,7 @@ import { generic } from "./types/strategy/generic"; import { LovelaceConfig, LovelaceViewConfig } from "./types/homeassistant/data/lovelace"; import { CUSTOM_VIEWS, DEVICE_CLASSES, DOMAINS_VIEWS, VIEWS_ICONS } from "./variables"; import { AreaView } from "./views/AreaView"; -import { getAreaName, getFloorName } from "./utils"; +import { getAreaName, getDomainTranslationKey, getFloorName } from "./utils"; import { FloorView } from "./views/FloorView"; import { ResourceKeys } from "./types/homeassistant/data/frontend"; @@ -32,7 +32,7 @@ class LinusStrategy extends HTMLTemplateElement { static async generateDashboard(info: generic.DashBoardInfo): Promise { if (!Helper.isInitialized()) await Helper.initialize(info); - console.log('info', info); + // console.log('info', info); const views: LovelaceViewConfig[] = info.config?.views ?? []; @@ -71,11 +71,10 @@ class LinusStrategy extends HTMLTemplateElement { } views.push({ - title: viewId, - icon: (VIEWS_ICONS as Record)[viewId] ?? Helper.icons[domain as ResourceKeys]?.[device_class]?.default, + title: Helper.localize(getDomainTranslationKey(domain, device_class)), + icon: (VIEWS_ICONS as Record)[viewId] ?? Helper.icons[device_class === "battery" ? "binary_sensor" : domain as ResourceKeys]?.[device_class]?.default, path: viewId, - // subview: !Object.keys(ResourceKeys).includes(viewId), - subview: false, + subview: !Object.keys(VIEWS_ICONS).includes(viewId), strategy: { type: "custom:linus-strategy", options: { viewId }, diff --git a/src/views/AggregateView.ts b/src/views/AggregateView.ts index d76dd4b..7e94e41 100644 --- a/src/views/AggregateView.ts +++ b/src/views/AggregateView.ts @@ -24,7 +24,6 @@ class AggregateView extends AbstractView { */ #defaultConfig: views.ViewConfig = { title: "Aggregates", - path: "aggregates", icon: "mdi:fan", subview: true, }; diff --git a/src/views/AreaView.ts b/src/views/AreaView.ts index 2ea3d41..dfac691 100644 --- a/src/views/AreaView.ts +++ b/src/views/AreaView.ts @@ -36,7 +36,6 @@ class AreaView { config: views.ViewConfig = { icon: "mdi:home-assistant", type: "sections", - path: "home", subview: true, }; diff --git a/src/views/CameraView.ts b/src/views/CameraView.ts index e993fa4..e9604de 100644 --- a/src/views/CameraView.ts +++ b/src/views/CameraView.ts @@ -31,7 +31,6 @@ class CameraView extends AbstractView { */ #defaultConfig: views.ViewConfig = { title: "Cameras", - path: "cameras", icon: "mdi:cctv", subview: false, }; diff --git a/src/views/ClimateView.ts b/src/views/ClimateView.ts index ae1f515..92f894b 100644 --- a/src/views/ClimateView.ts +++ b/src/views/ClimateView.ts @@ -33,7 +33,6 @@ class ClimateView extends AbstractView { */ #defaultConfig: views.ViewConfig = { title: "Climates", - path: "climates", icon: "mdi:thermostat", subview: false, }; diff --git a/src/views/CoverView.ts b/src/views/CoverView.ts index d75fad9..ad75e69 100644 --- a/src/views/CoverView.ts +++ b/src/views/CoverView.ts @@ -31,7 +31,6 @@ class CoverView extends AbstractView { */ #defaultConfig: views.ViewConfig = { title: "Covers", - path: "cover", icon: "mdi:window-open", subview: false, }; diff --git a/src/views/FanView.ts b/src/views/FanView.ts index b549ecd..4a02ea9 100644 --- a/src/views/FanView.ts +++ b/src/views/FanView.ts @@ -31,7 +31,6 @@ class FanView extends AbstractView { */ #defaultConfig: views.ViewConfig = { title: "Fans", - path: "fans", icon: "mdi:fan", subview: false, }; diff --git a/src/views/FloorView.ts b/src/views/FloorView.ts index 516370f..8951d07 100644 --- a/src/views/FloorView.ts +++ b/src/views/FloorView.ts @@ -34,7 +34,6 @@ class FloorView { config: views.ViewConfig = { icon: "mdi:home-assistant", type: "sections", - path: "home", subview: true, }; diff --git a/src/views/HomeView.ts b/src/views/HomeView.ts index f8d1a2a..ba8b1b4 100644 --- a/src/views/HomeView.ts +++ b/src/views/HomeView.ts @@ -36,7 +36,6 @@ class HomeView { title: "Home", icon: "mdi:home-assistant", type: "sections", - path: "home", subview: false, }; diff --git a/src/views/LightView.ts b/src/views/LightView.ts index d8e87de..96d15e0 100644 --- a/src/views/LightView.ts +++ b/src/views/LightView.ts @@ -30,7 +30,6 @@ class LightView extends AbstractView { * @private */ #defaultConfig: views.ViewConfig = { - path: "lights", icon: "mdi:lightbulb-group", subview: false, }; diff --git a/src/views/MediaPlayerView.ts b/src/views/MediaPlayerView.ts index 58a2b35..c34e954 100644 --- a/src/views/MediaPlayerView.ts +++ b/src/views/MediaPlayerView.ts @@ -31,7 +31,6 @@ class MediaPlayerView extends AbstractView { */ #defaultConfig: views.ViewConfig = { title: "MediaPlayers", - path: "media_players", icon: "mdi:cast", subview: false, }; diff --git a/src/views/SceneView.ts b/src/views/SceneView.ts index b8890b2..dd15dcb 100644 --- a/src/views/SceneView.ts +++ b/src/views/SceneView.ts @@ -31,7 +31,6 @@ class SceneView extends AbstractView { */ #defaultConfig: views.ViewConfig = { title: "Scenes", - path: "scenes", icon: "mdi:palette", subview: false, }; diff --git a/src/views/SecurityDetailsView.ts b/src/views/SecurityDetailsView.ts index 0b44c77..3d75e16 100644 --- a/src/views/SecurityDetailsView.ts +++ b/src/views/SecurityDetailsView.ts @@ -20,7 +20,6 @@ abstract class SecurityDetailsView { */ config: LovelaceViewConfig = { title: Helper.localize("component.binary_sensor.entity_component.safety.name"), - path: "security-details", icon: "mdi:security", subview: true, }; diff --git a/src/views/SecurityView.ts b/src/views/SecurityView.ts index 3358ce5..d584398 100644 --- a/src/views/SecurityView.ts +++ b/src/views/SecurityView.ts @@ -26,7 +26,6 @@ class SecurityView { * @private */ config: views.ViewConfig = { - path: "security", title: Helper.localize("component.binary_sensor.entity_component.safety.name"), icon: "mdi:security", type: "sections", diff --git a/src/views/SensorView.ts b/src/views/SensorView.ts index 98215e9..6e89ebd 100644 --- a/src/views/SensorView.ts +++ b/src/views/SensorView.ts @@ -31,7 +31,6 @@ class SensorView extends AbstractView { */ #defaultConfig: views.ViewConfig = { title: "Sensors", - path: "scenes", icon: "mdi:palette", subview: false, }; diff --git a/src/views/SwitchView.ts b/src/views/SwitchView.ts index d111aa7..21b5194 100644 --- a/src/views/SwitchView.ts +++ b/src/views/SwitchView.ts @@ -31,7 +31,6 @@ class SwitchView extends AbstractView { */ #defaultConfig: views.ViewConfig = { title: "Switches", - path: "switches", icon: "mdi:dip-switch", subview: false, }; diff --git a/src/views/UnavailableView.ts b/src/views/UnavailableView.ts index 35494b3..9fc8509 100644 --- a/src/views/UnavailableView.ts +++ b/src/views/UnavailableView.ts @@ -25,7 +25,6 @@ class UnavailableView { * @type {views.ViewConfig} */ config: views.ViewConfig = { - path: "unavailable", title: Helper.localize("state.default.unavailable"), icon: "mdi:view-dashboard", type: "sections", diff --git a/src/views/VacuumView.ts b/src/views/VacuumView.ts index d0fcfff..075a2ca 100644 --- a/src/views/VacuumView.ts +++ b/src/views/VacuumView.ts @@ -31,7 +31,6 @@ class VacuumView extends AbstractView { */ #defaultConfig: views.ViewConfig = { title: "Vacuums", - path: "vacuums", icon: "mdi:robot-vacuum", subview: false, };