diff --git a/.devcontainer.json b/.devcontainer.json index 69deea4..00ebcfb 100644 --- a/.devcontainer.json +++ b/.devcontainer.json @@ -1,6 +1,6 @@ { "name": "Thank-you-Linus/Linus-Dashboard", - "image": "mcr.microsoft.com/vscode/devcontainers/python:3.12-bullseye", + "image": "mcr.microsoft.com/devcontainers/python:3.12", "postCreateCommand": "scripts/setup", "forwardPorts": [ 8123 @@ -37,7 +37,5 @@ } }, "remoteUser": "vscode", - "features": { - "ghcr.io/devcontainers/features/rust:1": {} - } + "features": {} } \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 88f2fa7..57fd383 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -48,7 +48,7 @@ Use [black](https://github.com/ambv/black) to make sure the code follows the sty ## Test your code modification -This custom component is based on [integration_blueprint template](https://github.com/ludeeus/integration_blueprint). +This custom component is based on [linus_dashboard template](https://github.com/Thank-you-Linus/Linus-Dashboard). It comes with development environment in a container, easy to launch if you use Visual Studio Code. With this container you will have a stand alone diff --git a/README.md b/README.md index bfcedc1..a00ed43 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ File | Purpose | Documentation 1. Create a new repository in GitHub, using this repository as a template by clicking the "Use this template" button in the GitHub UI. 1. Open your new repository in Visual Studio Code devcontainer (Preferably with the "`Dev Containers: Clone Repository in Named Container Volume...`" option). -1. Rename all instances of the `integration_blueprint` to `custom_components/` (e.g. `custom_components/awesome_integration`). +1. Rename all instances of the `linus_dashboard` to `custom_components/` (e.g. `custom_components/awesome_integration`). 1. Rename all instances of the `Integration Blueprint` to `` (e.g. `Awesome Integration`). 1. Run the `scripts/develop` to start HA and test out your new integration. diff --git a/README_EXAMPLE.md b/README_EXAMPLE.md index a923aa9..776db25 100644 --- a/README_EXAMPLE.md +++ b/README_EXAMPLE.md @@ -1,4 +1,4 @@ -# Linus Dashboard +# Integration Blueprint [![GitHub Release][releases-shield]][releases] [![GitHub Activity][commits-shield]][commits] @@ -28,7 +28,7 @@ Platform | Description 1. Download _all_ the files from the `custom_components/linus_dashboard/` directory (folder) in this repository. 1. Place the files you downloaded in the new directory (folder) you created. 1. Restart Home Assistant -1. In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "Integration blueprint" +1. In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "Linus dashboard" ## Configuration is done in the UI @@ -41,11 +41,11 @@ If you want to contribute to this please read the [Contribution guidelines](CONT *** [linus_dashboard]: https://github.com/Thank-you-Linus/Linus-Dashboard -[buymecoffee]: https://www.buymeacoffee.com/linus +[buymecoffee]: https://www.buymeacoffee.com/ludeeus [buymecoffeebadge]: https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg?style=for-the-badge [commits-shield]: https://img.shields.io/github/commit-activity/y/ludeeus/linus_dashboard.svg?style=for-the-badge [commits]: https://github.com/Thank-you-Linus/Linus-Dashboard/commits/main -[discord]: https://discord.gg/ej2Xn4GTww +[discord]: https://discord.gg/Qa5fW2R [discord-shield]: https://img.shields.io/discord/330944238910963714.svg?style=for-the-badge [exampleimg]: example.png [forum-shield]: https://img.shields.io/badge/community-forum-brightgreen.svg?style=for-the-badge diff --git a/custom_components/linus_dashboard/__init__.py b/custom_components/linus_dashboard/__init__.py index 9f3fe42..2f765b2 100644 --- a/custom_components/linus_dashboard/__init__.py +++ b/custom_components/linus_dashboard/__init__.py @@ -1,55 +1,76 @@ -""" -Custom integration to integrate linus_dashboard with Home Assistant. +"""Linus Dashboard integration for Home Assistant.""" -For more details about this integration, please refer to -https://github.com/Thank-you-Linus/Linus-Dashboard -""" +import logging +import os -from __future__ import annotations -from typing import TYPE_CHECKING +from homeassistant.components.frontend import ( + add_extra_js_url, + async_register_built_in_panel, + async_remove_panel, +) +from homeassistant.config_entries import ConfigEntry +from homeassistant.core import HomeAssistant -from homeassistant.components import frontend -from homeassistant.components.lovelace import _register_panel -from homeassistant.components.lovelace.dashboard import LovelaceYAML +_LOGGER = logging.getLogger(__name__) -from .load_dashboard import load_dashboard -from .load_plugins import load_plugins +DOMAIN = "linus_dashboard" -from .const import DOMAIN, VERSION - -if TYPE_CHECKING: - from homeassistant.config_entries import ConfigEntry - from homeassistant.core import HomeAssistant - - -async def async_setup(hass: HomeAssistant, config: ConfigEntry) -> bool: - """Set up the Linus Dashboard integration.""" - load_plugins(hass, DOMAIN) +async def async_setup(hass: HomeAssistant, _config: dict) -> bool: + """Set up Linus Dashboard.""" + _LOGGER.info("Setting up Linus Dashboard") + hass.data.setdefault(DOMAIN, {}) return True -# https://developers.home-assistant.io/docs/config_entries_index/#setting-up-an-entry -async def async_setup_entry( - hass: HomeAssistant, - entry: ConfigEntry, -) -> bool: - """Set up this integration using UI.""" - - load_dashboard(hass, DOMAIN) - entry.async_on_unload(entry.add_update_listener(async_reload_entry)) - +async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: + """Set up Linus Dashboard from a config entry.""" + _LOGGER.info("Setting up Linus Dashboard entry") + + # Path to the YAML file for the dashboard + dashboard_path = os.path.join( + hass.config.path(f"custom_components/{DOMAIN}/lovelace/ui-lovelace.yaml") + ) + + # Path to the JavaScript file for the strategy + strategy_js_url = f"/{DOMAIN}/js/linus-strategy.js" + strategy_js_path = hass.config.path( + f"custom_components/{DOMAIN}/js/linus-strategy.js" + ) + hass.http.register_static_path(strategy_js_url, strategy_js_path, False) + + # Add the JavaScript file as a frontend resource + add_extra_js_url(hass, strategy_js_url) + + # Use a unique name for the panel to avoid conflicts + sidebar_title = "Linus Dashboard" + sidebar_icon = "mdi:bow-tie" + panel_url = DOMAIN + async_register_built_in_panel( + hass, + panel_url, + sidebar_title, + sidebar_icon, + config={ + "mode": "yaml", + "icon": sidebar_icon, + "title": sidebar_title, + "filename": dashboard_path, + }, + ) + + # Store the entry + hass.data[DOMAIN][entry.entry_id] = panel_url return True -async def async_remove_entry(hass, config_entry): - frontend.async_remove_panel(hass, "linus-dashboard") +async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: + """Unload a config entry.""" + _LOGGER.info("Unloading Linus Dashboard entry") + # Retrieve and remove the panel name + panel_url = hass.data[DOMAIN].pop(entry.entry_id, None) + if panel_url: + async_remove_panel(hass, panel_url) -async def async_reload_entry( - hass: HomeAssistant, - entry: ConfigEntry, -) -> None: - """Reload config entry.""" - await async_remove_entry(hass, entry) - await async_setup_entry(hass, entry) + return True diff --git a/custom_components/linus_dashboard/config_flow.py b/custom_components/linus_dashboard/config_flow.py index 07a424b..cc1729b 100644 --- a/custom_components/linus_dashboard/config_flow.py +++ b/custom_components/linus_dashboard/config_flow.py @@ -6,7 +6,7 @@ from homeassistant import config_entries, data_entry_flow from homeassistant.helpers import selector -from .const import DOMAIN, LOGGER +from .const import DOMAIN class BlueprintFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): @@ -14,25 +14,30 @@ class BlueprintFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): VERSION = 1 - async def async_step_user(self, user_input: dict | None = None) -> data_entry_flow.FlowResult: + async def async_step_user( + self, user_input: dict | None = None + ) -> data_entry_flow.FlowResult: """Handle a flow initialized by the user.""" _errors = {} + + # If user input is provided, create the entry if user_input is not None: return self.async_create_entry( title="Configuration", data=user_input, ) + # Show the form to the user with the required fields return self.async_show_form( step_id="user", data_schema=vol.Schema( { - vol.Required("alarm_entity_id"): selector.EntitySelector( + vol.Optional("alarm_entity_id"): selector.EntitySelector( selector.EntitySelectorConfig( domain="alarm_control_panel", ), ), - vol.Required("weather_entity_id"): selector.EntitySelector( + vol.Optional("weather_entity_id"): selector.EntitySelector( selector.EntitySelectorConfig( domain="weather", ), @@ -40,4 +45,4 @@ async def async_step_user(self, user_input: dict | None = None) -> data_entry_fl }, ), errors=_errors, - ) \ No newline at end of file + ) diff --git a/custom_components/linus_dashboard/const.py b/custom_components/linus_dashboard/const.py index 1c8fcf5..a78b8b4 100644 --- a/custom_components/linus_dashboard/const.py +++ b/custom_components/linus_dashboard/const.py @@ -6,3 +6,5 @@ DOMAIN = "linus_dashboard" ATTRIBUTION = "Data provided by http://jsonplaceholder.typicode.com/" + +VERSION = "0.0.1" diff --git a/custom_components/linus_dashboard/js/linus-strategy.js b/custom_components/linus_dashboard/js/linus-strategy.js new file mode 100644 index 0000000..a60b29f --- /dev/null +++ b/custom_components/linus_dashboard/js/linus-strategy.js @@ -0,0 +1,8662 @@ +/******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ "./node_modules/deepmerge/dist/cjs.js": +/*!********************************************!*\ + !*** ./node_modules/deepmerge/dist/cjs.js ***! + \********************************************/ +/***/ ((module) => { + +"use strict"; + + +var isMergeableObject = function isMergeableObject(value) { + return isNonNullObject(value) + && !isSpecial(value) +}; + +function isNonNullObject(value) { + return !!value && typeof value === 'object' +} + +function isSpecial(value) { + var stringValue = Object.prototype.toString.call(value); + + return stringValue === '[object RegExp]' + || stringValue === '[object Date]' + || isReactElement(value) +} + +// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25 +var canUseSymbol = typeof Symbol === 'function' && Symbol.for; +var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7; + +function isReactElement(value) { + return value.$$typeof === REACT_ELEMENT_TYPE +} + +function emptyTarget(val) { + return Array.isArray(val) ? [] : {} +} + +function cloneUnlessOtherwiseSpecified(value, options) { + return (options.clone !== false && options.isMergeableObject(value)) + ? deepmerge(emptyTarget(value), value, options) + : value +} + +function defaultArrayMerge(target, source, options) { + return target.concat(source).map(function(element) { + return cloneUnlessOtherwiseSpecified(element, options) + }) +} + +function getMergeFunction(key, options) { + if (!options.customMerge) { + return deepmerge + } + var customMerge = options.customMerge(key); + return typeof customMerge === 'function' ? customMerge : deepmerge +} + +function getEnumerableOwnPropertySymbols(target) { + return Object.getOwnPropertySymbols + ? Object.getOwnPropertySymbols(target).filter(function(symbol) { + return Object.propertyIsEnumerable.call(target, symbol) + }) + : [] +} + +function getKeys(target) { + return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target)) +} + +function propertyIsOnObject(object, property) { + try { + return property in object + } catch(_) { + return false + } +} + +// Protects from prototype poisoning and unexpected merging up the prototype chain. +function propertyIsUnsafe(target, key) { + return propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet, + && !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain, + && Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable. +} + +function mergeObject(target, source, options) { + var destination = {}; + if (options.isMergeableObject(target)) { + getKeys(target).forEach(function(key) { + destination[key] = cloneUnlessOtherwiseSpecified(target[key], options); + }); + } + getKeys(source).forEach(function(key) { + if (propertyIsUnsafe(target, key)) { + return + } + + if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) { + destination[key] = getMergeFunction(key, options)(target[key], source[key], options); + } else { + destination[key] = cloneUnlessOtherwiseSpecified(source[key], options); + } + }); + return destination +} + +function deepmerge(target, source, options) { + options = options || {}; + options.arrayMerge = options.arrayMerge || defaultArrayMerge; + options.isMergeableObject = options.isMergeableObject || isMergeableObject; + // cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge() + // implementations can use it. The caller may not replace it. + options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified; + + var sourceIsArray = Array.isArray(source); + var targetIsArray = Array.isArray(target); + var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray; + + if (!sourceAndTargetTypesMatch) { + return cloneUnlessOtherwiseSpecified(source, options) + } else if (sourceIsArray) { + return options.arrayMerge(target, source, options) + } else { + return mergeObject(target, source, options) + } +} + +deepmerge.all = function deepmergeAll(array, options) { + if (!Array.isArray(array)) { + throw new Error('first argument should be an array') + } + + return array.reduce(function(prev, next) { + return deepmerge(prev, next, options) + }, {}) +}; + +var deepmerge_1 = deepmerge; + +module.exports = deepmerge_1; + + +/***/ }), + +/***/ "./src/Helper.ts": +/*!***********************!*\ + !*** ./src/Helper.ts ***! + \***********************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ Helper: () => (/* binding */ Helper) +/* harmony export */ }); +/* harmony import */ var _configurationDefaults__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./configurationDefaults */ "./src/configurationDefaults.ts"); +/* harmony import */ var deepmerge__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! deepmerge */ "./node_modules/deepmerge/dist/cjs.js"); +/* harmony import */ var deepmerge__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(deepmerge__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _variables__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./variables */ "./src/variables.ts"); +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +}; +var _a, _Helper_entities, _Helper_devices, _Helper_areas, _Helper_floors, _Helper_hassStates, _Helper_hassLocalize, _Helper_initialized, _Helper_strategyOptions, _Helper_magicAreasDevices, _Helper_debug, _Helper_areaFilterCallback, _Helper_getObjectKeysByPropertyValue; + + + +/** + * Helper Class + * + * Contains the objects of Home Assistant's registries and helper methods. + */ +class Helper { + /** + * Class constructor. + * + * This class shouldn't be instantiated directly. + * Instead, it should be initialized with method initialize(). + * + * @throws {Error} If trying to instantiate this class. + */ + constructor() { + throw new Error("This class should be invoked with method initialize() instead of using the keyword new!"); + } + /** + * Custom strategy configuration. + * + * @returns {generic.StrategyConfig} + * @static + */ + static get strategyOptions() { + return __classPrivateFieldGet(this, _a, "f", _Helper_strategyOptions); + } + /** + * Custom strategy configuration. + * + * @returns {Record} + * @static + */ + static get magicAreasDevices() { + return __classPrivateFieldGet(this, _a, "f", _Helper_magicAreasDevices); + } + /** + * Get the entities from Home Assistant's area registry. + * + * @returns {StrategyArea[]} + * @static + */ + static get areas() { + return __classPrivateFieldGet(this, _a, "f", _Helper_areas); + } + /** + * Get the entities from Home Assistant's floor registry. + * + * @returns {StrategyFloor[]} + * @static + */ + static get floors() { + return __classPrivateFieldGet(this, _a, "f", _Helper_floors).sort((a, b) => { + // Check if 'level' is undefined in either object + if (a.level === undefined) + return 1; // a should come after b + if (b.level === undefined) + return -1; // b should come after a + // Both 'level' values are defined, compare them + return a.level - b.level; + }); + } + /** + * Get the devices from Home Assistant's device registry. + * + * @returns {DeviceRegistryEntry[]} + * @static + */ + static get devices() { + return __classPrivateFieldGet(this, _a, "f", _Helper_devices); + } + /** + * Get the entities from Home Assistant's entity registry. + * + * @returns {EntityRegistryEntry[]} + * @static + */ + static get entities() { + return __classPrivateFieldGet(this, _a, "f", _Helper_entities); + } + /** + * Get the current debug mode of the mushroom strategy. + * + * @returns {boolean} + * @static + */ + static get debug() { + return __classPrivateFieldGet(this, _a, "f", _Helper_debug); + } + /** + * Initialize this module. + * + * @param {generic.DashBoardInfo} info Strategy information object. + * @returns {Promise} + * @static + */ + static async initialize(info) { + // Initialize properties. + __classPrivateFieldSet(this, _a, info.hass.states, "f", _Helper_hassStates); + __classPrivateFieldSet(this, _a, info.hass.localize, "f", _Helper_hassLocalize); + console.log('info.hass.resources.fr', info.hass.resources.fr); + __classPrivateFieldSet(this, _a, deepmerge__WEBPACK_IMPORTED_MODULE_1___default()(_configurationDefaults__WEBPACK_IMPORTED_MODULE_0__.configurationDefaults, info.config?.strategy?.options ?? {}), "f", _Helper_strategyOptions); + __classPrivateFieldSet(this, _a, __classPrivateFieldGet(this, _a, "f", _Helper_strategyOptions).debug, "f", _Helper_debug); + try { + // Query the registries of Home Assistant. + // noinspection ES6MissingAwait False positive? https://youtrack.jetbrains.com/issue/WEB-63746 + [({ set value(_b) { __classPrivateFieldSet(_a, _a, _b, "f", _Helper_entities); } }).value, ({ set value(_b) { __classPrivateFieldSet(_a, _a, _b, "f", _Helper_devices); } }).value, ({ set value(_b) { __classPrivateFieldSet(_a, _a, _b, "f", _Helper_areas); } }).value, ({ set value(_b) { __classPrivateFieldSet(_a, _a, _b, "f", _Helper_floors); } }).value] = await Promise.all([ + info.hass.callWS({ type: "config/entity_registry/list" }), + info.hass.callWS({ type: "config/device_registry/list" }), + info.hass.callWS({ type: "config/area_registry/list" }), + info.hass.callWS({ type: "config/floor_registry/list" }), + ]); + } + catch (e) { + _a.logError("An error occurred while querying Home assistant's registries!", e); + throw 'Check the console for details'; + } + // Create and add the undisclosed area if not hidden in the strategy options. + if (!__classPrivateFieldGet(this, _a, "f", _Helper_strategyOptions).areas.undisclosed?.hidden) { + __classPrivateFieldGet(this, _a, "f", _Helper_strategyOptions).areas.undisclosed = { + ..._configurationDefaults__WEBPACK_IMPORTED_MODULE_0__.configurationDefaults.areas.undisclosed, + ...__classPrivateFieldGet(this, _a, "f", _Helper_strategyOptions).areas.undisclosed, + }; + // Make sure the custom configuration of the undisclosed area doesn't overwrite the area_id. + __classPrivateFieldGet(this, _a, "f", _Helper_strategyOptions).areas.undisclosed.area_id = "undisclosed"; + __classPrivateFieldGet(this, _a, "f", _Helper_areas).push(__classPrivateFieldGet(this, _a, "f", _Helper_strategyOptions).areas.undisclosed); + } + // Merge custom areas of the strategy options into strategy areas. + __classPrivateFieldSet(this, _a, _a.areas.map(area => { + return { ...area, ...__classPrivateFieldGet(this, _a, "f", _Helper_strategyOptions).areas?.[area.area_id] }; + }), "f", _Helper_areas); + // Sort strategy areas by order first and then by name. + __classPrivateFieldGet(this, _a, "f", _Helper_areas).sort((a, b) => { + return (a.order ?? Infinity) - (b.order ?? Infinity) || a.name.localeCompare(b.name); + }); + // Find undisclosed and put it in last position. + const indexUndisclosed = __classPrivateFieldGet(this, _a, "f", _Helper_areas).findIndex(item => item.area_id === "undisclosed"); + if (indexUndisclosed !== -1) { + const areaUndisclosed = __classPrivateFieldGet(this, _a, "f", _Helper_areas).splice(indexUndisclosed, 1)[0]; + __classPrivateFieldGet(this, _a, "f", _Helper_areas).push(areaUndisclosed); + } + // Sort custom and default views of the strategy options by order first and then by title. + __classPrivateFieldGet(this, _a, "f", _Helper_strategyOptions).views = Object.fromEntries(Object.entries(__classPrivateFieldGet(this, _a, "f", _Helper_strategyOptions).views).sort(([, a], [, b]) => { + return (a.order ?? Infinity) - (b.order ?? Infinity) || (a.title ?? "undefined").localeCompare(b.title ?? "undefined"); + })); + // Sort custom and default domains of the strategy options by order first and then by title. + __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"); + })); + // Get magic areas devices. + __classPrivateFieldSet(this, _a, _a.devices + .filter(device => device.manufacturer === 'Magic Areas') + .reduce((acc, device) => { + acc[device.name] = { + ...device, + area_name: device.name, + entities: __classPrivateFieldGet(this, _a, "f", _Helper_entities).filter(entity => entity.device_id === device.id)?.reduce((entities, entity) => { + entities[entity.translation_key] = entity; + return entities; + }, {}) + }; + return acc; + }, {}), "f", _Helper_magicAreasDevices); + console.log('this.#magicAreasDevices', __classPrivateFieldGet(this, _a, "f", _Helper_magicAreasDevices)); + __classPrivateFieldSet(this, _a, true, "f", _Helper_initialized); + } + /** + * Get the initialization status of the Helper class. + * + * @returns {boolean} True if this module is initialized. + * @static + */ + static isInitialized() { + return __classPrivateFieldGet(this, _a, "f", _Helper_initialized); + } + /** + * Get a template string to define the number of a given domain's entities with a certain state. + * + * States are compared against a given value by a given operator. + * + * @param {string} domain The domain of the entities. + * @param {string} operator The Comparison operator between state and value. + * @param {string} value The value to which the state is compared against. + * @param {string} area_id + * + * @return {string} The template string. + * @static + */ + static getCountTemplate(domain, operator, value, area_id) { + // noinspection JSMismatchedCollectionQueryUpdate (False positive per 17-04-2023) + /** + * Array of entity state-entries, filtered by domain. + * + * Each element contains a template-string which is used to access home assistant's state machine (state object) in + * a template. + * E.g. "states['light.kitchen']" + * + * The array excludes hidden and disabled entities. + * + * @type {string[]} + */ + const states = []; + if (!this.isInitialized()) { + console.warn("Helper class should be initialized before calling this method!"); + } + // Get the ID of the devices which are linked to the given area. + for (const area of __classPrivateFieldGet(this, _a, "f", _Helper_areas)) { + if (area_id && area.area_id !== area_id) + continue; + const areaDeviceIds = __classPrivateFieldGet(this, _a, "f", _Helper_devices).filter((device) => { + return device.area_id === area.area_id; + }).map((device) => { + return device.id; + }); + // Get the entities of which all conditions of the callback function are met. @see areaFilterCallback. + const newStates = __classPrivateFieldGet(this, _a, "f", _Helper_entities).filter(__classPrivateFieldGet(this, _a, "m", _Helper_areaFilterCallback), { + area: area, + domain: domain, + areaDeviceIds: areaDeviceIds, + }) + .map((entity) => `states['${entity.entity_id}']`); + states.push(...newStates); + } + return `{% set entities = [${states}] %} {{ entities | selectattr('state','${operator}','${value}') | list | count }}`; + } + /** + * Get a template string to define the number of a given device_class's entities with a certain state. + * + * States are compared against a given value by a given operator. + * + * @param {string} domain The domain of the entities. + * @param {string} device_class The device class of the entities. + * @param {string} operator The Comparison operator between state and value. + * @param {string} value The value to which the state is compared against. + * @param {string} area_id + * + * @return {string} The template string. + * @static + */ + static getDeviceClassCountTemplate(domain, device_class, operator, value, area_id) { + // noinspection JSMismatchedCollectionQueryUpdate (False positive per 17-04-2023) + /** + * Array of entity state-entries, filtered by device_class. + * + * Each element contains a template-string which is used to access home assistant's state machine (state object) in + * a template. + * E.g. "states['light.kitchen']" + * + * The array excludes hidden and disabled entities. + * + * @type {string[]} + */ + const states = []; + if (!this.isInitialized()) { + console.warn("Helper class should be initialized before calling this method!"); + } + // Get the ID of the devices which are linked to the given area. + for (const area of __classPrivateFieldGet(this, _a, "f", _Helper_areas)) { + if (area_id && area.area_id !== area_id) + continue; + const areaDeviceIds = __classPrivateFieldGet(this, _a, "f", _Helper_devices).filter((device) => { + return device.area_id === area.area_id; + }).map((device) => { + return device.id; + }); + // Get the entities of which all conditions of the callback function are met. @see areaFilterCallback. + const newStates = __classPrivateFieldGet(this, _a, "f", _Helper_entities).filter(__classPrivateFieldGet(this, _a, "m", _Helper_areaFilterCallback), { + area: area, + domain: domain, + areaDeviceIds: areaDeviceIds, + }) + .map((entity) => `states['${entity.entity_id}']`); + states.push(...newStates); + } + return `{% set entities = [${states}] %} {{ entities | selectattr('attributes.device_class', 'defined') | selectattr('attributes.device_class', 'eq', '${device_class}') | selectattr('state','${operator}','${value}') | list | count }}`; + } + /** + * Get device entities from the entity registry, filtered by area and domain. + * + * The entity registry is a registry where Home-Assistant keeps track of all entities. + * A device is represented in Home Assistant via one or more entities. + * + * The result excludes hidden and disabled entities. + * + * @param {AreaRegistryEntry} area Area entity. + * @param {string} domain The domain of the entity-id. + * + * @return {EntityRegistryEntry[]} Array of device entities. + * @static + */ + static getDeviceEntities(area, domain) { + if (!this.isInitialized()) { + console.warn("Helper class should be initialized before calling this method!"); + } + // Get the ID of the devices which are linked to the given area. + const areaDeviceIds = __classPrivateFieldGet(this, _a, "f", _Helper_devices).filter((device) => { + return (device.area_id ?? "undisclosed") === area.area_id; + }).map((device) => { + return device.id; + }); + // Return the entities of which all conditions of the callback function are met. @see areaFilterCallback. + let device_entities = __classPrivateFieldGet(this, _a, "f", _Helper_entities).filter(__classPrivateFieldGet(this, _a, "m", _Helper_areaFilterCallback), { + area: area, + domain: domain, + areaDeviceIds: areaDeviceIds, + }) + .sort((a, b) => { + return (a.original_name ?? "undefined").localeCompare(b.original_name ?? "undefined"); + }); + if (domain == "light") { + const device_lights = Object.values(__classPrivateFieldGet(this, _a, "f", _Helper_magicAreasDevices)[area.name]?.entities ?? []) + .filter(e => e.translation_key !== 'all_lights' && e.entity_id.endsWith('_lights')); + device_lights.forEach(light => { + const child_lights = __classPrivateFieldGet(_a, _a, "f", _Helper_hassStates)[light.entity_id].attributes?.entity_id; + const filteredEntities = device_entities.filter(entity => !child_lights.includes(entity.entity_id)); + device_entities = [light, ...filteredEntities]; + }); + } + return device_entities; + } + /** + * Get state entities, filtered by area and domain. + * + * The result excludes hidden and disabled entities. + * + * @param {AreaRegistryEntry} area Area entity. + * @param {string} domain Domain of the entity-id. + * + * @return {HassEntity[]} Array of state entities. + */ + static getStateEntities(area, domain) { + if (!this.isInitialized()) { + console.warn("Helper class should be initialized before calling this method!"); + } + const states = []; + // Create a map for the hassEntities and devices {id: object} to improve lookup speed. + const entityMap = Object.fromEntries(__classPrivateFieldGet(this, _a, "f", _Helper_entities).map((entity) => [entity.entity_id, entity])); + const deviceMap = Object.fromEntries(__classPrivateFieldGet(this, _a, "f", _Helper_devices).map((device) => [device.id, device])); + // Get states whose entity-id starts with the given string. + const stateEntities = Object.values(__classPrivateFieldGet(this, _a, "f", _Helper_hassStates)).filter((state) => state.entity_id.startsWith(`${domain}.`)); + for (const state of stateEntities) { + const hassEntity = entityMap[state.entity_id]; + const device = deviceMap[hassEntity?.device_id ?? ""]; + // Collect states of which any (whichever comes first) of the conditions below are met: + // 1. The linked entity is linked to the given area. + // 2. The entity is linked to a device, and the linked device is linked to the given area. + if ((hassEntity?.area_id === area.area_id) + || (device && device.area_id === area.area_id)) { + states.push(state); + } + } + return states; + } + /** + * Sanitize a classname. + * + * The name is sanitized by capitalizing the first character of the name or after an underscore. + * Underscores are removed. + * + * @param {string} className Name of the class to sanitize. + * @returns {string} The sanitized classname. + */ + static sanitizeClassName(className) { + className = className.charAt(0).toUpperCase() + className.slice(1); + return className.replace(/([-_][a-z])/g, (group) => group + .toUpperCase() + .replace("-", "") + .replace("_", "")); + } + /** + * Get the ids of the views which aren't set to hidden in the strategy options. + * + * @return {string[]} An array of view ids. + */ + static getExposedViewIds() { + if (!this.isInitialized()) { + console.warn("Helper class should be initialized before calling this method!"); + } + return __classPrivateFieldGet(this, _a, "m", _Helper_getObjectKeysByPropertyValue).call(this, __classPrivateFieldGet(this, _a, "f", _Helper_strategyOptions).views, "hidden", false); + } + /** + * Get the ids of the domain ids which aren't set to hidden in the strategy options. + * + * @return {string[]} An array of domain ids. + */ + static getExposedDomainIds() { + if (!this.isInitialized()) { + console.warn("Helper class should be initialized before calling this method!"); + } + return __classPrivateFieldGet(this, _a, "m", _Helper_getObjectKeysByPropertyValue).call(this, __classPrivateFieldGet(this, _a, "f", _Helper_strategyOptions).domains, "hidden", false); + } + /** + * Logs an error message to the console. + * + * @param {string} userMessage - The error message to display. + * @param {unknown} [e] - (Optional) The error object or additional information. + * + * @return {void} + */ + static logError(userMessage, e) { + if (_a.debug) { + console.error(userMessage, e); + return; + } + console.error(userMessage); + } + /** + * Get entity state. + * + * @return {HassEntity} + */ + static getEntityState(entity_id) { + return __classPrivateFieldGet(this, _a, "f", _Helper_hassStates)[entity_id]; + } + /** + * Get entity domain. + * + * @return {string} + */ + static getEntityDomain(entityId) { + return entityId.split(".")[0]; + } + /** + * Get translation. + * + * @return {string} + */ + static localize(translationKey) { + return __classPrivateFieldGet(this, _a, "f", _Helper_hassLocalize).call(this, translationKey); + } + /** + * Get valid entity. + * + * @return {EntityRegistryEntry} + */ + static getValidEntity(entity) { + return entity.disabled_by === null && entity.hidden_by === null; + } + /** + * Get Main Alarm entity. + * + * @return {EntityRegistryEntry} + */ + static getAlarmEntity() { + return __classPrivateFieldGet(_a, _a, "f", _Helper_entities).find((entity) => entity.entity_id.startsWith("alarm_control_panel.") && _a.getValidEntity(entity)); + } + /** + * Get Persons entity. + * + * @return {EntityRegistryEntry} + */ + static getPersonsEntity() { + return __classPrivateFieldGet(_a, _a, "f", _Helper_entities).filter((entity) => entity.entity_id.startsWith("person.") && _a.getValidEntity(entity)); + } + /** + * Get Cameras entity. + * + * @return {EntityRegistryEntry} + */ + static getCamerasEntity() { + return __classPrivateFieldGet(_a, _a, "f", _Helper_entities).filter((entity) => entity.entity_id.startsWith("camera.") && _a.getValidEntity(entity)); + } +} +_a = Helper, _Helper_areaFilterCallback = function _Helper_areaFilterCallback(entity) { + const entityUnhidden = entity.hidden_by === null && entity.disabled_by === null; + const domainMatches = entity.entity_id.startsWith(`${this.domain}.`); + const linusDeviceIds = __classPrivateFieldGet(_a, _a, "f", _Helper_devices).filter(d => [_variables__WEBPACK_IMPORTED_MODULE_2__.DOMAIN, "adaptive_lighting"].includes(d.identifiers[0]?.[0])).map(e => e.id); + const isLinusEntity = linusDeviceIds.includes(entity.device_id ?? "") || entity.platform === _variables__WEBPACK_IMPORTED_MODULE_2__.DOMAIN; + const entityLinked = this.area.area_id === "undisclosed" + // Undisclosed area; + // nor the entity itself, neither the entity's linked device (if any) is linked to any area. + ? !entity.area_id && (this.areaDeviceIds.includes(entity.device_id ?? "") || !entity.device_id) + // Area is a hass entity; + // The entity's linked device or the entity itself is linked to the given area. + : this.areaDeviceIds.includes(entity.device_id ?? "") || entity.area_id === this.area.area_id; + return (!isLinusEntity && entityUnhidden && domainMatches && entityLinked); +}, _Helper_getObjectKeysByPropertyValue = function _Helper_getObjectKeysByPropertyValue(object, property, value) { + const keys = []; + for (const key of Object.keys(object)) { + if (object[key][property] === value) { + keys.push(key); + } + } + return keys; +}; +/** + * An array of entities from Home Assistant's entity registry. + * + * @type {EntityRegistryEntry[]} + * @private + */ +_Helper_entities = { value: void 0 }; +/** + * An array of entities from Home Assistant's device registry. + * + * @type {DeviceRegistryEntry[]} + * @private + */ +_Helper_devices = { value: void 0 }; +/** + * An array of entities from Home Assistant's area registry. + * + * @type {StrategyArea[]} + * @private + */ +_Helper_areas = { value: [] }; +/** + * An array of entities from Home Assistant's area registry. + * + * @type {StrategyFloor[]} + * @private + */ +_Helper_floors = { value: [] }; +/** + * An array of state entities from Home Assistant's Hass object. + * + * @type {HassEntities} + * @private + */ +_Helper_hassStates = { value: void 0 }; +/** + * Translation method. + * + * @type {any} + * @private + */ +_Helper_hassLocalize = { value: void 0 }; +/** + * Indicates whether this module is initialized. + * + * @type {boolean} True if initialized. + * @private + */ +_Helper_initialized = { value: false }; +/** + * The Custom strategy configuration. + * + * @type {generic.StrategyConfig} + * @private + */ +_Helper_strategyOptions = { value: void 0 }; +/** + * The magic areas devices. + * + * @type {Record} + * @private + */ +_Helper_magicAreasDevices = { value: void 0 }; +/** + * Set to true for more verbose information in the console. + * + * @type {boolean} + * @private + */ +_Helper_debug = { value: void 0 }; + + + +/***/ }), + +/***/ "./src/cards/AbstractCard.ts": +/*!***********************************!*\ + !*** ./src/cards/AbstractCard.ts ***! + \***********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AbstractCard: () => (/* binding */ AbstractCard) +/* harmony export */ }); +/* harmony import */ var _Helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Helper */ "./src/Helper.ts"); + +/** + * Abstract Card Class + * + * To create a new card, extend the new class with this one. + * + * @class + * @abstract + */ +class AbstractCard { + /** + * Class constructor. + * + * @param {generic.RegistryEntry} entity The hass entity to create a card for. + * @throws {Error} If the Helper module isn't initialized. + */ + constructor(entity) { + /** + * Configuration of the card. + * + * @type {EntityCardConfig} + */ + this.config = { + type: "custom:mushroom-entity-card", + icon: "mdi:help-circle", + }; + if (!_Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.isInitialized()) { + throw new Error("The Helper module must be initialized before using this one."); + } + this.entity = entity; + } + /** + * Get a card. + * + * @return {cards.AbstractCardConfig} A card object. + */ + getCard() { + return { + ...this.config, + entity: "entity_id" in this.entity ? this.entity.entity_id : undefined, + }; + } +} + + + +/***/ }), + +/***/ "./src/cards/AggregateCard.ts": +/*!************************************!*\ + !*** ./src/cards/AggregateCard.ts ***! + \************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AggregateCard: () => (/* binding */ AggregateCard) +/* harmony export */ }); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils */ "./src/utils.ts"); +/* harmony import */ var _Helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Helper */ "./src/Helper.ts"); +var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +}; +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _AggregateCard_domain, _AggregateCard_defaultConfig; + + +/** + * Aggregate Card class. + * + * Used for creating a Title Card with controls. + * + * @class + */ +class AggregateCard { + /** + * Class constructor. + * + * @param {string} domain The domain to control the entities of. + * @param {AggregateCardConfig} options Aggregate Card options. + */ + constructor(domain, options = {}) { + /** + * @type {string} The domain to control the entities of. + * @private + */ + _AggregateCard_domain.set(this, void 0); + /** + * Default configuration of the card. + * + * @type {AggregateCardConfig} + * @private + */ + _AggregateCard_defaultConfig.set(this, { + device_name: "Global", + }); + __classPrivateFieldSet(this, _AggregateCard_domain, domain, "f"); + __classPrivateFieldSet(this, _AggregateCard_defaultConfig, { + ...__classPrivateFieldGet(this, _AggregateCard_defaultConfig, "f"), + ...options, + }, "f"); + } + /** + * Create a Aggregate card. + * + * @return {StackCardConfig} A Aggregate card. + */ + createCard() { + const domains = typeof (__classPrivateFieldGet(this, _AggregateCard_domain, "f")) === "string" ? [__classPrivateFieldGet(this, _AggregateCard_domain, "f")] : __classPrivateFieldGet(this, _AggregateCard_domain, "f"); + const deviceClasses = __classPrivateFieldGet(this, _AggregateCard_defaultConfig, "f").device_class && typeof (__classPrivateFieldGet(this, _AggregateCard_defaultConfig, "f").device_class) === "string" ? [__classPrivateFieldGet(this, _AggregateCard_defaultConfig, "f").device_class] : __classPrivateFieldGet(this, _AggregateCard_defaultConfig, "f").device_class; + const cards = []; + const globalEntities = (0,_utils__WEBPACK_IMPORTED_MODULE_0__.getAggregateEntity)(_Helper__WEBPACK_IMPORTED_MODULE_1__.Helper.magicAreasDevices["Global"], domains, deviceClasses)[0] ?? false; + if (globalEntities) { + cards.push({ + type: "tile", + entity: globalEntities.entity_id, + state_content: (0,_utils__WEBPACK_IMPORTED_MODULE_0__.getStateContent)(globalEntities.entity_id), + color: globalEntities.entity_id.startsWith('binary_sensor.') ? 'red' : false, + icon_tap_action: __classPrivateFieldGet(this, _AggregateCard_domain, "f") === "light" ? "more-info" : "toggle", + }); + } + const areasByFloor = (0,_utils__WEBPACK_IMPORTED_MODULE_0__.groupBy)(_Helper__WEBPACK_IMPORTED_MODULE_1__.Helper.areas, (e) => e.floor_id ?? "undisclosed"); + for (const floor of [..._Helper__WEBPACK_IMPORTED_MODULE_1__.Helper.floors, _Helper__WEBPACK_IMPORTED_MODULE_1__.Helper.strategyOptions.floors.undisclosed]) { + if (!(floor.floor_id in areasByFloor) || areasByFloor[floor.floor_id].length === 0) + continue; + let floorCards = []; + floorCards.push({ + type: "custom:mushroom-title-card", + subtitle: floor.name, + card_mod: { + style: ` + ha-card.header { + padding-top: 8px; + } + `, + } + }); + let areaCards = []; + for (const [i, area] of areasByFloor[floor.floor_id].entries()) { + if (_Helper__WEBPACK_IMPORTED_MODULE_1__.Helper.strategyOptions.areas[area.area_id]?.hidden) + continue; + if (area.area_id !== "undisclosed") { + const areaEntities = (0,_utils__WEBPACK_IMPORTED_MODULE_0__.getAggregateEntity)(_Helper__WEBPACK_IMPORTED_MODULE_1__.Helper.magicAreasDevices[area.name], domains, deviceClasses).map(e => e.entity_id).filter(Boolean); + for (const areaEntity of areaEntities) { + areaCards.push({ + type: "tile", + entity: areaEntity, + primary: area.name, + state_content: (0,_utils__WEBPACK_IMPORTED_MODULE_0__.getStateContent)(areaEntity), + color: areaEntity.startsWith('binary_sensor.') ? 'red' : false, + }); + } + } + // Horizontally group every two area cards if all cards are created. + if (i === areasByFloor[floor.floor_id].length - 1) { + for (let i = 0; i < areaCards.length; i += 2) { + floorCards.push({ + type: "horizontal-stack", + cards: areaCards.slice(i, i + 2), + }); + } + } + } + if (areaCards.length === 0) + floorCards.pop(); + if (floorCards.length > 1) + cards.push(...floorCards); + } + return { + type: "vertical-stack", + cards: cards, + }; + } +} +_AggregateCard_domain = new WeakMap(), _AggregateCard_defaultConfig = new WeakMap(); + + + +/***/ }), + +/***/ "./src/cards/AlarmCard.ts": +/*!********************************!*\ + !*** ./src/cards/AlarmCard.ts ***! + \********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AlarmCard: () => (/* binding */ AlarmCard) +/* harmony export */ }); +/* harmony import */ var _AbstractCard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AbstractCard */ "./src/cards/AbstractCard.ts"); +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _AlarmCard_defaultConfig; + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Alarm Card Class + * + * Used to create a card for controlling an entity of the fan domain. + * + * @class + * @extends AbstractCard + */ +class AlarmCard extends _AbstractCard__WEBPACK_IMPORTED_MODULE_0__.AbstractCard { + /** + * Class constructor. + * + * @param {EntityRegistryEntry} entity The hass entity to create a card for. + * @throws {Error} If the Helper module isn't initialized. + */ + constructor(entity) { + super(entity); + /** + * Default configuration of the card. + * + * @type {TileCardConfig} + * @private + */ + _AlarmCard_defaultConfig.set(this, { + type: "tile", + entity: undefined, + icon: undefined, + features: [ + { + type: "alarm-modes", + modes: ["armed_home", "armed_away", "armed_night", "armed_vacation", "armed_custom_bypass", "disarmed"] + } + ] + }); + this.config = Object.assign(this.config, __classPrivateFieldGet(this, _AlarmCard_defaultConfig, "f")); + } +} +_AlarmCard_defaultConfig = new WeakMap(); + + + +/***/ }), + +/***/ "./src/cards/AreaButtonCard.ts": +/*!*************************************!*\ + !*** ./src/cards/AreaButtonCard.ts ***! + \*************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AreaCard: () => (/* binding */ AreaCard) +/* harmony export */ }); +/* harmony import */ var _AbstractCard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AbstractCard */ "./src/cards/AbstractCard.ts"); +/* harmony import */ var _Helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Helper */ "./src/Helper.ts"); +/* harmony import */ var _chips_LightControlChip__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../chips/LightControlChip */ "./src/chips/LightControlChip.ts"); +/* harmony import */ var _chips_LinusLightChip__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../chips/LinusLightChip */ "./src/chips/LinusLightChip.ts"); +/* harmony import */ var _chips_LinusClimateChip__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../chips/LinusClimateChip */ "./src/chips/LinusClimateChip.ts"); +/* harmony import */ var _chips_LinusAggregateChip__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../chips/LinusAggregateChip */ "./src/chips/LinusAggregateChip.ts"); +/* harmony import */ var _chips_AreaStateChip__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../chips/AreaStateChip */ "./src/chips/AreaStateChip.ts"); + + + + + + + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Area Button Card Class + * + * Used to create a card for an entity of the area domain. + * + * @class + * @extends AbstractCard + */ +class AreaCard extends _AbstractCard__WEBPACK_IMPORTED_MODULE_0__.AbstractCard { + getDefaultConfig(area, device) { + if (area.area_id === "undisclosed") { + return { + type: "custom:stack-in-card", + cards: [ + { + type: "custom:stack-in-card", + mode: "horizontal", + cards: [ + { + type: "custom:mushroom-template-card", + primary: area.name, + secondary: null, + icon: "mdi:devices", + icon_color: "grey", + fill_container: true, + layout: "horizontal", + multiline_secondary: false, + tap_action: { + action: "navigate", + navigation_path: area.area_id, + }, + hold_action: { + action: "none", + }, + double_tap_action: { + action: "none" + }, + card_mod: { + style: ` + :host { + background: #1f1f1f; + --mush-icon-size: 74px; + height: 66px; + margin-left: -26px !important; + } + mushroom-badge-icon { + left: 178px; + top: 17px; + } + ha-card { + box-shadow: none!important; + border: none; + } + `, + } + } + ], + card_mod: { + style: ` + ha-card { + box-shadow: none!important; + border: none; + } + ` + } + } + ] + }; + } + const { area_state, all_lights, aggregate_temperature, aggregate_battery, aggregate_door, aggregate_window, aggregate_health, aggregate_climate, aggregate_cover, light_control } = device.entities; + const icon = area.icon || "mdi:home-outline"; + return { + type: "custom:stack-in-card", + cards: [ + { + type: "custom:stack-in-card", + mode: "horizontal", + cards: [ + { + type: "custom:mushroom-template-card", + primary: area.name, + secondary: ` + {% set t = states('${aggregate_temperature?.entity_id}') %} + {% if t != 'unknown' and t != 'unavailable' %} + {{ t | float | round(1) }}{{ state_attr('${aggregate_temperature?.entity_id}', 'unit_of_measurement')}} + {% endif %} + `, + icon: icon, + icon_color: ` + {{ "indigo" if "dark" in state_attr('${area_state?.entity_id}', 'states') else "amber" }} + `, + fill_container: true, + layout: "horizontal", + multiline_secondary: false, + badge_icon: ` + {% set bl = states('${aggregate_battery?.entity_id}') %} + {% if bl == 'unknown' or bl == 'unavailable' %} + {% elif bl | int() < 10 %} mdi:battery-outline + {% elif bl | int() < 20 %} mdi:battery-10 + {% elif bl | int() < 30 %} mdi:battery-20 + {% elif bl | int() < 40 %} mdi:battery-30 + {% elif bl | int() < 50 %} mdi:battery-40 + {% elif bl | int() < 60 %} mdi:battery-50 + {% elif bl | int() < 70 %} mdi:battery-60 + {% elif bl | int() < 80 %} mdi:battery-70 + {% elif bl | int() < 90 %} mdi:battery-80 + {% elif bl | int() < 100 %} mdi:battery-90 + {% elif bl | int() == 100 %} mdi:battery + {% else %} mdi:battery-unknown + {% endif %} + `, + badge_color: `{% set bl = states('${aggregate_battery?.entity_id}') %} + {% if bl == 'unknown' or bl == 'unavailable' %} disabled + {% elif bl | int() < 10 %} red + {% elif bl | int() < 20 %} red + {% elif bl | int() < 30 %} red + {% elif bl | int() < 40 %} orange + {% elif bl | int() < 50 %} orange + {% elif bl | int() < 60 %} green + {% elif bl | int() < 70 %} green + {% elif bl | int() < 80 %} green + {% elif bl | int() < 90 %} green + {% elif bl | int() < 100 %} green + {% elif bl | int() == 100 %} green + {% else %} disabled + {% endif %} + `, + tap_action: { + action: "navigate", + navigation_path: area.area_id, + }, + hold_action: { + action: "none", + }, + double_tap_action: { + action: "none" + }, + card_mod: { + style: ` + :host { + background: transparent; + --mush-icon-size: 74px; + height: 66px; + margin-left: -26px !important; + } + mushroom-badge-icon { + top: 17px; + } + ha-card { + box-shadow: none!important; + border: none; + } + `, + } + }, + { + type: "custom:mushroom-chips-card", + alignment: "end", + chips: [ + area_state?.entity_id && { + type: "conditional", + conditions: [ + { + entity: area_state?.entity_id, + state_not: "unavailable" + } + ], + chip: new _chips_AreaStateChip__WEBPACK_IMPORTED_MODULE_6__.AreaStateChip(device).getChip(), + }, + aggregate_health?.entity_id && { + type: "conditional", + conditions: [ + { + entity: aggregate_health?.entity_id, + state: "on" + } + ], + chip: new _chips_LinusAggregateChip__WEBPACK_IMPORTED_MODULE_5__.LinusAggregateChip(device, "health").getChip(), + }, + aggregate_window?.entity_id && { + type: "conditional", + conditions: [ + { + entity: aggregate_window?.entity_id, + state: "on" + } + ], + chip: new _chips_LinusAggregateChip__WEBPACK_IMPORTED_MODULE_5__.LinusAggregateChip(device, "window").getChip(), + }, + aggregate_door?.entity_id && { + type: "conditional", + conditions: [ + { + entity: aggregate_door?.entity_id, + state: "on" + } + ], + chip: new _chips_LinusAggregateChip__WEBPACK_IMPORTED_MODULE_5__.LinusAggregateChip(device, "door").getChip(), + }, + aggregate_cover?.entity_id && { + type: "conditional", + conditions: [ + { + entity: aggregate_cover?.entity_id, + state: "on" + } + ], + chip: new _chips_LinusAggregateChip__WEBPACK_IMPORTED_MODULE_5__.LinusAggregateChip(device, "cover").getChip(), + }, + aggregate_climate?.entity_id && { + "type": "conditional", + "conditions": [ + { + "entity": aggregate_climate?.entity_id, + "state_not": "unavailable" + } + ], + "chip": new _chips_LinusClimateChip__WEBPACK_IMPORTED_MODULE_4__.LinusClimateChip(device).getChip() + }, + all_lights?.entity_id && { + "type": "conditional", + "conditions": [ + { + "entity": all_lights?.entity_id, + "state_not": "unavailable" + } + ], + "chip": new _chips_LinusLightChip__WEBPACK_IMPORTED_MODULE_3__.LinusLightChip(device, area.area_id).getChip() + }, + all_lights?.entity_id && { + "type": "conditional", + "conditions": [ + { + "entity": all_lights?.entity_id, + "state_not": "unavailable" + } + ], + "chip": new _chips_LightControlChip__WEBPACK_IMPORTED_MODULE_2__.LightControlChip(light_control?.entity_id).getChip() + }, + ].filter(Boolean), + card_mod: { + style: ` + ha-card { + --chip-box-shadow: none; + --chip-spacing: 0px; + width: -webkit-fill-available; + position: absolute; + top: 16px; + right: 8px; + } + .chip-container { + position: absolute; + right: 0px; + } + ` + } + } + ], + card_mod: { + style: ` + ha-card { + box-shadow: none!important; + border: none; + } + ` + } + }, + { + type: "custom:mushroom-light-card", + entity: all_lights?.entity_id, + fill_container: true, + show_brightness_control: true, + icon_type: "none", + primary_info: "none", + secondary_info: "none", + use_light_color: true, + layout: "horizontal", + card_mod: { + style: ` + :host { + --mush-control-height: 1rem; + } + ha-card { + box-shadow: none!important; + border: none; + } + ` + } + } + ] + }; + } + /** + * Class constructor. + * + * @param {AreaRegistryEntry} area The area entity to create a card for. + * @param {cards.TemplateCardOptions} [options={}] Options for the card. + * + * @throws {Error} If the Helper module isn't initialized. + */ + constructor(area, options = {}) { + super(area); + // Don't override the default card type if default is set in the strategy options. + if (options.type === "AreaButtonCard") { + delete options.type; + } + const device = _Helper__WEBPACK_IMPORTED_MODULE_1__.Helper.magicAreasDevices[area.name]; + if (device) { + const defaultConfig = this.getDefaultConfig(area, device); + this.config = Object.assign(this.config, defaultConfig, options); + } + } +} + + + +/***/ }), + +/***/ "./src/cards/AreaCard.ts": +/*!*******************************!*\ + !*** ./src/cards/AreaCard.ts ***! + \*******************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AreaCard: () => (/* binding */ AreaCard) +/* harmony export */ }); +/* harmony import */ var _AbstractCard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AbstractCard */ "./src/cards/AbstractCard.ts"); +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _AreaCard_defaultConfig; + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Area Card Class + * + * Used to create a card for an entity of the area domain. + * + * @class + * @extends AbstractCard + */ +class AreaCard extends _AbstractCard__WEBPACK_IMPORTED_MODULE_0__.AbstractCard { + /** + * Class constructor. + * + * @param {AreaRegistryEntry} area The area entity to create a card for. + * @param {cards.TemplateCardOptions} [options={}] Options for the card. + * + * @throws {Error} If the Helper module isn't initialized. + */ + constructor(area, options = {}) { + super(area); + /** + * Default configuration of the card. + * + * @type {TemplateCardConfig} + * @private + */ + _AreaCard_defaultConfig.set(this, { + type: "custom:mushroom-template-card", + primary: undefined, + icon: "mdi:texture-box", + icon_color: "blue", + tap_action: { + action: "navigate", + navigation_path: "", + }, + hold_action: { + action: "none", + }, + }); + // Don't override the default card type if default is set in the strategy options. + if (options.type === "default") { + delete options.type; + } + // Initialize the default configuration. + __classPrivateFieldGet(this, _AreaCard_defaultConfig, "f").primary = area.name; + if (__classPrivateFieldGet(this, _AreaCard_defaultConfig, "f").tap_action && ("navigation_path" in __classPrivateFieldGet(this, _AreaCard_defaultConfig, "f").tap_action)) { + __classPrivateFieldGet(this, _AreaCard_defaultConfig, "f").tap_action.navigation_path = area.area_id; + } + this.config = Object.assign(this.config, __classPrivateFieldGet(this, _AreaCard_defaultConfig, "f"), options); + } +} +_AreaCard_defaultConfig = new WeakMap(); + + + +/***/ }), + +/***/ "./src/cards/BinarySensorCard.ts": +/*!***************************************!*\ + !*** ./src/cards/BinarySensorCard.ts ***! + \***************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ BinarySensorCard: () => (/* binding */ BinarySensorCard) +/* harmony export */ }); +/* harmony import */ var _SensorCard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SensorCard */ "./src/cards/SensorCard.ts"); +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _BinarySensorCard_defaultConfig; + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Sensor Card Class + * + * Used to create a card for controlling an entity of the binary_sensor domain. + * + * @class + * @extends SensorCard + */ +class BinarySensorCard extends _SensorCard__WEBPACK_IMPORTED_MODULE_0__.SensorCard { + /** + * Class constructor. + * + * @param {EntityRegistryEntry} entity The hass entity to create a card for. + * @param {cards.EntityCardOptions} [options={}] Options for the card. + * @throws {Error} If the Helper module isn't initialized. + */ + constructor(entity, options = {}) { + super(entity); + /** + * Default configuration of the card. + * + * @type {EntityCardConfig} + * @private + */ + _BinarySensorCard_defaultConfig.set(this, { + type: "tile", + icon: undefined, + state_content: "last_changed", + vertical: false, + }); + this.config = Object.assign(this.config, __classPrivateFieldGet(this, _BinarySensorCard_defaultConfig, "f"), options); + } +} +_BinarySensorCard_defaultConfig = new WeakMap(); + + + +/***/ }), + +/***/ "./src/cards/CameraCard.ts": +/*!*********************************!*\ + !*** ./src/cards/CameraCard.ts ***! + \*********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ CameraCard: () => (/* binding */ CameraCard) +/* harmony export */ }); +/* harmony import */ var _AbstractCard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AbstractCard */ "./src/cards/AbstractCard.ts"); +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _CameraCard_defaultConfig; + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Camera Card Class + * + * Used to create a card for controlling an entity of the camera domain. + * + * @class + * @extends AbstractCard + */ +class CameraCard extends _AbstractCard__WEBPACK_IMPORTED_MODULE_0__.AbstractCard { + /** + * Class constructor. + * + * @param {EntityRegistryEntry} entity The hass entity to create a card for. + * @param {cards.PictureEntityCardOptions} [options={}] Options for the card. + * @throws {Error} If the Helper module isn't initialized. + */ + constructor(entity, options = {}) { + super(entity); + /** + * Default configuration of the card. + * + * @type {PictureEntityCardConfig} + * @private + */ + _CameraCard_defaultConfig.set(this, { + entity: "", + type: "picture-entity", + show_name: false, + show_state: false, + camera_view: "live", + }); + this.config = Object.assign(this.config, __classPrivateFieldGet(this, _CameraCard_defaultConfig, "f"), options); + } +} +_CameraCard_defaultConfig = new WeakMap(); + + + +/***/ }), + +/***/ "./src/cards/ClimateCard.ts": +/*!**********************************!*\ + !*** ./src/cards/ClimateCard.ts ***! + \**********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ ClimateCard: () => (/* binding */ ClimateCard) +/* harmony export */ }); +/* harmony import */ var _AbstractCard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AbstractCard */ "./src/cards/AbstractCard.ts"); +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _ClimateCard_defaultConfig; + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Climate Card Class + * + * Used to create a card for controlling an entity of the climate domain. + * + * @class + * @extends AbstractCard + */ +class ClimateCard extends _AbstractCard__WEBPACK_IMPORTED_MODULE_0__.AbstractCard { + /** + * Class constructor. + * + * @param {EntityRegistryEntry} entity The hass entity to create a card for. + * @param {cards.ClimateCardOptions} [options={}] Options for the card. + * @throws {Error} If the Helper module isn't initialized. + */ + constructor(entity, options = {}) { + super(entity); + /** + * Default configuration of the card. + * + * @type {ClimateCardConfig} + * @private + */ + _ClimateCard_defaultConfig.set(this, { + type: "tile", + icon: undefined, + vertical: false, + features: [ + { + type: "target-temperature" + }, + { + type: "climate-preset-modes", + style: "icons", + preset_modes: ["home", "eco", "comfort", "away", "boost"] + }, + { + type: "climate-hvac-modes", + hvac_modes: [ + "auto", + "heat_cool", + "heat", + "cool", + "dry", + "fan_only", + "off", + ] + }, + { + type: "climate-fan-modes", + style: "icons", + fan_modes: [ + "off", + "low", + "medium", + "high", + ] + } + ], + }); + this.config = Object.assign(this.config, __classPrivateFieldGet(this, _ClimateCard_defaultConfig, "f"), options); + } +} +_ClimateCard_defaultConfig = new WeakMap(); + + + +/***/ }), + +/***/ "./src/cards/ControllerCard.ts": +/*!*************************************!*\ + !*** ./src/cards/ControllerCard.ts ***! + \*************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ ControllerCard: () => (/* binding */ ControllerCard) +/* harmony export */ }); +/* harmony import */ var _Helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Helper */ "./src/Helper.ts"); +var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +}; +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _ControllerCard_target, _ControllerCard_defaultConfig; + +/** + * Controller Card class. + * + * Used for creating a Title Card with controls. + * + * @class + */ +class ControllerCard { + /** + * Class constructor. + * + * @param {HassServiceTarget} target The target to control the entities of. + * @param {cards.ControllerCardOptions} options Controller Card options. + */ + constructor(target, options = {}) { + /** + * @type {HassServiceTarget} The target to control the entities of. + * @private + */ + _ControllerCard_target.set(this, void 0); + /** + * Default configuration of the card. + * + * @type {cards.ControllerCardConfig} + * @private + */ + _ControllerCard_defaultConfig.set(this, { + type: "custom:mushroom-title-card", + showControls: true, + iconOn: "mdi:power-on", + iconOff: "mdi:power-off", + onService: "none", + offService: "none", + }); + __classPrivateFieldSet(this, _ControllerCard_target, target, "f"); + __classPrivateFieldSet(this, _ControllerCard_defaultConfig, { + ...__classPrivateFieldGet(this, _ControllerCard_defaultConfig, "f"), + ...options, + }, "f"); + } + /** + * Create a Controller card. + * + * @return {StackCardConfig} A Controller card. + */ + createCard() { + const cards = [ + { + type: "custom:mushroom-title-card", + title: __classPrivateFieldGet(this, _ControllerCard_defaultConfig, "f").title, + subtitle: __classPrivateFieldGet(this, _ControllerCard_defaultConfig, "f").subtitle, + }, + ]; + if (__classPrivateFieldGet(this, _ControllerCard_defaultConfig, "f").showControls || __classPrivateFieldGet(this, _ControllerCard_defaultConfig, "f").extraControls) { + const linusDevice = Array.isArray(__classPrivateFieldGet(this, _ControllerCard_target, "f").area_name) ? _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.magicAreasDevices[__classPrivateFieldGet(this, _ControllerCard_target, "f").area_name[0]] : undefined; + cards.push({ + type: "custom:mushroom-chips-card", + alignment: "end", + chips: [ + (__classPrivateFieldGet(this, _ControllerCard_defaultConfig, "f").showControls && + (__classPrivateFieldGet(this, _ControllerCard_target, "f").entity_id && typeof __classPrivateFieldGet(this, _ControllerCard_target, "f").entity_id === "string" ? + { + type: "template", + entity: __classPrivateFieldGet(this, _ControllerCard_target, "f").entity_id, + icon: `{{ '${__classPrivateFieldGet(this, _ControllerCard_defaultConfig, "f").iconOn}' if states(entity) == 'on' else '${__classPrivateFieldGet(this, _ControllerCard_defaultConfig, "f").iconOff}' }}`, + icon_color: `{{ 'amber' if states(entity) == 'on' else 'red' }}`, + tap_action: { + action: "toggle" + }, + hold_action: { + action: "more-info" + } + } : + { + type: "template", + entity: __classPrivateFieldGet(this, _ControllerCard_target, "f").entity_id, + icon: __classPrivateFieldGet(this, _ControllerCard_defaultConfig, "f").iconOff, + tap_action: { + action: "call-service", + service: __classPrivateFieldGet(this, _ControllerCard_defaultConfig, "f").offService, + target: __classPrivateFieldGet(this, _ControllerCard_target, "f"), + data: {}, + }, + })), + ...(__classPrivateFieldGet(this, _ControllerCard_defaultConfig, "f").extraControls && __classPrivateFieldGet(this, _ControllerCard_target, "f") ? __classPrivateFieldGet(this, _ControllerCard_defaultConfig, "f").extraControls(linusDevice) : []) + ], + card_mod: { + style: `ha-card {padding: var(--title-padding);}` + } + }); + } + return { + type: "horizontal-stack", + cards: cards, + }; + } +} +_ControllerCard_target = new WeakMap(), _ControllerCard_defaultConfig = new WeakMap(); + + + +/***/ }), + +/***/ "./src/cards/CoverCard.ts": +/*!********************************!*\ + !*** ./src/cards/CoverCard.ts ***! + \********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ CoverCard: () => (/* binding */ CoverCard) +/* harmony export */ }); +/* harmony import */ var _AbstractCard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AbstractCard */ "./src/cards/AbstractCard.ts"); +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _CoverCard_defaultConfig; + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Cover Card Class + * + * Used to create a card for controlling an entity of the cover domain. + * + * @class + * @extends AbstractCard + */ +class CoverCard extends _AbstractCard__WEBPACK_IMPORTED_MODULE_0__.AbstractCard { + /** + * Class constructor. + * + * @param {EntityRegistryEntry} entity The hass entity to create a card for. + * @param {cards.CoverCardOptions} [options={}] Options for the card. + * @throws {Error} If the Helper module isn't initialized. + */ + constructor(entity, options = {}) { + super(entity); + /** + * Default configuration of the card. + * + * @type {CoverCardConfig} + * @private + */ + _CoverCard_defaultConfig.set(this, { + type: "tile", + icon: undefined, + features: [ + { + type: "cover-open-close" + } + ] + }); + this.config = Object.assign(this.config, __classPrivateFieldGet(this, _CoverCard_defaultConfig, "f"), options); + } +} +_CoverCard_defaultConfig = new WeakMap(); + + + +/***/ }), + +/***/ "./src/cards/FanCard.ts": +/*!******************************!*\ + !*** ./src/cards/FanCard.ts ***! + \******************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ FanCard: () => (/* binding */ FanCard) +/* harmony export */ }); +/* harmony import */ var _AbstractCard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AbstractCard */ "./src/cards/AbstractCard.ts"); +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _FanCard_defaultConfig; + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Fan Card Class + * + * Used to create a card for controlling an entity of the fan domain. + * + * @class + * @extends AbstractCard + */ +class FanCard extends _AbstractCard__WEBPACK_IMPORTED_MODULE_0__.AbstractCard { + /** + * Class constructor. + * + * @param {EntityRegistryEntry} entity The hass entity to create a card for. + * @param {cards.FanCardOptions} [options={}] Options for the card. + * @throws {Error} If the Helper module isn't initialized. + */ + constructor(entity, options = {}) { + super(entity); + /** + * Default configuration of the card. + * + * @type {FanCardConfig} + * @private + */ + _FanCard_defaultConfig.set(this, { + type: "tile", + icon: undefined, + features: [ + { + type: "fan-speed" + } + ] + }); + this.config = Object.assign(this.config, __classPrivateFieldGet(this, _FanCard_defaultConfig, "f"), options); + } +} +_FanCard_defaultConfig = new WeakMap(); + + + +/***/ }), + +/***/ "./src/cards/HaAreaCard.ts": +/*!*********************************!*\ + !*** ./src/cards/HaAreaCard.ts ***! + \*********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AreaCard: () => (/* binding */ AreaCard) +/* harmony export */ }); +/* harmony import */ var _AbstractCard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AbstractCard */ "./src/cards/AbstractCard.ts"); +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _AreaCard_defaultConfig; + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * HA Area Card Class + * + * Used to create a card for an entity of the area domain using the built-in type 'area'. + * + * @class + * @extends AbstractCard + */ +class AreaCard extends _AbstractCard__WEBPACK_IMPORTED_MODULE_0__.AbstractCard { + /** + * Class constructor. + * + * @param {AreaRegistryEntry} area The area entity to create a card for. + * @param {cards.AreaCardOptions} [options={}] Options for the card. + * @throws {Error} If the Helper module isn't initialized. + */ + constructor(area, options = {}) { + super(area); + /** + * Default configuration of the card. + * + * @type {AreaCardConfig} + * @private + */ + _AreaCard_defaultConfig.set(this, { + type: "area", + area: "", + }); + // Initialize the default configuration. + __classPrivateFieldGet(this, _AreaCard_defaultConfig, "f").area = area.area_id; + __classPrivateFieldGet(this, _AreaCard_defaultConfig, "f").navigation_path = __classPrivateFieldGet(this, _AreaCard_defaultConfig, "f").area; + // Enforce the card type. + delete options.type; + this.config = Object.assign(this.config, __classPrivateFieldGet(this, _AreaCard_defaultConfig, "f"), options); + } +} +_AreaCard_defaultConfig = new WeakMap(); + + + +/***/ }), + +/***/ "./src/cards/LightCard.ts": +/*!********************************!*\ + !*** ./src/cards/LightCard.ts ***! + \********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ LightCard: () => (/* binding */ LightCard) +/* harmony export */ }); +/* harmony import */ var _AbstractCard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AbstractCard */ "./src/cards/AbstractCard.ts"); +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _LightCard_defaultConfig; + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Light Card Class + * + * Used to create a card for controlling an entity of the light domain. + * + * @class + * @extends AbstractCard + */ +class LightCard extends _AbstractCard__WEBPACK_IMPORTED_MODULE_0__.AbstractCard { + /** + * Class constructor. + * + * @param {EntityRegistryEntry} entity The hass entity to create a card for. + * @param {cards.LightCardOptions} [options={}] Options for the card. + * @throws {Error} If the Helper module isn't initialized. + */ + constructor(entity, options = {}) { + super(entity); + /** + * Default configuration of the card. + * + * @type {LightCardConfig} + * @private + */ + _LightCard_defaultConfig.set(this, { + type: "tile", + icon: undefined, + vertical: false, + }); + this.config = Object.assign(this.config, __classPrivateFieldGet(this, _LightCard_defaultConfig, "f"), options); + } +} +_LightCard_defaultConfig = new WeakMap(); + + + +/***/ }), + +/***/ "./src/cards/LockCard.ts": +/*!*******************************!*\ + !*** ./src/cards/LockCard.ts ***! + \*******************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ LockCard: () => (/* binding */ LockCard) +/* harmony export */ }); +/* harmony import */ var _AbstractCard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AbstractCard */ "./src/cards/AbstractCard.ts"); +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _LockCard_defaultConfig; + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Lock Card Class + * + * Used to create a card for controlling an entity of the lock domain. + * + * @class + * @extends AbstractCard + */ +class LockCard extends _AbstractCard__WEBPACK_IMPORTED_MODULE_0__.AbstractCard { + /** + * Class constructor. + * + * @param {EntityRegistryEntry} entity The hass entity to create a card for. + * @param {cards.LockCardOptions} [options={}] Options for the card. + * @throws {Error} If the Helper module isn't initialized. + */ + constructor(entity, options = {}) { + super(entity); + /** + * Default configuration of the card. + * + * @type {LockCardConfig} + * @private + */ + _LockCard_defaultConfig.set(this, { + type: "custom:mushroom-lock-card", + icon: undefined, + }); + this.config = Object.assign(this.config, __classPrivateFieldGet(this, _LockCard_defaultConfig, "f"), options); + } +} +_LockCard_defaultConfig = new WeakMap(); + + + +/***/ }), + +/***/ "./src/cards/MainAreaCard.ts": +/*!***********************************!*\ + !*** ./src/cards/MainAreaCard.ts ***! + \***********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ MainAreaCard: () => (/* binding */ MainAreaCard) +/* harmony export */ }); +/* harmony import */ var _AbstractCard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AbstractCard */ "./src/cards/AbstractCard.ts"); +/* harmony import */ var _Helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Helper */ "./src/Helper.ts"); +/* harmony import */ var _chips_LinusAggregateChip__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../chips/LinusAggregateChip */ "./src/chips/LinusAggregateChip.ts"); +/* harmony import */ var _chips_AreaStateChip__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../chips/AreaStateChip */ "./src/chips/AreaStateChip.ts"); +/* harmony import */ var _chips_AreaScenesChips__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../chips/AreaScenesChips */ "./src/chips/AreaScenesChips.ts"); + + + + + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Area Card Class + * + * Used to create a card for an entity of the area domain. + * + * @class + * @extends AbstractCard + */ +class MainAreaCard extends _AbstractCard__WEBPACK_IMPORTED_MODULE_0__.AbstractCard { + getDefaultConfig(area) { + const device = _Helper__WEBPACK_IMPORTED_MODULE_1__.Helper.magicAreasDevices[area.name]; + const { area_state, aggregate_temperature, aggregate_humidity, aggregate_illuminance, aggregate_window, aggregate_door, aggregate_health, aggregate_cover, } = device.entities; + return { + type: "custom:layout-card", + layout_type: "custom:masonry-layout", + card_mod: {}, + cards: [ + { + type: "custom:mod-card", + style: ` + ha-card { + position: relative; + } + .card-content { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + } + `, + card: { + type: "vertical-stack", + cards: [ + { + type: "custom:mushroom-chips-card", + alignment: "end", + chips: [ + aggregate_temperature?.entity_id && { + type: "conditional", + conditions: [ + { + entity: aggregate_temperature?.entity_id, + state_not: "unavailable" + } + ], + chip: new _chips_LinusAggregateChip__WEBPACK_IMPORTED_MODULE_2__.LinusAggregateChip(device, "temperature", true, true).getChip(), + }, + aggregate_humidity?.entity_id && { + type: "conditional", + conditions: [ + { + entity: aggregate_humidity?.entity_id, + state_not: "unavailable" + } + ], + chip: new _chips_LinusAggregateChip__WEBPACK_IMPORTED_MODULE_2__.LinusAggregateChip(device, "humidity", true, true).getChip(), + }, + aggregate_illuminance?.entity_id && { + type: "conditional", + conditions: [ + { + entity: aggregate_illuminance?.entity_id, + state_not: "unavailable" + } + ], + chip: new _chips_LinusAggregateChip__WEBPACK_IMPORTED_MODULE_2__.LinusAggregateChip(device, "illuminance", true, true).getChip(), + }, + ].filter(Boolean), + card_mod: { + style: ` + ha-card { + position: absolute; + top: 24px; + left: 0px; + right: 8px; + z-index: 2; + } + ` + } + }, + { + type: "custom:mushroom-chips-card", + alignment: "end", + chips: [ + aggregate_window?.entity_id && { + type: "conditional", + conditions: [ + { + entity: aggregate_window?.entity_id, + state_not: "unavailable" + } + ], + chip: new _chips_LinusAggregateChip__WEBPACK_IMPORTED_MODULE_2__.LinusAggregateChip(device, "window", true, true).getChip(), + }, + aggregate_door?.entity_id && { + type: "conditional", + conditions: [ + { + entity: aggregate_door?.entity_id, + state_not: "unavailable" + } + ], + chip: new _chips_LinusAggregateChip__WEBPACK_IMPORTED_MODULE_2__.LinusAggregateChip(device, "door", true, true).getChip(), + }, + aggregate_health?.entity_id && { + type: "conditional", + conditions: [ + { + entity: aggregate_health?.entity_id, + state_not: "unavailable" + } + ], + chip: new _chips_LinusAggregateChip__WEBPACK_IMPORTED_MODULE_2__.LinusAggregateChip(device, "health", true, true).getChip(), + }, + aggregate_cover?.entity_id && { + type: "conditional", + conditions: [ + { + entity: aggregate_cover?.entity_id, + state_not: "unavailable" + } + ], + chip: new _chips_LinusAggregateChip__WEBPACK_IMPORTED_MODULE_2__.LinusAggregateChip(device, "cover", true, true).getChip(), + }, + area_state?.entity_id && { + type: "conditional", + conditions: [ + { + entity: area_state?.entity_id, + state_not: "unavailable" + } + ], + chip: new _chips_AreaStateChip__WEBPACK_IMPORTED_MODULE_3__.AreaStateChip(device, true).getChip(), + }, + ].filter(Boolean), + card_mod: { + style: ` + ha-card { + position: absolute; + bottom: 8px; + left: 0px; + right: 8px; + z-index: 2; + } + ` + } + }, + { + type: "area", + area: area.area_id, + show_camera: true, + alert_classes: [], + sensor_classes: [], + aspect_ratio: "16:9", + card_mod: { + style: ` + ha-card { + position: relative; + z-index: 1; + } + .sensors { + display: none; + } + .buttons { + display: none; + } + ` + } + } + ] + } + }, + (device.entities.all_lights && device.entities.all_lights.entity_id !== "unavailable" ? { + type: "custom:mushroom-chips-card", + alignment: "center", + chips: new _chips_AreaScenesChips__WEBPACK_IMPORTED_MODULE_4__.AreaScenesChips(device, area).getChips() + } : undefined) + ].filter(Boolean) + }; + } + /** + * Class constructor. + * + * @param {AreaRegistryEntry} area The area entity to create a card for. + * @param {cards.TemplateCardOptions} [options={}] Options for the card. + * + * @throws {Error} If the Helper module isn't initialized. + */ + constructor(area, options = {}) { + super(area); + // Don't override the default card type if default is set in the strategy options. + if (options.type === "LinusMainAreaCard") { + delete options.type; + } + const defaultConfig = this.getDefaultConfig(area); + this.config = Object.assign(this.config, defaultConfig, options); + } +} + + + +/***/ }), + +/***/ "./src/cards/MediaPlayerCard.ts": +/*!**************************************!*\ + !*** ./src/cards/MediaPlayerCard.ts ***! + \**************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ MediaPlayerCard: () => (/* binding */ MediaPlayerCard) +/* harmony export */ }); +/* harmony import */ var _AbstractCard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AbstractCard */ "./src/cards/AbstractCard.ts"); +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _MediaPlayerCard_defaultConfig; + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Mediaplayer Card Class + * + * Used to create a card for controlling an entity of the media_player domain. + * + * @class + * @extends AbstractCard + */ +class MediaPlayerCard extends _AbstractCard__WEBPACK_IMPORTED_MODULE_0__.AbstractCard { + /** + * Class constructor. + * + * @param {EntityRegistryEntry} entity The hass entity to create a card for. + * @param {cards.MediaPlayerCardOptions} [options={}] Options for the card. + * @throws {Error} If the Helper module isn't initialized. + */ + constructor(entity, options = {}) { + super(entity); + /** + * Default configuration of the card. + * + * @type {MediaPlayerCardConfig} + * @private + */ + _MediaPlayerCard_defaultConfig.set(this, { + type: "custom:mushroom-media-player-card", + use_media_info: true, + media_controls: [ + "on_off", + "play_pause_stop", + ], + show_volume_level: true, + volume_controls: [ + "volume_mute", + "volume_set", + "volume_buttons", + ], + }); + this.config = Object.assign(this.config, __classPrivateFieldGet(this, _MediaPlayerCard_defaultConfig, "f"), options); + } +} +_MediaPlayerCard_defaultConfig = new WeakMap(); + + + +/***/ }), + +/***/ "./src/cards/MiscellaneousCard.ts": +/*!****************************************!*\ + !*** ./src/cards/MiscellaneousCard.ts ***! + \****************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ MiscellaneousCard: () => (/* binding */ MiscellaneousCard) +/* harmony export */ }); +/* harmony import */ var _AbstractCard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AbstractCard */ "./src/cards/AbstractCard.ts"); +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _MiscellaneousCard_defaultConfig; + +/** + * Miscellaneous Card Class + * + * Used to create a card an entity of any domain. + * + * @class + * @extends AbstractCard + */ +class MiscellaneousCard extends _AbstractCard__WEBPACK_IMPORTED_MODULE_0__.AbstractCard { + /** + * Class constructor. + * + * @param {EntityRegistryEntry} entity The hass entity to create a card for. + * @param {cards.EntityCardOptions} [options={}] Options for the card. + * @throws {Error} If the Helper module isn't initialized. + */ + constructor(entity, options = {}) { + super(entity); + /** + * Default configuration of the card. + * + * @type {EntityCardConfig} + * @private + */ + _MiscellaneousCard_defaultConfig.set(this, { + type: "tile", + icon: undefined, + vertical: false, + }); + this.config = Object.assign(this.config, __classPrivateFieldGet(this, _MiscellaneousCard_defaultConfig, "f"), options); + } +} +_MiscellaneousCard_defaultConfig = new WeakMap(); + + + +/***/ }), + +/***/ "./src/cards/NumberCard.ts": +/*!*********************************!*\ + !*** ./src/cards/NumberCard.ts ***! + \*********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ NumberCard: () => (/* binding */ NumberCard) +/* harmony export */ }); +/* harmony import */ var _AbstractCard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AbstractCard */ "./src/cards/AbstractCard.ts"); +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _NumberCard_defaultConfig; + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported +/** + * Number Card Class + * + * Used to create a card for controlling an entity of the number domain. + * + * @class + * @extends AbstractCard + */ +class NumberCard extends _AbstractCard__WEBPACK_IMPORTED_MODULE_0__.AbstractCard { + /** + * Class constructor. + * + * @param {EntityRegistryEntry} entity The hass entity to create a card for. + * @param {cards.NumberCardOptions} [options={}] Options for the card. + * @throws {Error} If the Helper module isn't initialized. + */ + constructor(entity, options = {}) { + super(entity); + /** + * Default configuration of the card. + * + * @type {NumberCardConfig} + * @private + */ + _NumberCard_defaultConfig.set(this, { + type: "custom:mushroom-number-card", + icon: undefined, + }); + this.config = Object.assign(this.config, __classPrivateFieldGet(this, _NumberCard_defaultConfig, "f"), options); + } +} +_NumberCard_defaultConfig = new WeakMap(); + + + +/***/ }), + +/***/ "./src/cards/PersonCard.ts": +/*!*********************************!*\ + !*** ./src/cards/PersonCard.ts ***! + \*********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ PersonCard: () => (/* binding */ PersonCard) +/* harmony export */ }); +/* harmony import */ var _AbstractCard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AbstractCard */ "./src/cards/AbstractCard.ts"); +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _PersonCard_defaultConfig; + +/** + * Person Card Class + * + * Used to create a card for an entity of the Person domain. + * + * @class + * @extends AbstractCard + */ +class PersonCard extends _AbstractCard__WEBPACK_IMPORTED_MODULE_0__.AbstractCard { + /** + * Class constructor. + * + * @param {EntityRegistryEntry} entity The hass entity to create a card for. + * @param {cards.PersonCardOptions} [options={}] Options for the card. + * @throws {Error} If the Helper module isn't initialized. + */ + constructor(entity, options = {}) { + super(entity); + /** + * Default configuration of the card. + * + * @type {PersonCardConfig} + * @private + */ + _PersonCard_defaultConfig.set(this, { + type: "custom:mushroom-person-card", + layout: "vertical", + primary_info: "none", + secondary_info: "none", + icon_type: "entity-picture", + }); + this.config = Object.assign(this.config, __classPrivateFieldGet(this, _PersonCard_defaultConfig, "f"), options); + } +} +_PersonCard_defaultConfig = new WeakMap(); + + + +/***/ }), + +/***/ "./src/cards/SceneCard.ts": +/*!********************************!*\ + !*** ./src/cards/SceneCard.ts ***! + \********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ SceneCard: () => (/* binding */ SceneCard) +/* harmony export */ }); +/* harmony import */ var _AbstractCard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AbstractCard */ "./src/cards/AbstractCard.ts"); +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _SceneCard_defaultConfig; + +/** + * Scene Card Class + * + * Used to create a card for an entity of the Scene domain. + * + * @class + * @extends AbstractCard + */ +class SceneCard extends _AbstractCard__WEBPACK_IMPORTED_MODULE_0__.AbstractCard { + /** + * Class constructor. + * + * @param {EntityRegistryEntry} entity The hass entity to create a card for. + * @param {cards.SceneCardOptions} [options={}] Options for the card. + * @throws {Error} If the Helper module isn't initialized. + */ + constructor(entity, options = {}) { + super(entity); + /** + * Default configuration of the card. + * + * @type {SceneCardConfig} + * @private + */ + _SceneCard_defaultConfig.set(this, { + type: "tile", + icon: undefined, + vertical: false, + icon_type: "entity-picture", + }); + this.config = Object.assign(this.config, __classPrivateFieldGet(this, _SceneCard_defaultConfig, "f"), options); + } +} +_SceneCard_defaultConfig = new WeakMap(); + + + +/***/ }), + +/***/ "./src/cards/SensorCard.ts": +/*!*********************************!*\ + !*** ./src/cards/SensorCard.ts ***! + \*********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ SensorCard: () => (/* binding */ SensorCard) +/* harmony export */ }); +/* harmony import */ var _AbstractCard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AbstractCard */ "./src/cards/AbstractCard.ts"); +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _SensorCard_defaultConfig; + +/** + * Sensor Card Class + * + * Used to create a card for controlling an entity of the sensor domain. + * + * @class + * @extends AbstractCard + */ +class SensorCard extends _AbstractCard__WEBPACK_IMPORTED_MODULE_0__.AbstractCard { + /** + * Class constructor. + * + * @param {EntityRegistryEntry} entity The hass entity to create a card for. + * @param {cards.EntityCardOptions} [options={}] Options for the card. + * @throws {Error} If the Helper module isn't initialized. + */ + constructor(entity, options = {}) { + super(entity); + /** + * Default configuration of the card. + * + * @type {EntityCardConfig} + * @private + */ + _SensorCard_defaultConfig.set(this, { + type: "custom:mushroom-entity-card", + icon: "mdi:information", + animate: true, + line_color: "green", + }); + this.config = Object.assign(this.config, __classPrivateFieldGet(this, _SensorCard_defaultConfig, "f"), options); + } +} +_SensorCard_defaultConfig = new WeakMap(); + + + +/***/ }), + +/***/ "./src/cards/SwipeCard.ts": +/*!********************************!*\ + !*** ./src/cards/SwipeCard.ts ***! + \********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ SwipeCard: () => (/* binding */ SwipeCard) +/* harmony export */ }); +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Swipe Card Class + * + * Used to create a card for controlling an entity of the light domain. + * + * @class + * @extends AbstractCard + */ +class SwipeCard { + /** + * Class constructor. + * + * @param {AbstractCard[]} cards The hass entity to create a card for. + * @param {SwiperOptions} [options={}] Options for the card. + * @throws {Error} If the Helper module isn't initialized. + */ + constructor(cards, options) { + /** + * Configuration of the card. + * + * @type {SwipeCardConfig} + */ + this.config = { + type: "custom:swipe-card", + start_card: 1, + parameters: { + centeredSlides: false, + followFinger: true, + spaceBetween: 16, + grabCursor: true, + }, + cards: [], + }; + this.config.cards = cards; + const multipleSlicesPerView = 2.2; + const slidesPerView = cards.length > 2 ? multipleSlicesPerView : cards.length ?? 1; + this.config.parameters = { ...this.config.parameters, slidesPerView, ...options }; + } + /** + * Get a card. + * + * @return {SwipeCardConfig} A card object. + */ + getCard() { + return { + ...this.config, + }; + } +} + + + +/***/ }), + +/***/ "./src/cards/SwitchCard.ts": +/*!*********************************!*\ + !*** ./src/cards/SwitchCard.ts ***! + \*********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ SwitchCard: () => (/* binding */ SwitchCard) +/* harmony export */ }); +/* harmony import */ var _AbstractCard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AbstractCard */ "./src/cards/AbstractCard.ts"); +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _SwitchCard_defaultConfig; + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Switch Card Class + * + * Used to create a card for controlling an entity of the switch domain. + * + * @class + * @extends AbstractCard + */ +class SwitchCard extends _AbstractCard__WEBPACK_IMPORTED_MODULE_0__.AbstractCard { + /** + * Class constructor. + * + * @param {EntityRegistryEntry} entity The hass entity to create a card for. + * @param {cards.EntityCardOptions} [options={}] Options for the card. + * @throws {Error} If the Helper module isn't initialized. + */ + constructor(entity, options = {}) { + super(entity); + /** + * Default configuration of the card. + * + * @type {EntityCardConfig} + * @private + */ + _SwitchCard_defaultConfig.set(this, { + type: "tile", + icon: undefined, + vertical: false, + tap_action: { + action: "toggle", + }, + }); + this.config = Object.assign(this.config, __classPrivateFieldGet(this, _SwitchCard_defaultConfig, "f"), options); + } +} +_SwitchCard_defaultConfig = new WeakMap(); + + + +/***/ }), + +/***/ "./src/cards/VacuumCard.ts": +/*!*********************************!*\ + !*** ./src/cards/VacuumCard.ts ***! + \*********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ VacuumCard: () => (/* binding */ VacuumCard) +/* harmony export */ }); +/* harmony import */ var _AbstractCard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AbstractCard */ "./src/cards/AbstractCard.ts"); +/* harmony import */ var _types_lovelace_mushroom_cards_vacuum_card_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../types/lovelace-mushroom/cards/vacuum-card-config */ "./src/types/lovelace-mushroom/cards/vacuum-card-config.ts"); +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _VacuumCard_defaultConfig; + + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Vacuum Card Class + * + * Used to create a card for controlling an entity of the vacuum domain. + * + * @class + * @extends AbstractCard + */ +class VacuumCard extends _AbstractCard__WEBPACK_IMPORTED_MODULE_0__.AbstractCard { + /** + * Class constructor. + * + * @param {EntityRegistryEntry} entity The hass entity to create a card for. + * @param {cards.VacuumCardOptions} [options={}] Options for the card. + * @throws {Error} If the Helper module isn't initialized. + */ + constructor(entity, options = {}) { + super(entity); + /** + * Default configuration of the card. + * + * @type {VacuumCardConfig} + * @private + */ + _VacuumCard_defaultConfig.set(this, { + type: "custom:mushroom-vacuum-card", + icon: undefined, + icon_animation: true, + commands: [..._types_lovelace_mushroom_cards_vacuum_card_config__WEBPACK_IMPORTED_MODULE_1__.VACUUM_COMMANDS], + tap_action: { + action: "more-info", + } + }); + this.config = Object.assign(this.config, __classPrivateFieldGet(this, _VacuumCard_defaultConfig, "f"), options); + } +} +_VacuumCard_defaultConfig = new WeakMap(); + + + +/***/ }), + +/***/ "./src/chips/AbstractChip.ts": +/*!***********************************!*\ + !*** ./src/chips/AbstractChip.ts ***! + \***********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AbstractChip: () => (/* binding */ AbstractChip) +/* harmony export */ }); +/* harmony import */ var _Helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Helper */ "./src/Helper.ts"); +/* harmony import */ var _types_strategy_generic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../types/strategy/generic */ "./src/types/strategy/generic.ts"); + + +var isCallServiceActionConfig = _types_strategy_generic__WEBPACK_IMPORTED_MODULE_1__.generic.isCallServiceActionConfig; +/** + * Abstract Chip class. + * + * To create a new chip, extend this one. + * + * @class + * @abstract + */ +class AbstractChip { + /** + * Class Constructor. + */ + constructor() { + /** + * Configuration of the chip. + * + * @type {LovelaceChipConfig} + */ + this.config = { + type: "template" + }; + if (!_Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.isInitialized()) { + throw new Error("The Helper module must be initialized before using this one."); + } + } + // noinspection JSUnusedGlobalSymbols Method is called on dymanically imported classes. + /** + * Get the chip. + * + * @returns {LovelaceChipConfig} A chip. + */ + getChip() { + return this.config; + } + /** + * Set the target to switch. + * + * @param {HassServiceTarget} target Target to switch. + */ + setTapActionTarget(target) { + if ("tap_action" in this.config && isCallServiceActionConfig(this.config.tap_action)) { + this.config.tap_action.target = target; + return; + } + if (_Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.debug) { + console.warn(this.constructor.name + + " - Target not set: Invalid target or tap action."); + } + } +} + + + +/***/ }), + +/***/ "./src/chips/AlarmChip.ts": +/*!********************************!*\ + !*** ./src/chips/AlarmChip.ts ***! + \********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AlarmChip: () => (/* binding */ AlarmChip) +/* harmony export */ }); +/* harmony import */ var _AbstractChip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AbstractChip */ "./src/chips/AbstractChip.ts"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ "./src/utils.ts"); +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +}; +var _AlarmChip_defaultConfig; + + +// noinspection JSUnusedGlobalSymbols False positive. +/** + * Alarm Chip class. + * + * Used to create a chip for showing the alarm. + */ +class AlarmChip extends _AbstractChip__WEBPACK_IMPORTED_MODULE_0__.AbstractChip { + /** + * Class Constructor. + * + * @param {string} entityId Id of a alarm entity. + * @param {chips.AlarmChipOptions} options Alarm Chip options. + */ + constructor(entityId, options = {}) { + super(); + /** + * Default configuration of the chip. + * + * @private + * @readonly + */ + _AlarmChip_defaultConfig.set(this, { + type: "alarm-control-panel", + tap_action: (0,_utils__WEBPACK_IMPORTED_MODULE_1__.navigateTo)('security') + }); + __classPrivateFieldSet(this, _AlarmChip_defaultConfig, { + ...__classPrivateFieldGet(this, _AlarmChip_defaultConfig, "f"), + ...{ entity: entityId }, + ...options, + }, "f"); + this.config = Object.assign(this.config, __classPrivateFieldGet(this, _AlarmChip_defaultConfig, "f"), options); + } +} +_AlarmChip_defaultConfig = new WeakMap(); + + + +/***/ }), + +/***/ "./src/chips/AreaScenesChips.ts": +/*!**************************************!*\ + !*** ./src/chips/AreaScenesChips.ts ***! + \**************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AreaScenesChips: () => (/* binding */ AreaScenesChips) +/* harmony export */ }); +/* harmony import */ var _Helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Helper */ "./src/Helper.ts"); +/* harmony import */ var _variables__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../variables */ "./src/variables.ts"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils */ "./src/utils.ts"); + + + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Area selects Chips class. + * + * Used to create a chip to indicate climate level. + */ +class AreaScenesChips { + /** + * Default configuration of the chip. + * + * @type {ConditionalChipConfig} + * + */ + getDefaultConfig(device, area) { + const selects = _variables__WEBPACK_IMPORTED_MODULE_1__.todOrder.map(tod => _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.getEntityState(device.entities[`scene_${tod}`]?.entity_id)).filter(Boolean); + const chips = []; + if (selects.find(scene => scene?.state == "Adaptive lighting")) { + chips.push({ + type: "template", + icon: "mdi:theme-light-dark", + content: "AD", + tap_action: { + action: "call-service", + service: `${_variables__WEBPACK_IMPORTED_MODULE_1__.DOMAIN}.area_light_adapt`, + data: { + area: (0,_utils__WEBPACK_IMPORTED_MODULE_2__.slugify)(device.name), + } + }, + }); + } + selects.forEach((scene, index) => { + if (scene?.state === "Scène instantanée") { + const entity_id = `scene.${(0,_utils__WEBPACK_IMPORTED_MODULE_2__.slugify)(device.name)}_${_variables__WEBPACK_IMPORTED_MODULE_1__.todOrder[index]}_snapshot_scene`; + chips.push({ + type: "template", + entity: scene?.entity_id, + icon: scene?.attributes.icon, + content: _variables__WEBPACK_IMPORTED_MODULE_1__.todOrder[index], + tap_action: { + action: "call-service", + service: "scene.turn_on", + data: { entity_id } + }, + hold_action: { + action: "more-info" + } + }); + } + else if (scene?.state !== "Adaptive lighting") { + const sceneEntity_id = _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.getStateEntities(area, "scene").find(s => s.attributes.friendly_name === scene?.state)?.entity_id; + chips.push({ + type: "template", + entity: scene?.entity_id, + icon: scene?.attributes.icon, + content: _variables__WEBPACK_IMPORTED_MODULE_1__.todOrder[index], + tap_action: { + action: "call-service", + service: "scene.turn_on", + data: { + entity_id: sceneEntity_id, + } + }, + hold_action: { + action: "more-info" + } + }); + } + }); + return chips; + } + /** + * Class Constructor. + * + * @param {chips.TemplateChipOptions} options The chip options. + */ + constructor(device, area) { + /** + * Configuration of the chip. + * + * @type {LovelaceChipConfig[]} + */ + this.config = []; + this.config = this.getDefaultConfig(device, area); + } + // noinspection JSUnusedGlobalSymbols Method is called on dymanically imported classes. + /** + * Get the chip. + * + * @returns {LovelaceChipConfig} A chip. + */ + getChips() { + return this.config; + } +} + + + +/***/ }), + +/***/ "./src/chips/AreaStateChip.ts": +/*!************************************!*\ + !*** ./src/chips/AreaStateChip.ts ***! + \************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AreaStateChip: () => (/* binding */ AreaStateChip) +/* harmony export */ }); +/* harmony import */ var _popups_AreaInformationsPopup__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../popups/AreaInformationsPopup */ "./src/popups/AreaInformationsPopup.ts"); +/* harmony import */ var _variables__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../variables */ "./src/variables.ts"); +/* harmony import */ var _AbstractChip__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AbstractChip */ "./src/chips/AbstractChip.ts"); + + + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Area state Chip class. + * + * Used to create a chip to indicate area state. + */ +class AreaStateChip extends _AbstractChip__WEBPACK_IMPORTED_MODULE_2__.AbstractChip { + /** + * Default configuration of the chip. + * + * @type {ConditionalChipConfig} + * + */ + getDefaultConfig(device, showContent = false) { + const { area_state, presence_hold, all_media_players, aggregate_motion } = device.entities; + return { + "type": "template", + "entity": area_state?.entity_id, + "icon_color": ` + {% set presence_hold = states('${presence_hold?.entity_id}')%} + {% set motion = states('${aggregate_motion?.entity_id}')%} + {% set media_player = states('${all_media_players?.entity_id}')%} + {% set bl = state_attr('${area_state?.entity_id}', 'states')%} + {% if motion == 'on' %} + red + {% elif media_player in ['on', 'playing'] %} + blue + {% elif presence_hold == 'on' %} + red + {% elif 'sleep' in bl %} + blue + {% elif 'extended' in bl %} + orange + {% elif 'occupied' in bl %} + grey + {% else %} + transparent + {% endif %} + `, + "icon": ` + {% set presence_hold = states('${presence_hold?.entity_id}')%} + {% set motion = states('${aggregate_motion?.entity_id}')%} + {% set media_player = states('${all_media_players?.entity_id}')%} + {% set bl = state_attr('${area_state?.entity_id}', 'states')%} + {% if motion == 'on' %} + ${_variables__WEBPACK_IMPORTED_MODULE_1__.DOMAIN_ICONS.motion} + {% elif media_player in ['on', 'playing'] %} + ${_variables__WEBPACK_IMPORTED_MODULE_1__.DOMAIN_ICONS.media_player} + {% elif presence_hold == 'on' %} + ${_variables__WEBPACK_IMPORTED_MODULE_1__.DEVICE_ICONS.presence_hold} + {% elif 'sleep' in bl %} + ${_variables__WEBPACK_IMPORTED_MODULE_1__.AREA_STATE_ICONS.sleep} + {% elif 'extended' in bl %} + ${_variables__WEBPACK_IMPORTED_MODULE_1__.AREA_STATE_ICONS.extended} + {% elif 'occupied' in bl %} + ${_variables__WEBPACK_IMPORTED_MODULE_1__.AREA_STATE_ICONS.occupied} + {% else %} + ${_variables__WEBPACK_IMPORTED_MODULE_1__.AREA_STATE_ICONS.clear} + {% endif %}`, + "content": showContent ? ` + {% set presence_hold = states('${presence_hold?.entity_id}')%} + {% set bl = state_attr('${area_state?.entity_id}', 'states')%} + {% if presence_hold == 'on' %} + presence_hold + {% elif 'sleep' in bl %} + sleep + {% elif 'extended' in bl %} + extended + {% elif 'occupied' in bl %} + occupied + {% else %} + clear + {% endif %}` : "", + "tap_action": new _popups_AreaInformationsPopup__WEBPACK_IMPORTED_MODULE_0__.AreaInformations(device, true).getPopup() + }; + } + /** + * Class Constructor. + * + * @param {chips.TemplateChipOptions} options The chip options. + */ + constructor(device, showContent = false) { + super(); + const defaultConfig = this.getDefaultConfig(device, showContent); + this.config = Object.assign(this.config, defaultConfig); + } +} + + + +/***/ }), + +/***/ "./src/chips/ClimateChip.ts": +/*!**********************************!*\ + !*** ./src/chips/ClimateChip.ts ***! + \**********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ ClimateChip: () => (/* binding */ ClimateChip) +/* harmony export */ }); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils */ "./src/utils.ts"); +/* harmony import */ var _variables__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../variables */ "./src/variables.ts"); +/* harmony import */ var _AbstractChip__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AbstractChip */ "./src/chips/AbstractChip.ts"); + + + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Climate Chip class. + * + * Used to create a chip to indicate how many climates are operating. + */ +class ClimateChip extends _AbstractChip__WEBPACK_IMPORTED_MODULE_2__.AbstractChip { + /** + * Default configuration of the chip. + * + * @type {ConditionalChipConfig} + * + */ + getDefaultConfig(entity_id) { + const icon = _variables__WEBPACK_IMPORTED_MODULE_1__.DOMAIN_STATE_ICONS.climate; + return { + type: "conditional", + conditions: [ + { + entity: entity_id, + state_not: "unavailable" + } + ], + chip: { + type: "template", + entity: entity_id, + icon_color: "{{ 'red' if is_state(entity, 'on') else 'grey' }}", + icon: icon.on, + content: `{{ expand(states.${entity_id}.attributes.entity_id is defined and states.${entity_id}.attributes.entity_id) | selectattr( 'state', 'eq', 'on') | list | count }}`, + tap_action: (0,_utils__WEBPACK_IMPORTED_MODULE_0__.navigateTo)('climate'), + }, + }; + } + /** + * Class Constructor. + * + * @param {chips.TemplateChipOptions} options The chip options. + */ + constructor(device, options = {}) { + super(); + if (!device.entities.climate_group?.entity_id) { + throw new Error(`No aggregate motion entity found for device: ${device.name}`); + } + const defaultConfig = this.getDefaultConfig(device.entities.climate_group.entity_id); + this.config = Object.assign(this.config, defaultConfig); + } +} + + + +/***/ }), + +/***/ "./src/chips/CoverChip.ts": +/*!********************************!*\ + !*** ./src/chips/CoverChip.ts ***! + \********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ CoverChip: () => (/* binding */ CoverChip) +/* harmony export */ }); +/* harmony import */ var _Helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Helper */ "./src/Helper.ts"); +/* harmony import */ var _AbstractChip__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AbstractChip */ "./src/chips/AbstractChip.ts"); +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _CoverChip_defaultConfig; + + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Cover Chip class. + * + * Used to create a chip to indicate how many covers aren't closed. + */ +class CoverChip extends _AbstractChip__WEBPACK_IMPORTED_MODULE_1__.AbstractChip { + /** + * Class Constructor. + * + * @param {chips.TemplateChipOptions} options The chip options. + */ + constructor(options = {}) { + super(); + /** + * Default configuration of the chip. + * + * @type {TemplateChipConfig} + * + * @readonly + * @private + */ + _CoverChip_defaultConfig.set(this, { + type: "template", + icon: "mdi:window-open", + icon_color: "cyan", + content: _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.getCountTemplate("cover", "eq", "open"), + tap_action: { + action: "navigate", + navigation_path: "covers", + }, + hold_action: { + action: "navigate", + navigation_path: "covers", + }, + }); + this.config = Object.assign(this.config, __classPrivateFieldGet(this, _CoverChip_defaultConfig, "f"), options); + } +} +_CoverChip_defaultConfig = new WeakMap(); + + + +/***/ }), + +/***/ "./src/chips/DoorChip.ts": +/*!*******************************!*\ + !*** ./src/chips/DoorChip.ts ***! + \*******************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ DoorChip: () => (/* binding */ DoorChip) +/* harmony export */ }); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils */ "./src/utils.ts"); +/* harmony import */ var _variables__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../variables */ "./src/variables.ts"); +/* harmony import */ var _AbstractChip__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AbstractChip */ "./src/chips/AbstractChip.ts"); + + + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Door Chip class. + * + * Used to create a chip to indicate how many doors are on and to turn all off. + */ +class DoorChip extends _AbstractChip__WEBPACK_IMPORTED_MODULE_2__.AbstractChip { + /** + * Default configuration of the chip. + * + * @type {ConditionalChipConfig} + * + */ + getDefaultConfig(entity_id) { + const icon = _variables__WEBPACK_IMPORTED_MODULE_1__.DOMAIN_STATE_ICONS.binary_sensor.door; + return { + type: "conditional", + conditions: [ + { + entity: entity_id, + state_not: "unavailable" + } + ], + chip: { + type: "template", + entity: entity_id, + icon_color: "{{ 'red' if is_state(entity, 'on') else 'grey' }}", + icon: `{{ '${icon.on}' if is_state(entity, 'on') else '${icon.off}' }}`, + content: `{{ expand(states.${entity_id}.attributes.entity_id is defined and states.${entity_id}.attributes.entity_id) | selectattr( 'state', 'eq', 'on') | list | count }}`, + tap_action: (0,_utils__WEBPACK_IMPORTED_MODULE_0__.navigateTo)('security-details'), + }, + }; + } + /** + * Class Constructor. + * + * @param {chips.TemplateChipOptions} options The chip options. + */ + constructor(device, options = {}) { + super(); + if (device.entities.aggregate_door?.entity_id) { + const defaultConfig = this.getDefaultConfig(device.entities.aggregate_door.entity_id); + this.config = Object.assign(this.config, defaultConfig); + } + } +} + + + +/***/ }), + +/***/ "./src/chips/FanChip.ts": +/*!******************************!*\ + !*** ./src/chips/FanChip.ts ***! + \******************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ FanChip: () => (/* binding */ FanChip) +/* harmony export */ }); +/* harmony import */ var _Helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Helper */ "./src/Helper.ts"); +/* harmony import */ var _AbstractChip__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AbstractChip */ "./src/chips/AbstractChip.ts"); +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _FanChip_defaultConfig; + + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Fan Chip class. + * + * Used to create a chip to indicate how many fans are on and to turn all off. + */ +class FanChip extends _AbstractChip__WEBPACK_IMPORTED_MODULE_1__.AbstractChip { + /** + * Class Constructor. + * + * @param {chips.TemplateChipOptions} options The chip options. + */ + constructor(options = {}) { + super(); + /** + * Default configuration of the chip. + * + * @type {TemplateChipConfig} + * + * @readonly + * @private + */ + _FanChip_defaultConfig.set(this, { + type: "template", + icon: "mdi:fan", + icon_color: "green", + content: _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.getCountTemplate("fan", "eq", "on"), + tap_action: { + action: "call-service", + service: "fan.turn_off", + }, + hold_action: { + action: "navigate", + navigation_path: "fans", + }, + }); + this.config = Object.assign(this.config, __classPrivateFieldGet(this, _FanChip_defaultConfig, "f"), options); + } +} +_FanChip_defaultConfig = new WeakMap(); + + + +/***/ }), + +/***/ "./src/chips/LightChip.ts": +/*!********************************!*\ + !*** ./src/chips/LightChip.ts ***! + \********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ LightChip: () => (/* binding */ LightChip) +/* harmony export */ }); +/* harmony import */ var _Helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Helper */ "./src/Helper.ts"); +/* harmony import */ var _AbstractChip__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AbstractChip */ "./src/chips/AbstractChip.ts"); +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _LightChip_defaultConfig; + + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Light Chip class. + * + * Used to create a chip to indicate how many lights are on and to turn all off. + */ +class LightChip extends _AbstractChip__WEBPACK_IMPORTED_MODULE_1__.AbstractChip { + /** + * Class Constructor. + * + * @param {chips.TemplateChipOptions} options The chip options. + */ + constructor(options = {}) { + super(); + /** + * Default configuration of the chip. + * + * @type {TemplateChipConfig} + * + * @readonly + * @private + */ + _LightChip_defaultConfig.set(this, { + type: "template", + icon: "mdi:lightbulb-group", + icon_color: "amber", + content: _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.getCountTemplate("light", "eq", "on"), + tap_action: { + action: "call-service", + service: "light.turn_off", + }, + hold_action: { + action: "navigate", + navigation_path: "lights", + }, + }); + this.config = Object.assign(this.config, __classPrivateFieldGet(this, _LightChip_defaultConfig, "f"), options); + } +} +_LightChip_defaultConfig = new WeakMap(); + + + +/***/ }), + +/***/ "./src/chips/LightControlChip.ts": +/*!***************************************!*\ + !*** ./src/chips/LightControlChip.ts ***! + \***************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ LightControlChip: () => (/* binding */ LightControlChip) +/* harmony export */ }); +/* harmony import */ var _AbstractChip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AbstractChip */ "./src/chips/AbstractChip.ts"); +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _LightControlChip_defaultConfig; + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Light Chip class. + * + * Used to create a chip to indicate how many lights are on and to turn all off. + */ +class LightControlChip extends _AbstractChip__WEBPACK_IMPORTED_MODULE_0__.AbstractChip { + /** + * Class Constructor. + * + * @param {chips.TemplateChipOptions} options The chip options. + */ + constructor(entity_id) { + super(); + /** + * Default configuration of the chip. + * + * @type {TemplateChipConfig} + * + * @readonly + * @private + */ + _LightControlChip_defaultConfig.set(this, { + type: "template", + entity: undefined, + icon: "mdi:lightbulb-auto", + icon_color: "{% if is_state(config.entity, 'on') %}green{% else %}red{% endif %}", + tap_action: { + action: "more-info" + }, + // double_tap_action: { + // action: "call-service", + // service: "switch.toggle", + // data: { + // entity_id: undefined + // } + // } + }); + __classPrivateFieldGet(this, _LightControlChip_defaultConfig, "f").entity = entity_id; + this.config = Object.assign(this.config, __classPrivateFieldGet(this, _LightControlChip_defaultConfig, "f")); + } +} +_LightControlChip_defaultConfig = new WeakMap(); + + + +/***/ }), + +/***/ "./src/chips/LinusAggregateChip.ts": +/*!*****************************************!*\ + !*** ./src/chips/LinusAggregateChip.ts ***! + \*****************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ LinusAggregateChip: () => (/* binding */ LinusAggregateChip) +/* harmony export */ }); +/* harmony import */ var _popups_AggregateAreaListPopup__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../popups/AggregateAreaListPopup */ "./src/popups/AggregateAreaListPopup.ts"); +/* harmony import */ var _popups_AggregateListPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../popups/AggregateListPopup */ "./src/popups/AggregateListPopup.ts"); +/* harmony import */ var _variables__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../variables */ "./src/variables.ts"); +/* harmony import */ var _AbstractChip__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./AbstractChip */ "./src/chips/AbstractChip.ts"); + + + + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Climate Chip class. + * + * Used to create a chip to indicate climate level. + */ +class LinusAggregateChip extends _AbstractChip__WEBPACK_IMPORTED_MODULE_3__.AbstractChip { + /** + * Default configuration of the chip. + * + * @type {ConditionalChipConfig | undefined} + * + */ + getDefaultConfig(device, deviceClass, showContent, by_area = false) { + const entity = device.entities[`aggregate_${deviceClass}`]; + if (!entity?.entity_id) + return undefined; + const domain = entity?.entity_id.split(".")[0]; + let icon = _variables__WEBPACK_IMPORTED_MODULE_2__.DOMAIN_ICONS[deviceClass]; + let icon_color = ''; + let content = ''; + if (domain === "binary_sensor") { + icon_color = `{{ 'red' if expand(states.${entity?.entity_id}.attributes.sensors is defined and states.${entity?.entity_id}.attributes.sensors) | selectattr( 'state', 'eq', 'on') | list | count > 0 else 'grey' }}`; + content = showContent ? `{{ expand(states.${entity?.entity_id}.attributes.sensors is defined and states.${entity?.entity_id}.attributes.sensors) | selectattr( 'state', 'eq', 'on') | list | count }}` : ""; + } + if (domain === "sensor") { + if (deviceClass === "battery") { + icon_color = `{% set bl = states('${entity?.entity_id}') %} + {% if bl == 'unknown' or bl == 'unavailable' %} + {% elif bl | int() < 30 %} red + {% elif bl | int() < 50 %} orange + {% elif bl | int() <= 100 %} green + {% else %} disabled{% endif %}`; + icon = `{% set bl = states('${entity?.entity_id}') %} + {% if bl == 'unknown' or bl == 'unavailable' %} + {% elif bl | int() < 10 %}mdi:battery-outline + {% elif bl | int() < 20 %} mdi:battery1 + {% elif bl | int() < 30 %} mdi:battery-20 + {% elif bl | int() < 40 %} mdi:battery-30 + {% elif bl | int() < 50 %} mdi:battery-40 + {% elif bl | int() < 60 %} mdi:battery-50 + {% elif bl | int() < 70 %} mdi:battery-60 + {% elif bl | int() < 80 %} mdi:battery-70 + {% elif bl | int() < 90 %} mdi:battery-80 + {% elif bl | int() < 100 %} mdi:battery-90 + {% elif bl | int() == 100 %} mdi:battery + {% else %} mdi:battery{% endif %} `; + content = showContent ? `{{ states('${entity?.entity_id}') | int | round(1) }} %` : ""; + } + if (deviceClass === "temperature") + icon_color = `{% set bl = states('${entity?.entity_id}') | int() %} {% if bl < 20 %} blue + {% elif bl < 30 %} orange + {% elif bl >= 30 %} red{% else %} disabled{% endif %}`; + if (deviceClass === "illuminance") + icon_color = `{{ 'blue' if 'dark' in state_attr('${device.entities.area_state?.entity_id}', 'states') else 'amber' }}`; + content = showContent ? `{{ states.${entity?.entity_id}.state | float | round(1) }} {{ states.${entity?.entity_id}.attributes.unit_of_measurement }}` : ""; + } + if (deviceClass === "cover") { + icon_color = `{{ 'red' if is_state('${entity?.entity_id}', 'open') else 'grey' }}`; + content = showContent ? `{{ expand(states.${entity?.entity_id}.attributes.entity_id) | selectattr( 'state', 'eq', 'open') | list | count }}` : ""; + } + if (deviceClass === "health") { + icon_color = `{{ 'red' if is_state(entity, 'on') else 'green' }}`; + } + const tap_action = by_area ? new _popups_AggregateAreaListPopup__WEBPACK_IMPORTED_MODULE_0__.AggregateAreaListPopup(entity?.entity_id, deviceClass).getPopup() : new _popups_AggregateListPopup__WEBPACK_IMPORTED_MODULE_1__.AggregateListPopup(entity?.entity_id, deviceClass).getPopup(); + return { + type: "conditional", + conditions: [ + { + entity: entity?.entity_id ?? "", + state_not: "unavailable" + } + ], + chip: { + type: "template", + entity: entity?.entity_id, + icon_color: icon_color, + icon: icon, + content: content, + tap_action: tap_action + }, + }; + } + /** + * Class Constructor. + * + * @param {chips.TemplateChipOptions} options The chip options. + */ + constructor(device, deviceClass, showContent = false, by_area = false) { + super(); + const defaultConfig = this.getDefaultConfig(device, deviceClass, showContent, by_area); + this.config = Object.assign(this.config, defaultConfig); + } +} + + + +/***/ }), + +/***/ "./src/chips/LinusAlarmChip.ts": +/*!*************************************!*\ + !*** ./src/chips/LinusAlarmChip.ts ***! + \*************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ LinusAlarmChip: () => (/* binding */ LinusAlarmChip) +/* harmony export */ }); +/* harmony import */ var _AbstractChip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AbstractChip */ "./src/chips/AbstractChip.ts"); + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Climate Chip class. + * + * Used to create a chip to indicate climate level. + */ +class LinusAlarmChip extends _AbstractChip__WEBPACK_IMPORTED_MODULE_0__.AbstractChip { + /** + * Default configuration of the chip. + * + * @type {ConditionalChipConfig} + * + */ + getDefaultConfig(entity_id) { + return { + type: "alarm-control-panel", + entity: entity_id, + tap_action: { + action: "more-info" + }, + }; + } + /** + * Class Constructor. + * + * @param {chips.TemplateChipOptions} options The chip options. + */ + constructor(entityId) { + super(); + const defaultConfig = this.getDefaultConfig(entityId); + this.config = Object.assign(this.config, defaultConfig); + } +} + + + +/***/ }), + +/***/ "./src/chips/LinusClimateChip.ts": +/*!***************************************!*\ + !*** ./src/chips/LinusClimateChip.ts ***! + \***************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ LinusClimateChip: () => (/* binding */ LinusClimateChip) +/* harmony export */ }); +/* harmony import */ var _AbstractChip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AbstractChip */ "./src/chips/AbstractChip.ts"); + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Climate Chip class. + * + * Used to create a chip to indicate climate level. + */ +class LinusClimateChip extends _AbstractChip__WEBPACK_IMPORTED_MODULE_0__.AbstractChip { + /** + * Default configuration of the chip. + * + * @type {ConditionalChipConfig} + * + */ + getDefaultConfig(device, showContent) { + return { + "type": "template", + "entity": device.entities.aggregate_climate?.entity_id, + "icon_color": `{{ 'orange' if is_state('${device.entities.aggregate_climate?.entity_id}', 'heat') else 'grey' }}`, + "icon": "mdi:thermostat", + "content": showContent ? `{{ states.${device.entities.aggregate_climate?.entity_id}.attributes.preset_mode }}` : "", + // "tap_action": climateList(hass, area) + }; + } + /** + * Class Constructor. + * + * @param {chips.TemplateChipOptions} options The chip options. + */ + constructor(device, showContent = false) { + super(); + const defaultConfig = this.getDefaultConfig(device, showContent); + this.config = Object.assign(this.config, defaultConfig); + } +} + + + +/***/ }), + +/***/ "./src/chips/LinusLightChip.ts": +/*!*************************************!*\ + !*** ./src/chips/LinusLightChip.ts ***! + \*************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ LinusLightChip: () => (/* binding */ LinusLightChip) +/* harmony export */ }); +/* harmony import */ var _AbstractChip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AbstractChip */ "./src/chips/AbstractChip.ts"); +/* harmony import */ var _popups_AggregateListPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../popups/AggregateListPopup */ "./src/popups/AggregateListPopup.ts"); +/* harmony import */ var _variables__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../variables */ "./src/variables.ts"); + + + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Light Chip class. + * + * Used to create a chip to indicate how many lights are on and to turn all off. + */ +class LinusLightChip extends _AbstractChip__WEBPACK_IMPORTED_MODULE_0__.AbstractChip { + /** + * Class Constructor. + * + * @param {chips.TemplateChipOptions} options The chip options. + */ + constructor(device, area_id, show_content, show_group) { + super(); + const defaultConfig = { + type: "template", + entity: device.entities.all_lights?.entity_id, + icon_color: `{{ 'amber' if expand(states.${device.entities.all_lights?.entity_id}.attributes.entity_id) | selectattr( 'state', 'eq', 'on') | list | count > 0 else 'grey' }}`, + icon: "mdi:lightbulb-group", + content: show_content ? `{{ expand(states.${device.entities.all_lights?.entity_id}.attributes.entity_id) | selectattr( 'state', 'eq', 'on') | list | count }}` : "", + tap_action: show_group ? new _popups_AggregateListPopup__WEBPACK_IMPORTED_MODULE_1__.AggregateListPopup(device.entities.all_lights?.entity_id, "light").getPopup() : { + action: "call-service", + service: `${_variables__WEBPACK_IMPORTED_MODULE_2__.DOMAIN}.area_light_toggle`, + data: { + area: area_id + } + } + }; + this.config = Object.assign(this.config, defaultConfig); + } +} + + + +/***/ }), + +/***/ "./src/chips/MotionChip.ts": +/*!*********************************!*\ + !*** ./src/chips/MotionChip.ts ***! + \*********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ MotionChip: () => (/* binding */ MotionChip) +/* harmony export */ }); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils */ "./src/utils.ts"); +/* harmony import */ var _variables__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../variables */ "./src/variables.ts"); +/* harmony import */ var _AbstractChip__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AbstractChip */ "./src/chips/AbstractChip.ts"); + + + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Motion Chip class. + * + * Used to create a chip to indicate how many motions are on and to turn all off. + */ +class MotionChip extends _AbstractChip__WEBPACK_IMPORTED_MODULE_2__.AbstractChip { + /** + * Default configuration of the chip. + * + * @type {ConditionalChipConfig} + * + */ + getDefaultConfig(entity_id) { + const icon = _variables__WEBPACK_IMPORTED_MODULE_1__.DOMAIN_STATE_ICONS.binary_sensor.motion; + return { + type: "conditional", + conditions: [ + { + entity: entity_id, + state_not: "unavailable" + } + ], + chip: { + type: "template", + entity: entity_id, + icon_color: "{{ 'red' if is_state(entity, 'on') else 'grey' }}", + icon: `{{ '${icon.on}' if is_state(entity, 'on') else '${icon.off}' }}`, + content: `{{ expand(states.${entity_id}.attributes.entity_id is defined and states.${entity_id}.attributes.entity_id) | selectattr( 'state', 'eq', 'on') | list | count }}`, + tap_action: (0,_utils__WEBPACK_IMPORTED_MODULE_0__.navigateTo)('security-details'), + }, + }; + } + /** + * Class Constructor. + * + * @param {chips.TemplateChipOptions} options The chip options. + */ + constructor(device, options = {}) { + super(); + if (device.entities.aggregate_motion?.entity_id) { + const defaultConfig = this.getDefaultConfig(device.entities.aggregate_motion.entity_id); + this.config = Object.assign(this.config, defaultConfig); + } + } +} + + + +/***/ }), + +/***/ "./src/chips/SafetyChip.ts": +/*!*********************************!*\ + !*** ./src/chips/SafetyChip.ts ***! + \*********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ SafetyChip: () => (/* binding */ SafetyChip) +/* harmony export */ }); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils */ "./src/utils.ts"); +/* harmony import */ var _variables__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../variables */ "./src/variables.ts"); +/* harmony import */ var _AbstractChip__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AbstractChip */ "./src/chips/AbstractChip.ts"); + + + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Safety Chip class. + * + * Used to create a chip to indicate how many safetys are on and to turn all off. + */ +class SafetyChip extends _AbstractChip__WEBPACK_IMPORTED_MODULE_2__.AbstractChip { + /** + * Default configuration of the chip. + * + * @type {ConditionalChipConfig} + * + */ + getDefaultConfig(entity_id) { + const icon = _variables__WEBPACK_IMPORTED_MODULE_1__.DOMAIN_STATE_ICONS.binary_sensor.safety; + return { + type: "conditional", + conditions: [ + { + entity: entity_id, + state_not: "unavailable" + } + ], + chip: { + type: "template", + entity: entity_id, + icon_color: "{{ 'red' if is_state(entity, 'on') else 'grey' }}", + icon: `{{ '${icon.on}' if is_state(entity, 'on') else '${icon.off}' }}`, + content: `{{ expand(states.${entity_id}.attributes.entity_id is defined and states.${entity_id}.attributes.entity_id) | selectattr( 'state', 'eq', 'on') | list | count }}`, + tap_action: (0,_utils__WEBPACK_IMPORTED_MODULE_0__.navigateTo)('security-details'), + }, + }; + } + /** + * Class Constructor. + * + * @param {chips.TemplateChipOptions} options The chip options. + */ + constructor(device, options = {}) { + super(); + if (device.entities.aggregate_safety?.entity_id) { + const defaultConfig = this.getDefaultConfig(device.entities.aggregate_safety.entity_id); + this.config = Object.assign(this.config, defaultConfig); + } + } +} + + + +/***/ }), + +/***/ "./src/chips/SettingsChip.ts": +/*!***********************************!*\ + !*** ./src/chips/SettingsChip.ts ***! + \***********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ SettingsChip: () => (/* binding */ SettingsChip) +/* harmony export */ }); +/* harmony import */ var _AbstractChip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AbstractChip */ "./src/chips/AbstractChip.ts"); +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _SettingsChip_defaultConfig; + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Settings Chip class. + * + * Used to create a chip to indicate how many fans are on and to turn all off. + */ +class SettingsChip extends _AbstractChip__WEBPACK_IMPORTED_MODULE_0__.AbstractChip { + /** + * Class Constructor. + * + * @param {chips.TemplateChipOptions} options The chip options. + */ + constructor(options = {}) { + super(); + /** + * Default configuration of the chip. + * + * @type {TemplateChipConfig} + * + * @readonly + * @private + */ + _SettingsChip_defaultConfig.set(this, { + "type": "template", + "icon": "mdi:cog", + }); + this.config = Object.assign(this.config, __classPrivateFieldGet(this, _SettingsChip_defaultConfig, "f"), options); + } +} +_SettingsChip_defaultConfig = new WeakMap(); + + + +/***/ }), + +/***/ "./src/chips/SpotifyChip.ts": +/*!**********************************!*\ + !*** ./src/chips/SpotifyChip.ts ***! + \**********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ SpotifyChip: () => (/* binding */ SpotifyChip) +/* harmony export */ }); +/* harmony import */ var _Helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Helper */ "./src/Helper.ts"); +/* harmony import */ var _AbstractChip__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AbstractChip */ "./src/chips/AbstractChip.ts"); + + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Spotify Chip class. + * + * Used to create a chip to indicate climate level. + */ +class SpotifyChip extends _AbstractChip__WEBPACK_IMPORTED_MODULE_1__.AbstractChip { + /** + * Default configuration of the chip. + * + * @type {ConditionalChipConfig} + * + */ + getDefaultConfig(entityId) { + return { + type: "template", + entity: entityId, + icon_color: `{{ 'green' if is_state('${entityId}', 'playing') else 'grey' }}`, + content: '{{ states(entity) }}', + icon: "mdi:spotify", + // content: show_content ? `{{ states('${entityId}') if not states('${entityId}') == 'on' else '' }}` : "", + tap_action: { + action: "fire-dom-event", + browser_mod: { + service: "browser_mod.popup", + data: { + title: "Spotify", + "content": { + type: "vertical-stack", + cards: [ + ...([entityId].map(x => { + const entity = _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.getEntityState(x); + const source_list = entity.attributes.source_list; + const chunkSize = 3; + const source_cards_chunk = []; + for (let i = 0; i < source_list.length; i += chunkSize) { + const chunk = source_list.slice(i, i + chunkSize); + source_cards_chunk.push(chunk); + } + return { + type: "custom:stack-in-card", + cards: [ + { + type: "custom:mushroom-media-player-card", + entity: "media_player.spotify_juicy", + icon: "mdi:spotify", + icon_color: "green", + use_media_info: true, + use_media_artwork: false, + show_volume_level: false, + media_controls: [ + "play_pause_stop", + "previous", + "next" + ], + volume_controls: [ + "volume_buttons", + "volume_set" + ], + fill_container: false, + card_mod: { + style: "ha-card {\n --rgb-state-media-player: var(--rgb-green);\n}\n" + } + }, + { + type: "custom:swipe-card", + parameters: null, + spaceBetween: 8, + scrollbar: null, + start_card: 1, + hide: false, + draggable: true, + snapOnRelease: true, + slidesPerView: 2.2, + cards: [ + ...(source_cards_chunk.map(source_cards => ({ + type: "horizontal-stack", + cards: [ + ...(source_cards.map((source) => ({ + type: "custom:mushroom-template-card", + icon: "mdi:speaker-play", + icon_color: `{% if states[entity].attributes.source == '${source}' %}\namber\n{% else %}\ngrey\n{% endif %}`, + primary: null, + secondary: source, + entity: entity.entity_id, + multiline_secondary: false, + tap_action: { + action: "call-service", + service: "spotcast.start", + data: { + device_name: source, + force_playback: true + } + }, + layout: "vertical", + 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", + card_mode: { + style: ":host {\n background: rgba(var(--rgb-primary-background-color), 0.8);\n border-radius: 50px;!important\n} \n" + }, + line_width: 8, + line_color: "#FF6384", + card_mod: { + style: ` + :host { + --mush-icon-symbol-size: 0.75em; + } + ` + } + }))).filter(Boolean), + ] + }))).filter(Boolean), + ] + }, + { + type: "custom:spotify-card", + always_play_random_song: true, + hide_currently_playing: true, + hide_playback_controls: true, + hide_top_header: true, + hide_warning: true, + hide_chromecast_devices: true, + display_style: "Grid", + grid_covers_per_row: 5, + limit: 20 + } + ], + card_mod: { + 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" + } + }; + })).filter(Boolean), + ], + card_mod: { + style: "ha-card {\n background:#4a1a1a;\n}\n" + } + } + } + } + } + }; + } + /** + * Class Constructor. + * + * @param {chips.TemplateChipOptions} options The chip options. + */ + constructor(entityId) { + super(); + const defaultConfig = this.getDefaultConfig(entityId); + this.config = Object.assign(this.config, defaultConfig); + } +} + + + +/***/ }), + +/***/ "./src/chips/SwitchChip.ts": +/*!*********************************!*\ + !*** ./src/chips/SwitchChip.ts ***! + \*********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ SwitchChip: () => (/* binding */ SwitchChip) +/* harmony export */ }); +/* harmony import */ var _Helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Helper */ "./src/Helper.ts"); +/* harmony import */ var _AbstractChip__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AbstractChip */ "./src/chips/AbstractChip.ts"); +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _SwitchChip_defaultConfig; + + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Switch Chip class. + * + * Used to create a chip to indicate how many switches are on and to turn all off. + */ +class SwitchChip extends _AbstractChip__WEBPACK_IMPORTED_MODULE_1__.AbstractChip { + /** + * Class Constructor. + * + * @param {chips.TemplateChipOptions} options The chip options. + */ + constructor(options = {}) { + super(); + /** + * Default configuration of the chip. + * + * @type {TemplateChipConfig} + * + * @readonly + * @private + */ + _SwitchChip_defaultConfig.set(this, { + type: "template", + icon: "mdi:dip-switch", + icon_color: "blue", + content: _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.getCountTemplate("switch", "eq", "on"), + tap_action: { + action: "navigate", + navigation_path: "switches", + }, + hold_action: { + action: "navigate", + navigation_path: "switches", + }, + }); + this.config = Object.assign(this.config, __classPrivateFieldGet(this, _SwitchChip_defaultConfig, "f"), options); + } +} +_SwitchChip_defaultConfig = new WeakMap(); + + + +/***/ }), + +/***/ "./src/chips/ToggleSceneChip.ts": +/*!**************************************!*\ + !*** ./src/chips/ToggleSceneChip.ts ***! + \**************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ ToggleSceneChip: () => (/* binding */ ToggleSceneChip) +/* harmony export */ }); +/* harmony import */ var _variables__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../variables */ "./src/variables.ts"); +/* harmony import */ var _AbstractChip__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AbstractChip */ "./src/chips/AbstractChip.ts"); + + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Climate Chip class. + * + * Used to create a chip to indicate climate level. + */ +class ToggleSceneChip extends _AbstractChip__WEBPACK_IMPORTED_MODULE_1__.AbstractChip { + /** + * Default configuration of the chip. + * + * @type {ConditionalChipConfig} + * + */ + getDefaultConfig(device) { + return { + type: "template", + entity: device.entities.light_control?.entity_id, + icon: "mdi:recycle-variant", + // icon_color: "{% if is_state(config.entity, 'on') %}green{% else %}red{% endif %}", + tap_action: { + action: "call-service", + service: `${_variables__WEBPACK_IMPORTED_MODULE_0__.DOMAIN}.area_scene_toggle`, + data: { + area: device.name, + } + }, + hold_action: { + action: "more-info" + } + }; + } + /** + * Class Constructor. + * + * @param {chips.TemplateChipOptions} options The chip options. + */ + constructor(device) { + super(); + const defaultConfig = this.getDefaultConfig(device); + this.config = Object.assign(this.config, defaultConfig); + } +} + + + +/***/ }), + +/***/ "./src/chips/UnavailableChip.ts": +/*!**************************************!*\ + !*** ./src/chips/UnavailableChip.ts ***! + \**************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ UnavailableChip: () => (/* binding */ UnavailableChip) +/* harmony export */ }); +/* harmony import */ var _popups_GroupListPopup__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../popups/GroupListPopup */ "./src/popups/GroupListPopup.ts"); +/* harmony import */ var _AbstractChip__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AbstractChip */ "./src/chips/AbstractChip.ts"); + + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Unavailable Chip class. + * + * Used to create a chip to indicate unable entities. + */ +class UnavailableChip extends _AbstractChip__WEBPACK_IMPORTED_MODULE_1__.AbstractChip { + getDefaultConfig(entities) { + return { + type: "template", + icon_color: "orange", + icon: 'mdi:help', + tap_action: new _popups_GroupListPopup__WEBPACK_IMPORTED_MODULE_0__.GroupListPopup(entities, "Unavailable entities").getPopup() + }; + } + /** + * Class Constructor. + * + * @param {EntityRegistryEntry[]} entities The chip entities. + */ + constructor(entities) { + super(); + const defaultConfig = this.getDefaultConfig(entities); + this.config = Object.assign(this.config, defaultConfig); + } +} + + + +/***/ }), + +/***/ "./src/chips/WeatherChip.ts": +/*!**********************************!*\ + !*** ./src/chips/WeatherChip.ts ***! + \**********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ WeatherChip: () => (/* binding */ WeatherChip) +/* harmony export */ }); +/* harmony import */ var _AbstractChip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AbstractChip */ "./src/chips/AbstractChip.ts"); +/* harmony import */ var _popups_WeatherPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../popups/WeatherPopup */ "./src/popups/WeatherPopup.ts"); +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +}; +var _WeatherChip_defaultConfig; + + +// noinspection JSUnusedGlobalSymbols False positive. +/** + * Weather Chip class. + * + * Used to create a chip for showing the weather. + */ +class WeatherChip extends _AbstractChip__WEBPACK_IMPORTED_MODULE_0__.AbstractChip { + /** + * Class Constructor. + * + * @param {string} entityId Id of a weather entity. + * @param {chips.WeatherChipOptions} options Weather Chip options. + */ + constructor(entityId, options = {}) { + super(); + /** + * Default configuration of the chip. + * + * @private + * @readonly + */ + _WeatherChip_defaultConfig.set(this, { + type: "weather", + show_temperature: true, + show_conditions: true, + }); + __classPrivateFieldSet(this, _WeatherChip_defaultConfig, { + ...__classPrivateFieldGet(this, _WeatherChip_defaultConfig, "f"), + tap_action: new _popups_WeatherPopup__WEBPACK_IMPORTED_MODULE_1__.WeatherPopup(entityId).getPopup(), + ...{ entity: entityId }, + ...options, + }, "f"); + __classPrivateFieldGet(this, _WeatherChip_defaultConfig, "f").tap_action = new _popups_WeatherPopup__WEBPACK_IMPORTED_MODULE_1__.WeatherPopup(entityId).getPopup(); + this.config = Object.assign(this.config, __classPrivateFieldGet(this, _WeatherChip_defaultConfig, "f"), options); + } +} +_WeatherChip_defaultConfig = new WeakMap(); + + + +/***/ }), + +/***/ "./src/chips/WindowChip.ts": +/*!*********************************!*\ + !*** ./src/chips/WindowChip.ts ***! + \*********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ WindowChip: () => (/* binding */ WindowChip) +/* harmony export */ }); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils */ "./src/utils.ts"); +/* harmony import */ var _variables__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../variables */ "./src/variables.ts"); +/* harmony import */ var _AbstractChip__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AbstractChip */ "./src/chips/AbstractChip.ts"); + + + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Window Chip class. + * + * Used to create a chip to indicate how many windows are on and to turn all off. + */ +class WindowChip extends _AbstractChip__WEBPACK_IMPORTED_MODULE_2__.AbstractChip { + /** + * Default configuration of the chip. + * + * @type {ConditionalChipConfig} + * + */ + getDefaultConfig(entity_id) { + const icon = _variables__WEBPACK_IMPORTED_MODULE_1__.DOMAIN_STATE_ICONS.binary_sensor.window; + return { + type: "conditional", + conditions: [ + { + entity: entity_id, + state_not: "unavailable" + } + ], + chip: { + type: "template", + entity: entity_id, + icon_color: "{{ 'red' if is_state(entity, 'on') else 'grey' }}", + icon: `{{ '${icon.on}' if is_state(entity, 'on') else '${icon.off}' }}`, + content: `{{ expand(states.${entity_id}.attributes.entity_id is defined and states.${entity_id}.attributes.entity_id) | selectattr( 'state', 'eq', 'on') | list | count }}`, + tap_action: (0,_utils__WEBPACK_IMPORTED_MODULE_0__.navigateTo)('security-details'), + }, + }; + } + /** + * Class Constructor. + * + * @param {chips.TemplateChipOptions} options The chip options. + */ + constructor(device, options = {}) { + super(); + if (device.entities?.aggregate_window?.entity_id) { + const defaultConfig = this.getDefaultConfig(device.entities.aggregate_window.entity_id); + this.config = Object.assign(this.config, defaultConfig); + } + } +} + + + +/***/ }), + +/***/ "./src/configurationDefaults.ts": +/*!**************************************!*\ + !*** ./src/configurationDefaults.ts ***! + \**************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ configurationDefaults: () => (/* binding */ configurationDefaults) +/* harmony export */ }); +/* harmony import */ var _chips_LightControlChip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./chips/LightControlChip */ "./src/chips/LightControlChip.ts"); +/* harmony import */ var _chips_SettingsChip__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./chips/SettingsChip */ "./src/chips/SettingsChip.ts"); +/* harmony import */ var _popups_LightSettingsPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./popups/LightSettingsPopup */ "./src/popups/LightSettingsPopup.ts"); +/* harmony import */ var _chips_ToggleSceneChip__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./chips/ToggleSceneChip */ "./src/chips/ToggleSceneChip.ts"); +/* harmony import */ var _popups_SceneSettingsPopup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./popups/SceneSettingsPopup */ "./src/popups/SceneSettingsPopup.ts"); + + + + + +/** + * Default configuration for the mushroom strategy. + */ +const configurationDefaults = { + areas: { + undisclosed: { + aliases: [], + area_id: "undisclosed", + name: "Non assigné", + picture: null, + hidden: false, + } + }, + floors: { + undisclosed: { + aliases: [], + floor_id: "undisclosed", + name: "Non assigné", + hidden: false, + } + }, + debug: true, + domains: { + _: { + hide_config_entities: false, + }, + default: { + title: "Divers", + showControls: false, + hidden: false, + }, + light: { + // title: "Lights", + showControls: true, + extraControls: (device) => { + return [ + new _chips_LightControlChip__WEBPACK_IMPORTED_MODULE_0__.LightControlChip(device.entities.light_control?.entity_id).getChip(), + new _chips_SettingsChip__WEBPACK_IMPORTED_MODULE_1__.SettingsChip({ tap_action: new _popups_LightSettingsPopup__WEBPACK_IMPORTED_MODULE_2__.LightSettings(device).getPopup() }).getChip() + ]; + }, + iconOn: "mdi:lightbulb", + iconOff: "mdi:lightbulb-off", + onService: "light.turn_on", + offService: "light.turn_off", + hidden: false, + order: 1 + }, + scene: { + title: "Scènes", + showControls: false, + extraControls: (device) => { + return [ + { + type: "conditional", + conditions: [{ + entity: device.entities.all_lights?.entity_id, + state_not: "unavailable" + }], + chip: new _chips_ToggleSceneChip__WEBPACK_IMPORTED_MODULE_3__.ToggleSceneChip(device).getChip(), + }, + new _chips_SettingsChip__WEBPACK_IMPORTED_MODULE_1__.SettingsChip({ tap_action: new _popups_SceneSettingsPopup__WEBPACK_IMPORTED_MODULE_4__.SceneSettings(device).getPopup() }).getChip() + ]; + }, + iconOn: "mdi:lightbulb", + iconOff: "mdi:lightbulb-off", + onService: "scene.turn_on", + hidden: false, + order: 2 + }, + fan: { + title: "Fans", + showControls: true, + iconOn: "mdi:fan", + iconOff: "mdi:fan-off", + onService: "fan.turn_on", + offService: "fan.turn_off", + hidden: false, + order: 4 + }, + cover: { + title: "Covers", + showControls: true, + iconOn: "mdi:arrow-up", + iconOff: "mdi:arrow-down", + onService: "cover.open_cover", + offService: "cover.close_cover", + hidden: false, + order: 8 + }, + switch: { + title: "Switches", + showControls: true, + iconOn: "mdi:power-plug", + iconOff: "mdi:power-plug-off", + onService: "switch.turn_on", + offService: "switch.turn_off", + hidden: false, + order: 5 + }, + camera: { + title: "Cameras", + showControls: false, + hidden: false, + order: 6 + }, + lock: { + title: "Locks", + showControls: false, + hidden: false, + order: 7 + }, + climate: { + title: "Climates", + showControls: true, + hidden: false, + order: 3 + }, + media_player: { + title: "Media Players", + showControls: true, + hidden: false, + order: 9 + }, + sensor: { + title: "Sensors", + showControls: false, + hidden: false, + }, + binary_sensor: { + title: "Binary Sensors", + showControls: false, + hidden: false, + }, + number: { + title: "Numbers", + showControls: false, + hidden: false, + }, + vacuum: { + title: "Vacuums", + showControls: true, + hidden: false, + order: 10 + }, + }, + home_view: { + hidden: [], + }, + views: { + home: { + order: 1, + hidden: false, + }, + security: { + order: 2, + hidden: false, + }, + light: { + order: 3, + hidden: false, + }, + media_player: { + order: 4, + hidden: false, + }, + climate: { + order: 5, + hidden: false, + }, + fan: { + order: 6, + hidden: false, + }, + cover: { + order: 7, + hidden: false, + }, + camera: { + order: 8, + hidden: false, + }, + switch: { + order: 9, + hidden: false, + }, + vacuum: { + order: 10, + hidden: false, + }, + scene: { + order: 11, + hidden: false, + }, + securityDetails: { + hidden: false, + }, + } +}; + + +/***/ }), + +/***/ "./src/mushroom-strategy.ts": +/*!**********************************!*\ + !*** ./src/mushroom-strategy.ts ***! + \**********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ version: () => (/* binding */ version) +/* harmony export */ }); +/* harmony import */ var _Helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Helper */ "./src/Helper.ts"); +/* harmony import */ var _cards_SensorCard__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cards/SensorCard */ "./src/cards/SensorCard.ts"); +/* harmony import */ var _cards_ControllerCard__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cards/ControllerCard */ "./src/cards/ControllerCard.ts"); +/* harmony import */ var _cards_SwipeCard__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./cards/SwipeCard */ "./src/cards/SwipeCard.ts"); +/* harmony import */ var _cards_MainAreaCard__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./cards/MainAreaCard */ "./src/cards/MainAreaCard.ts"); + + + + + +/** + * Mushroom Dashboard Strategy.
+ *
+ * Mushroom dashboard strategy provides a strategy for Home-Assistant to create a dashboard automatically.
+ * The strategy makes use Mushroom and Mini Graph cards to represent your entities.
+ *
+ * Features:
+ * 🛠 Automatically create dashboard with three lines of yaml.
+ * 😍 Built-in Views for several standard domains.
+ * 🎨 Many options to customize to your needs.
+ *
+ * Check the [Repository]{@link https://github.com/AalianKhan/mushroom-strategy} for more information. + */ +class MushroomStrategy extends HTMLTemplateElement { + /** + * Generate a dashboard. + * + * Called when opening a dashboard. + * + * @param {generic.DashBoardInfo} info Dashboard strategy information object. + * @return {Promise} + */ + static async generateDashboard(info) { + await _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.initialize(info); + // Create views. + const views = info.config?.views ?? []; + let viewModule; + // Create a view for each exposed domain. + for (let viewId of _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.getExposedViewIds()) { + try { + const viewType = _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.sanitizeClassName(viewId + "View"); + viewModule = await __webpack_require__("./src/views lazy recursive ^\\.\\/.*$")(`./${viewType}`); + const view = await new viewModule[viewType](_Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.strategyOptions.views[viewId]).getView(); + if (view.cards?.length) { + views.push(view); + } + } + catch (e) { + _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.logError(`View '${viewId}' couldn't be loaded!`, e); + } + } + // Create subviews for each area. + for (let area of _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.areas) { + if (!area.hidden) { + views.push({ + title: area.name, + path: area.area_id ?? area.name, + subview: true, + strategy: { + type: "custom:mushroom-strategy", + options: { + area, + }, + }, + }); + } + } + // Add custom views. + if (_Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.strategyOptions.extra_views) { + views.push(..._Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.strategyOptions.extra_views); + } + // Return the created views. + return { + views: views, + }; + } + /** + * Generate a view. + * + * Called when opening a subview. + * + * @param {generic.ViewInfo} info The view's strategy information object. + * @return {Promise} + */ + static async generateView(info) { + const exposedDomainIds = _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.getExposedDomainIds(); + const area = info.view.strategy?.options?.area ?? {}; + const viewCards = [...(area.extra_cards ?? [])]; + if (area.area_id !== "undisclosed") + viewCards.push(new _cards_MainAreaCard__WEBPACK_IMPORTED_MODULE_4__.MainAreaCard(area).getCard()); + // Set the target for controller cards to the current area. + let target = { + area_id: [area.area_id], + area_name: [area.name], + }; + // Create cards for each domain. + for (const domain of exposedDomainIds) { + if (domain === "default") { + continue; + } + const className = _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.sanitizeClassName(domain + "Card"); + let domainCards = []; + try { + domainCards = await __webpack_require__("./src/cards lazy recursive ^\\.\\/.*$")(`./${className}`).then(cardModule => { + let domainCards = []; + const entities = _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.getDeviceEntities(area, domain); + let configEntityHidden = _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.strategyOptions.domains[domain ?? "_"].hide_config_entities + || _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.strategyOptions.domains["_"].hide_config_entities; + const magicAreasDevice = _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.magicAreasDevices[area.name]; + const magicAreasKey = domain === "light" ? 'all_lights' : `${domain}_group`; + // Set the target for controller cards to linus aggregate entity if exist. + if (magicAreasDevice && magicAreasDevice.entities[magicAreasKey]) { + target["entity_id"] = magicAreasDevice.entities[magicAreasKey].entity_id; + } + else { + target["entity_id"] = undefined; + } + // Set the target for controller cards to entities without an area. + if (area.area_id === "undisclosed") { + target = { + entity_id: entities.map(entity => entity.entity_id), + }; + } + if (entities.length) { + // Create a Controller card for the current domain. + const title = _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.localize(domain === 'scene' ? 'ui.dialogs.quick-bar.commands.navigation.scene' : `component.${domain}.entity_component._.name`); + const titleCard = new _cards_ControllerCard__WEBPACK_IMPORTED_MODULE_2__.ControllerCard(target, { ..._Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.strategyOptions.domains[domain], domain, title }).createCard(); + if (domain === "sensor") { + // Create a card for each entity-sensor of the current area. + const sensorStates = _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.getStateEntities(area, "sensor"); + const sensorCards = []; + for (const sensor of entities) { + // Find the state of the current sensor. + const sensorState = sensorStates.find(state => state.entity_id === sensor.entity_id); + let cardOptions = _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.strategyOptions.card_options?.[sensor.entity_id]; + let deviceOptions = _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.strategyOptions.card_options?.[sensor.device_id ?? "null"]; + if (!cardOptions?.hidden && !deviceOptions?.hidden) { + if (sensorState?.attributes.unit_of_measurement) { + cardOptions = { + ...{ + type: "custom:mini-graph-card", + entities: [sensor.entity_id], + }, + ...cardOptions, + }; + } + sensorCards.push(new _cards_SensorCard__WEBPACK_IMPORTED_MODULE_1__.SensorCard(sensor, cardOptions).getCard()); + } + } + if (sensorCards.length) { + domainCards.push(new _cards_SwipeCard__WEBPACK_IMPORTED_MODULE_3__.SwipeCard(sensorCards).getCard()); + domainCards.unshift(titleCard); + } + return domainCards; + } + // Create a card for each other domain-entity of the current area. + for (const entity of entities) { + let deviceOptions; + let cardOptions = _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.strategyOptions.card_options?.[entity.entity_id]; + if (entity.device_id) { + deviceOptions = _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.strategyOptions.card_options?.[entity.device_id]; + } + // Don't include the entity if hidden in the strategy options. + if (cardOptions?.hidden || deviceOptions?.hidden) { + continue; + } + // Don't include the config-entity if hidden in the strategy options. + if (entity.entity_category === "config" && configEntityHidden) { + continue; + } + domainCards.push(new cardModule[className](entity, cardOptions).getCard()); + } + domainCards = [new _cards_SwipeCard__WEBPACK_IMPORTED_MODULE_3__.SwipeCard(domainCards).getCard()]; + if (domainCards.length) { + domainCards.unshift(titleCard); + } + } + return domainCards; + }); + } + catch (e) { + _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.logError("An error occurred while creating the domain cards!", e); + } + if (domainCards.length) { + viewCards.push({ + type: "vertical-stack", + cards: domainCards, + }); + } + } + if (!_Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.strategyOptions.domains.default.hidden) { + // Create cards for any other domain. + // Collect device entities of the current area. + const areaDevices = _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.devices.filter((device) => device.area_id === area.area_id) + .map((device) => device.id); + // Collect the remaining entities of which all conditions below are met: + // 1. The entity is not hidden. + // 2. The entity's domain isn't exposed (entities of exposed domains are already included). + // 3. The entity is linked to a device which is linked to the current area, + // or the entity itself is linked to the current area. + const miscellaneousEntities = _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.entities.filter((entity) => { + const entityLinked = areaDevices.includes(entity.device_id ?? "null") || entity.area_id === area.area_id; + const entityUnhidden = entity.hidden_by === null && entity.disabled_by === null; + const domainExposed = exposedDomainIds.includes(entity.entity_id.split(".", 1)[0]); + return entityUnhidden && !domainExposed && entityLinked; + }); + // Create a column of miscellaneous entity cards. + if (miscellaneousEntities.length) { + let miscellaneousCards = []; + try { + miscellaneousCards = await Promise.resolve(/*! import() */).then(__webpack_require__.bind(__webpack_require__, /*! ./cards/MiscellaneousCard */ "./src/cards/MiscellaneousCard.ts")).then(cardModule => { + const miscellaneousCards = [ + new _cards_ControllerCard__WEBPACK_IMPORTED_MODULE_2__.ControllerCard(target, _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.strategyOptions.domains.default).createCard(), + ]; + const swipeCard = []; + for (const entity of miscellaneousEntities) { + let cardOptions = _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.strategyOptions.card_options?.[entity.entity_id]; + let deviceOptions = _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.strategyOptions.card_options?.[entity.device_id ?? "null"]; + // Don't include the entity if hidden in the strategy options. + if (cardOptions?.hidden || deviceOptions?.hidden) { + continue; + } + // Don't include the config-entity if hidden in the strategy options + if (entity.entity_category === "config" && _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.strategyOptions.domains["_"].hide_config_entities) { + continue; + } + swipeCard.push(new cardModule.MiscellaneousCard(entity, cardOptions).getCard()); + } + return [...miscellaneousCards, new _cards_SwipeCard__WEBPACK_IMPORTED_MODULE_3__.SwipeCard(swipeCard).getCard()]; + }); + } + catch (e) { + _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.logError("An error occurred while creating the domain cards!", e); + } + viewCards.push({ + type: "vertical-stack", + cards: miscellaneousCards, + }); + } + } + // Return cards. + return { + cards: viewCards, + }; + } +} +customElements.define("ll-strategy-mushroom-strategy", MushroomStrategy); +const version = "v4.0.1"; +console.info("%c Linus Strategy %c ".concat(version, " "), "color: white; background: coral; font-weight: 700;", "color: coral; background: white; font-weight: 700;"); + + +/***/ }), + +/***/ "./src/popups/AbstractPopup.ts": +/*!*************************************!*\ + !*** ./src/popups/AbstractPopup.ts ***! + \*************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AbstractPopup: () => (/* binding */ AbstractPopup) +/* harmony export */ }); +/* harmony import */ var _Helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Helper */ "./src/Helper.ts"); + +/** + * Abstract Popup class. + * + * To create a new Popup, extend this one. + * + * @class + * @abstract + */ +class AbstractPopup { + /** + * Class Constructor. + */ + constructor() { + /** + * Configuration of the Popup. + * + * @type {PopupActionConfig} + */ + this.config = { + action: "fire-dom-event", + browser_mod: {} + }; + if (!_Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.isInitialized()) { + throw new Error("The Helper module must be initialized before using this one."); + } + } + // noinspection JSUnusedGlobalSymbols Method is called on dymanically imported classes. + /** + * Get the Popup. + * + * @returns {PopupActionConfig} A Popup. + */ + getPopup() { + return this.config; + } +} + + + +/***/ }), + +/***/ "./src/popups/AggregateAreaListPopup.ts": +/*!**********************************************!*\ + !*** ./src/popups/AggregateAreaListPopup.ts ***! + \**********************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AggregateAreaListPopup: () => (/* binding */ AggregateAreaListPopup) +/* harmony export */ }); +/* harmony import */ var _Helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Helper */ "./src/Helper.ts"); +/* harmony import */ var _AbstractPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AbstractPopup */ "./src/popups/AbstractPopup.ts"); + + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Light Chip class. + * + * Used to create a chip to indicate how many lights are on and to turn all off. + */ +class AggregateAreaListPopup extends _AbstractPopup__WEBPACK_IMPORTED_MODULE_1__.AbstractPopup { + getDefaultConfig(aggregate_entity, deviceClass, is_binary_sensor) { + const groupedCards = []; + let areaCards = []; + for (const [i, entity_id] of aggregate_entity.attributes.entity_id?.entries() ?? []) { + // Get a card for the area. + if (entity_id) { + areaCards.push({ + type: "tile", + entity: entity_id, + // primary: area.name, + state_content: is_binary_sensor ? 'last-changed' : 'state', + color: is_binary_sensor ? 'red' : false, + // badge_icon: "mdi:numeric-9", + // badge_color: "red", + }); + } + // Horizontally group every two area cards if all cards are created. + if (i === aggregate_entity.attributes.entity_id.length - 1) { + for (let i = 0; i < areaCards.length; i += 2) { + groupedCards.push({ + type: "horizontal-stack", + cards: areaCards.slice(i, i + 2), + }); + } + } + } + return { + "action": "fire-dom-event", + "browser_mod": { + "service": "browser_mod.popup", + "data": { + "title": aggregate_entity?.attributes?.friendly_name, + "content": { + "type": "vertical-stack", + "cards": [ + { + type: "custom:mushroom-entity-card", + entity: aggregate_entity.entity_id, + color: is_binary_sensor ? 'red' : false, + secondary_info: is_binary_sensor ? 'last-changed' : 'state', + }, + { + "type": "history-graph", + "hours_to_show": 10, + "show_names": false, + "entities": [ + { + "entity": aggregate_entity.entity_id, + "name": " " + } + ] + }, + ...groupedCards, + ] + } + } + } + }; + } + /** + * Class Constructor. + * + * @param {chips.PopupActionConfig} options The chip options. + */ + constructor(entity_id, type) { + super(); + const aggregate_entity = _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.getEntityState(entity_id); + if (aggregate_entity) { + const is_binary_sensor = ["motion", "window", "door", "health"].includes(type); + const defaultConfig = this.getDefaultConfig(aggregate_entity, type, is_binary_sensor); + this.config = Object.assign(this.config, defaultConfig); + } + } +} + + + +/***/ }), + +/***/ "./src/popups/AggregateListPopup.ts": +/*!******************************************!*\ + !*** ./src/popups/AggregateListPopup.ts ***! + \******************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AggregateListPopup: () => (/* binding */ AggregateListPopup) +/* harmony export */ }); +/* harmony import */ var _Helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Helper */ "./src/Helper.ts"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ "./src/utils.ts"); +/* harmony import */ var _AbstractPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AbstractPopup */ "./src/popups/AbstractPopup.ts"); + + + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Light Chip class. + * + * Used to create a chip to indicate how many lights are on and to turn all off. + */ +class AggregateListPopup extends _AbstractPopup__WEBPACK_IMPORTED_MODULE_2__.AbstractPopup { + getDefaultConfig(aggregate_entity, deviceClass, is_binary_sensor) { + const groupedCards = []; + const areasByFloor = (0,_utils__WEBPACK_IMPORTED_MODULE_1__.groupBy)(_Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.areas, (e) => e.floor_id ?? "undisclosed"); + for (const floor of [..._Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.floors, _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.strategyOptions.floors.undisclosed]) { + if (!(floor.floor_id in areasByFloor) || areasByFloor[floor.floor_id].length === 0) + continue; + groupedCards.push({ + type: "custom:mushroom-title-card", + subtitle: floor.name, + card_mod: { + style: ` + ha-card.header { + padding-top: 8px; + } + `, + } + }); + let areaCards = []; + for (const [i, area] of areasByFloor[floor.floor_id].entries()) { + const entity = _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.magicAreasDevices[area.name]?.entities[`aggregate_${aggregate_entity.attributes?.device_class}`]; + // Get a card for the area. + if (entity && !_Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.strategyOptions.areas[area.area_id]?.hidden) { + areaCards.push({ + type: "tile", + entity: entity?.entity_id, + primary: area.name, + state_content: is_binary_sensor ? 'last-changed' : 'state', + color: is_binary_sensor ? 'red' : false, + // badge_icon: "mdi:numeric-9", + // badge_color: "red", + }); + } + // Horizontally group every two area cards if all cards are created. + if (i === areasByFloor[floor.floor_id].length - 1) { + for (let i = 0; i < areaCards.length; i += 2) { + groupedCards.push({ + type: "horizontal-stack", + cards: areaCards.slice(i, i + 2), + }); + } + } + } + if (areaCards.length === 0) + groupedCards.pop(); + } + return { + "action": "fire-dom-event", + "browser_mod": { + "service": "browser_mod.popup", + "data": { + "title": aggregate_entity?.attributes?.friendly_name, + "content": { + "type": "vertical-stack", + "cards": [ + { + type: "custom:mushroom-entity-card", + entity: aggregate_entity.entity_id, + color: is_binary_sensor ? 'red' : false, + secondary_info: is_binary_sensor ? 'last-changed' : 'state', + }, + { + "type": "history-graph", + "hours_to_show": 10, + "show_names": false, + "entities": [ + { + "entity": aggregate_entity.entity_id, + "name": " " + } + ] + }, + ...groupedCards, + ] + } + } + } + }; + } + /** + * Class Constructor. + * + * @param {chips.PopupActionConfig} options The chip options. + */ + constructor(entity_id, type) { + super(); + const aggregate_entity = _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.getEntityState(entity_id); + if (aggregate_entity) { + const is_binary_sensor = ["motion", "window", "door", "health"].includes(type); + const defaultConfig = this.getDefaultConfig(aggregate_entity, type, is_binary_sensor); + this.config = Object.assign(this.config, defaultConfig); + } + } +} + + + +/***/ }), + +/***/ "./src/popups/AreaInformationsPopup.ts": +/*!*********************************************!*\ + !*** ./src/popups/AreaInformationsPopup.ts ***! + \*********************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AreaInformations: () => (/* binding */ AreaInformations) +/* harmony export */ }); +/* harmony import */ var _Helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Helper */ "./src/Helper.ts"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ "./src/utils.ts"); +/* harmony import */ var _AbstractPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AbstractPopup */ "./src/popups/AbstractPopup.ts"); + + + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Light Chip class. + * + * Used to create a chip to indicate how many lights are on and to turn all off. + */ +class AreaInformations extends _AbstractPopup__WEBPACK_IMPORTED_MODULE_2__.AbstractPopup { + getDefaultConfig(device, minimalist) { + const { area_state } = device.entities; + const { friendly_name, adjoining_areas, features, states, presence_sensors, on_states } = _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.getEntityState(area_state?.entity_id)?.attributes; + presence_sensors?.sort((a, b) => { + const aState = _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.getEntityState(a); + const bState = _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.getEntityState(b); + const lastChangeA = new Date(aState?.last_changed).getTime(); + const lastChangeB = new Date(bState?.last_changed).getTime(); + if (a === `switch.magic_areas_presence_hold_${(0,_utils__WEBPACK_IMPORTED_MODULE_1__.slugify)(device.name)}`) { + return -1; + } + else if (b === `switch.magic_areas_presence_hold_${(0,_utils__WEBPACK_IMPORTED_MODULE_1__.slugify)(device.name)}`) { + return 1; + } + else { + return lastChangeB - lastChangeA; + } + }); + return { + action: "fire-dom-event", + browser_mod: { + service: "browser_mod.popup", + data: { + title: friendly_name, + content: { + type: "vertical-stack", + cards: [ + { + type: "horizontal-stack", + cards: [ + { + type: "custom:mushroom-entity-card", + entity: area_state?.entity_id, + name: "Présence", + secondary_info: "last-changed", + color: "red", + tap_action: device.id ? { + action: "fire-dom-event", + browser_mod: { + service: "browser_mod.sequence", + data: { + sequence: [ + { + service: "browser_mod.close_popup", + data: {} + }, + { + service: "browser_mod.navigate", + data: { path: `/config/devices/device/${device.id}` } + } + ] + } + } + } : "more-info" + }, + { + type: "custom:mushroom-template-card", + primary: "Recharger la pièce", + icon: "mdi:refresh", + icon_color: "blue", + tap_action: { + action: "call-service", + service: `homeassistant.reload_config_entry`, + target: { "device_id": device.id }, + } + }, + ] + }, + // { + // type: "horizontal-stack", + // cards: [ + // { + // type: "custom:mushroom-chips-card", + // alignment: "end", + // chips: currentStateChip(states), + // }, + // ] + // }, + ...(!minimalist ? [ + { + type: "custom:mushroom-template-card", + primary: `Configuration de la pièce :`, + card_mod: { + style: `ha-card {padding: 4px 12px!important;}` + } + }, + { + type: "custom:mushroom-chips-card", + chips: [ + { + type: "template", + entity: area_state?.entity_id, + content: `Type : {{ state_attr('${area_state?.entity_id}', 'type') }}`, + icon: ` + {% set type = state_attr('${area_state?.entity_id}', 'type') %} + {% if type == "interior" %} + mdi:home-import-outline + {% elif type == "exterior" %} + mdi:home-import-outline + {% else %} + mdi:home-alert + {% endif %} + `, + }, + { + type: "template", + entity: area_state?.entity_id, + content: `Étage : {{ state_attr('${area_state?.entity_id}', 'floor') }}`, + icon: ` + {% set floor = state_attr('${area_state?.entity_id}', 'floor') %} + {% if floor == "third" %} + mdi:home-floor-3 + {% elif floor == "second" %} + mdi:home-floor-2 + {% elif floor == "first" %} + mdi:home-floor-1 + {% elif floor == "ground" %} + mdi:home-floor-g + {% elif floor == "basement" %} + mdi:home-floor-b + {% else %} + mdi:home-alert + {% endif %} + `, + }, + { + type: "template", + entity: area_state?.entity_id, + content: `Délai pièce vide : {{ state_attr('${area_state?.entity_id}', 'clear_timeout') }}s`, + icon: `mdi:camera-timer`, + }, + { + type: "template", + entity: area_state?.entity_id, + content: `Interval mise à jour : {{ state_attr('${area_state?.entity_id}', 'update_interval') }}s`, + icon: `mdi:update`, + }, + { + type: "template", + entity: area_state?.entity_id, + content: `Pièces adjacentes : ${adjoining_areas?.length ? adjoining_areas.join(' ') : 'Non défini'}`, + icon: `mdi:view-dashboard-variant`, + }, + ], + card_mod: { + style: `ha-card .chip-container * {margin-bottom: 0px!important;}` + } + } + ] : []), + { + type: "custom:mushroom-template-card", + primary: `Capteurs utilisé pour la détection de présence :`, + card_mod: { + style: `ha-card {padding: 4px 12px!important;}` + } + }, + (minimalist ? { + type: "vertical-stack", + cards: presence_sensors?.map((sensor) => ({ + type: "custom:mushroom-entity-card", + entity: sensor, + content_info: "name", + secondary_info: "last-changed", + icon_color: sensor.includes('media_player.') ? "blue" : "red", + })) + } : + { + type: "custom:mushroom-chips-card", + chips: presence_sensors?.map((sensor) => ({ + type: "entity", + entity: sensor, + content_info: "name", + icon_color: sensor.includes('media_player.') ? "blue" : "red", + tap_action: { + action: "more-info" + } + })), + card_mod: { + style: `ha-card .chip-container * {margin-bottom: 0px!important;}` + } + }), + ...(!minimalist ? [ + { + type: "custom:mushroom-template-card", + primary: `Présence détecté pour les états :`, + card_mod: { + style: `ha-card {padding: 4px 12px!important;}` + } + }, + { + type: "custom:mushroom-chips-card", + chips: on_states?.map((sensor) => ({ + type: "template", + content: sensor, + })), + card_mod: { + style: `ha-card .chip-container * {margin-bottom: 0px!important;}` + } + }, + { + type: "custom:mushroom-template-card", + primary: `Fonctionnalitées disponibles :`, + card_mod: { + style: `ha-card {padding: 4px 12px!important;}` + } + }, + { + type: "custom:mushroom-chips-card", + chips: features?.map((sensor) => ({ + type: "template", + content: sensor, + })), + card_mod: { + style: `ha-card .chip-container * {margin-bottom: 0px!important;}` + } + }, + ] : []) + ].filter(Boolean) + } + } + } + }; + } + /** + * Class Constructor. + * + * @param {chips.PopupActionConfig} options The chip options. + */ + constructor(device, minimalist = false) { + super(); + const defaultConfig = this.getDefaultConfig(device, minimalist); + this.config = Object.assign(this.config, defaultConfig); + } +} + + + +/***/ }), + +/***/ "./src/popups/GroupListPopup.ts": +/*!**************************************!*\ + !*** ./src/popups/GroupListPopup.ts ***! + \**************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ GroupListPopup: () => (/* binding */ GroupListPopup) +/* harmony export */ }); +/* harmony import */ var _Helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Helper */ "./src/Helper.ts"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ "./src/utils.ts"); +/* harmony import */ var _AbstractPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AbstractPopup */ "./src/popups/AbstractPopup.ts"); + + + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Light Chip class. + * + * Used to create a chip to indicate how many lights are on and to turn all off. + */ +class GroupListPopup extends _AbstractPopup__WEBPACK_IMPORTED_MODULE_2__.AbstractPopup { + getDefaultConfig(entities, title) { + const entitiesByArea = (0,_utils__WEBPACK_IMPORTED_MODULE_1__.groupBy)(entities, (e) => e.area_id ?? "undisclosed"); + return { + "action": "fire-dom-event", + "browser_mod": { + "service": "browser_mod.popup", + "data": { + "title": title, + "content": { + "type": "vertical-stack", + "cards": Object.entries(entitiesByArea).map(([area_id, entities]) => ([ + { + type: "markdown", + content: `${_Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.areas.find(a => a.area_id === area_id)?.name}`, + }, + { + type: "custom:layout-card", + layout_type: "custom:horizontal-layout", + layout: { + width: 150, + }, + cards: entities?.map((entity) => ({ + type: "custom:mushroom-entity-card", + vertical: true, + entity: entity.entity_id, + secondary_info: 'last-changed', + })), + } + ])).flat() + } + } + } + }; + } + /** + * Class Constructor. + * + * @param {EntityRegistryEntry[]} entities The chip entities. + * @param {string} title The chip title. + */ + constructor(entities, title) { + super(); + const defaultConfig = this.getDefaultConfig(entities, title); + this.config = Object.assign(this.config, defaultConfig); + } +} + + + +/***/ }), + +/***/ "./src/popups/LightSettingsPopup.ts": +/*!******************************************!*\ + !*** ./src/popups/LightSettingsPopup.ts ***! + \******************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ LightSettings: () => (/* binding */ LightSettings) +/* harmony export */ }); +/* harmony import */ var _Helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Helper */ "./src/Helper.ts"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils */ "./src/utils.ts"); +/* harmony import */ var _variables__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../variables */ "./src/variables.ts"); +/* harmony import */ var _AbstractPopup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./AbstractPopup */ "./src/popups/AbstractPopup.ts"); + + + + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Light Chip class. + * + * Used to create a chip to indicate how many lights are on and to turn all off. + */ +class LightSettings extends _AbstractPopup__WEBPACK_IMPORTED_MODULE_3__.AbstractPopup { + getDefaultConfig(device) { + const { aggregate_illuminance, adaptive_lighting_range, minimum_brightness, maximum_brightness, maximum_lighting_level } = device.entities; + const device_slug = (0,_utils__WEBPACK_IMPORTED_MODULE_1__.slugify)(device.name); + const OPTIONS_ADAPTIVE_LIGHTING_RANGE = { + "": 1, + "Small": 10, + "Medium": 25, + "Large": 50, + "Extra large": 100, + }; + const adaptive_lighting_range_state = _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.getEntityState(adaptive_lighting_range?.entity_id).state; + return { + action: "fire-dom-event", + browser_mod: { + service: "browser_mod.popup", + data: { + title: "Configurer l'éclairage adaptatif", + content: { + type: "vertical-stack", + cards: [ + { + type: "horizontal-stack", + cards: [ + { + type: "tile", + entity: `switch.adaptive_lighting_${device_slug}`, + vertical: "true", + }, + { + type: "tile", + entity: `switch.adaptive_lighting_adapt_brightness_${device_slug}`, + vertical: "true", + }, + { + type: "tile", + entity: `switch.adaptive_lighting_adapt_color_${device_slug}`, + vertical: "true", + }, + { + type: "tile", + entity: `switch.adaptive_lighting_sleep_mode_${device_slug}`, + vertical: "true", + } + ] + }, + { + type: "custom:mushroom-select-card", + entity: adaptive_lighting_range?.entity_id, + secondary_info: "last-changed", + icon_color: "blue", + }, + { + type: "horizontal-stack", + cards: [ + { + type: "custom:mushroom-number-card", + entity: maximum_lighting_level?.entity_id, + icon_color: "red", + card_mod: { + style: ` + :host { + --mush-control-height: 20px; + } + ` + } + }, + { + type: "custom:mushroom-template-card", + primary: "Utiliser la valeur actuelle", + icon: "mdi:pencil", + layout: "vertical", + tap_action: { + action: "call-service", + service: `${_variables__WEBPACK_IMPORTED_MODULE_2__.DOMAIN}.area_lux_for_lighting_max`, + data: { + area: device.name + } + }, + }, + ], + }, + { + type: "custom:mushroom-number-card", + entity: minimum_brightness?.entity_id, + icon_color: "green", + card_mod: { + style: ":host {--mush-control-height: 10px;}" + } + }, + { + type: "custom:mushroom-number-card", + entity: maximum_brightness?.entity_id, + icon_color: "green", + card_mod: { + style: ":host {--mush-control-height: 10px;}" + } + }, + { + type: "custom:apexcharts-card", + graph_span: "15h", + header: { + show: true, + title: "Luminosité en fonction du temps", + show_states: true, + colorize_states: true + }, + yaxis: [ + { + id: "illuminance", + min: 0, + apex_config: { + tickAmount: 4 + } + }, + { + id: "brightness", + opposite: true, + min: 0, + max: 100, + apex_config: { + tickAmount: 4 + } + } + ], + series: [ + (aggregate_illuminance?.entity_id ? { + entity: aggregate_illuminance?.entity_id, + yaxis_id: "illuminance", + color: "orange", + name: "Luminosité ambiante (lx)", + type: "line", + group_by: { + func: "last", + duration: "30m" + } + } : undefined), + { + entity: adaptive_lighting_range?.entity_id, + type: "area", + yaxis_id: "illuminance", + show: { + in_header: false + }, + color: "blue", + name: "Zone d'éclairage adaptatif", + unit: "lx", + transform: `return parseInt(hass.states['${maximum_lighting_level?.entity_id}'].state) + ${OPTIONS_ADAPTIVE_LIGHTING_RANGE[adaptive_lighting_range_state]};`, + group_by: { + func: "last", + } + }, + { + entity: maximum_lighting_level?.entity_id, + type: "area", + yaxis_id: "illuminance", + name: "Zone d'éclairage à 100%", + color: "red", + show: { + in_header: false + }, + group_by: { + func: "last", + } + }, + ].filter(Boolean) + }, + ] + } + } + } + }; + } + /** + * Class Constructor. + * + * @param {PopupActionConfig} options The chip options. + */ + constructor(device) { + super(); + const defaultConfig = this.getDefaultConfig(device); + this.config = Object.assign(this.config, defaultConfig); + } +} + + + +/***/ }), + +/***/ "./src/popups/LinusSettingsPopup.ts": +/*!******************************************!*\ + !*** ./src/popups/LinusSettingsPopup.ts ***! + \******************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ LinusSettings: () => (/* binding */ LinusSettings) +/* harmony export */ }); +/* harmony import */ var _Helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Helper */ "./src/Helper.ts"); +/* harmony import */ var _mushroom_strategy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../mushroom-strategy */ "./src/mushroom-strategy.ts"); +/* harmony import */ var _AbstractPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AbstractPopup */ "./src/popups/AbstractPopup.ts"); + + + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Linus Chip class. + * + * Used to create a chip to indicate how many lights are on and to turn all off. + */ +class LinusSettings extends _AbstractPopup__WEBPACK_IMPORTED_MODULE_2__.AbstractPopup { + getDefaultConfig() { + const linusDeviceIds = Object.values(_Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.magicAreasDevices).map((area) => area?.id).flat(); + return { + action: "fire-dom-event", + browser_mod: { + service: "browser_mod.popup", + data: { + title: "Paramètre de Linus", + content: { + type: "vertical-stack", + cards: [ + { + type: "horizontal-stack", + cards: [ + { + type: "custom:mushroom-template-card", + primary: "Recharger Linus", + icon: "mdi:refresh", + icon_color: "blue", + tap_action: { + action: "call-service", + service: `homeassistant.reload_config_entry`, + target: { "device_id": linusDeviceIds }, + } + }, + { + type: "custom:mushroom-template-card", + primary: "Redémarrer Linus", + icon: "mdi:restart", + icon_color: "red", + tap_action: { + action: "call-service", + service: "homeassistant.restart", + } + }, + ] + }, + { + type: "markdown", + content: `Linus est en version ${_mushroom_strategy__WEBPACK_IMPORTED_MODULE_1__.version}.`, + }, + ].filter(Boolean) + } + } + } + }; + } + /** + * Class Constructor. + * + * @param {chips.PopupActionConfig} options The chip options. + */ + constructor() { + super(); + const defaultConfig = this.getDefaultConfig(); + this.config = Object.assign(this.config, defaultConfig); + } +} + + + +/***/ }), + +/***/ "./src/popups/SceneSettingsPopup.ts": +/*!******************************************!*\ + !*** ./src/popups/SceneSettingsPopup.ts ***! + \******************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ SceneSettings: () => (/* binding */ SceneSettings) +/* harmony export */ }); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils */ "./src/utils.ts"); +/* harmony import */ var _variables__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../variables */ "./src/variables.ts"); +/* harmony import */ var _AbstractPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AbstractPopup */ "./src/popups/AbstractPopup.ts"); + + + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Scene Chip class. + * + * Used to create a chip to indicate how many lights are on and to turn all off. + */ +class SceneSettings extends _AbstractPopup__WEBPACK_IMPORTED_MODULE_2__.AbstractPopup { + getDefaultConfig(device) { + const { scene_morning, scene_daytime, scene_evening, scene_night } = device.entities; + const selectControl = [scene_morning, scene_daytime, scene_evening, scene_night].filter(Boolean); + return { + action: "fire-dom-event", + browser_mod: { + service: "browser_mod.popup", + data: { + title: "Configurer les scènes", + content: { + type: "vertical-stack", + cards: [ + ...(selectControl.length ? _variables__WEBPACK_IMPORTED_MODULE_1__.todOrder.map(tod => ({ + type: "custom:config-template-card", + variables: { + SCENE_STATE: `states['${device.entities[('scene_' + tod)]?.entity_id}'].state` + }, + entities: [device.entities[('scene_' + tod)]?.entity_id], + card: { + type: "horizontal-stack", + cards: [ + { + type: "entities", + entities: [device.entities[('scene_' + tod)]?.entity_id] + }, + { + type: "conditional", + conditions: [ + { + entity: "${SCENE_STATE}", + state: "on" + }, + // { + // entity: "${SCENE_STATE}", + // state: "off" + // } + ], + card: { + type: "tile", + entity: "${SCENE_STATE}", + show_entity_picture: true, + tap_action: { + action: "toggle" + }, + } + }, + { + type: "conditional", + conditions: [ + { + entity: "${SCENE_STATE}", + state: "unavailable" + }, + // { + // entity: "${SCENE_STATE}", + // state: "off" + // } + ], + card: { + type: "custom:mushroom-template-card", + secondary: "Utiliser l'éclairage actuel", + multiline_secondary: true, + icon: "mdi:pencil", + layout: "vertical", + tap_action: { + action: "call-service", + service: `${_variables__WEBPACK_IMPORTED_MODULE_1__.DOMAIN}.snapshot_lights_as_tod_scene`, + data: { + area: (0,_utils__WEBPACK_IMPORTED_MODULE_0__.slugify)(device.name), + tod + } + }, + }, + } + ] + } + })) : [{ + type: "custom:mushroom-template-card", + primary: "Ajouter une nouvelle scène", + secondary: `Cliquer ici pour vous rendre sur la page des scènes`, + multiline_secondary: true, + icon: `mdi:palette`, + tap_action: { + action: "fire-dom-event", + browser_mod: { + service: "browser_mod.sequence", + data: { + sequence: [ + { + service: "browser_mod.navigate", + data: { path: `/config/scene/dashboard` } + }, + { + service: "browser_mod.close_popup", + data: {} + } + ] + } + } + }, + card_mod: { + style: ` + ha-card { + box-shadow: none!important; + } + ` + } + }]) + ].filter(Boolean) + } + } + } + }; + } + /** + * Class Constructor. + * + * @param {chips.PopupActionConfig} options The chip options. + */ + constructor(device) { + super(); + const defaultConfig = this.getDefaultConfig(device); + this.config = Object.assign(this.config, defaultConfig); + } +} + + + +/***/ }), + +/***/ "./src/popups/WeatherPopup.ts": +/*!************************************!*\ + !*** ./src/popups/WeatherPopup.ts ***! + \************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ WeatherPopup: () => (/* binding */ WeatherPopup) +/* harmony export */ }); +/* harmony import */ var _AbstractPopup__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AbstractPopup */ "./src/popups/AbstractPopup.ts"); + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Weather Chip class. + * + * Used to create a chip to indicate how many Weathers are on and to turn all off. + */ +class WeatherPopup extends _AbstractPopup__WEBPACK_IMPORTED_MODULE_0__.AbstractPopup { + getDefaultConfig(entityId) { + return { + action: "fire-dom-event", + browser_mod: { + service: "browser_mod.popup", + data: { + title: "Météo", + content: { + type: "vertical-stack", + cards: [ + { + type: "weather-forecast", + entity: entityId, + show_current: true, + show_forecast: true + }, + ] + } + } + } + }; + } + /** + * Class Constructor. + * + * @param {chips.PopupActionConfig} options The chip options. + */ + constructor(entity_id) { + super(); + this.config = Object.assign(this.config, this.getDefaultConfig(entity_id)); + } +} + + + +/***/ }), + +/***/ "./src/types/lovelace-mushroom/cards/vacuum-card-config.ts": +/*!*****************************************************************!*\ + !*** ./src/types/lovelace-mushroom/cards/vacuum-card-config.ts ***! + \*****************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ VACUUM_COMMANDS: () => (/* binding */ VACUUM_COMMANDS) +/* harmony export */ }); +const VACUUM_COMMANDS = [ + "on_off", + "start_pause", + "stop", + "locate", + "clean_spot", + "return_home", +]; + + +/***/ }), + +/***/ "./src/types/strategy/generic.ts": +/*!***************************************!*\ + !*** ./src/types/strategy/generic.ts ***! + \***************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ generic: () => (/* binding */ generic) +/* harmony export */ }); +var generic; +(function (generic) { + const hiddenSectionList = ["chips", "persons", "greeting", "areas", "areasTitle"]; + /** + * Checks if the given object is an instance of CallServiceActionConfig. + * + * @param {any} obj - The object to be checked. + * @return {boolean} - Returns true if the object is an instance of CallServiceActionConfig, otherwise false. + */ + function isCallServiceActionConfig(obj) { + return obj && obj.action === "call-service" && ["action", "service"].every(key => key in obj); + } + generic.isCallServiceActionConfig = isCallServiceActionConfig; + /** + * Checks if the given object is an instance of HassServiceTarget. + * + * @param {any} obj - The object to check. + * @return {boolean} - True if the object is an instance of HassServiceTarget, false otherwise. + */ + function isCallServiceActionTarget(obj) { + return obj && ["entity_id", "device_id", "area_id"].some(key => key in obj); + } + generic.isCallServiceActionTarget = isCallServiceActionTarget; +})(generic || (generic = {})); + + +/***/ }), + +/***/ "./src/utils.ts": +/*!**********************!*\ + !*** ./src/utils.ts ***! + \**********************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ getAggregateEntity: () => (/* binding */ getAggregateEntity), +/* harmony export */ getStateContent: () => (/* binding */ getStateContent), +/* harmony export */ groupBy: () => (/* binding */ groupBy), +/* harmony export */ navigateTo: () => (/* binding */ navigateTo), +/* harmony export */ slugify: () => (/* binding */ slugify) +/* harmony export */ }); +/* harmony import */ var _variables__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./variables */ "./src/variables.ts"); + +/** + * Groups the elements of an array based on a provided function + * @param {T[]} array - The array to group + * @param {(item: T) => K} fn - The function to determine the group key for each element + * @returns {Record} - An object where the keys are the group identifiers and the values are arrays of grouped elements + */ +function groupBy(array, fn) { + return array.reduce((result, item) => { + // Determine the group key for the current item + const key = fn(item); + // If the group key does not exist in the result, create an array for it + if (!result[key]) { + result[key] = []; + } + // Add the current item to the group + result[key].push(item); + return result; + }, {}); +} +function slugify(name) { + if (name === null) { + return ""; + } + return name.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/\s+/g, "_"); +} +function getStateContent(entity_id) { + return entity_id.startsWith('binary_sensor.') ? 'last-changed' : 'state'; +} +function navigateTo(path) { + return { + action: "navigate", + navigation_path: `/dashboard/${path}`, + }; +} +function getAggregateEntity(device, domains, deviceClasses) { + const aggregateKeys = []; + for (const domain of Array.isArray(domains) ? domains : [domains]) { + if (domain === "light") { + Object.values(device.entities)?.map(entity => { + if (entity.entity_id.endsWith('_lights')) { + aggregateKeys.push(entity); + } + }); + } + if (_variables__WEBPACK_IMPORTED_MODULE_0__.MAGIC_AREAS_GROUP_DOMAINS.includes(domain)) { + aggregateKeys.push(device.entities[`${domain}_group`]); + } + if (_variables__WEBPACK_IMPORTED_MODULE_0__.MAGIC_AREAS_AGGREGATE_DOMAINS.includes(domain)) { + for (const deviceClass of Array.isArray(deviceClasses) ? deviceClasses : [deviceClasses]) { + aggregateKeys.push(device.entities[`aggregate_${deviceClass}`]); + } + } + } + return aggregateKeys.filter(Boolean); +} + + +/***/ }), + +/***/ "./src/variables.ts": +/*!**************************!*\ + !*** ./src/variables.ts ***! + \**************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ ALARM_ICONS: () => (/* binding */ ALARM_ICONS), +/* harmony export */ ALERT_DOMAINS: () => (/* binding */ ALERT_DOMAINS), +/* harmony export */ AREA_CARDS_DOMAINS: () => (/* binding */ AREA_CARDS_DOMAINS), +/* harmony export */ AREA_CARD_SENSORS_CLASS: () => (/* binding */ AREA_CARD_SENSORS_CLASS), +/* harmony export */ AREA_STATE_ICONS: () => (/* binding */ AREA_STATE_ICONS), +/* harmony export */ CLIMATE_DOMAINS: () => (/* binding */ CLIMATE_DOMAINS), +/* harmony export */ CLIMATE_PRESET_ICONS: () => (/* binding */ CLIMATE_PRESET_ICONS), +/* harmony export */ DEVICE_CLASSES: () => (/* binding */ DEVICE_CLASSES), +/* harmony export */ DEVICE_ICONS: () => (/* binding */ DEVICE_ICONS), +/* harmony export */ DOMAIN: () => (/* binding */ DOMAIN), +/* harmony export */ DOMAIN_ICONS: () => (/* binding */ DOMAIN_ICONS), +/* harmony export */ DOMAIN_STATE_ICONS: () => (/* binding */ DOMAIN_STATE_ICONS), +/* harmony export */ HOUSE_INFORMATION_DOMAINS: () => (/* binding */ HOUSE_INFORMATION_DOMAINS), +/* harmony export */ MAGIC_AREAS_AGGREGATE_DOMAINS: () => (/* binding */ MAGIC_AREAS_AGGREGATE_DOMAINS), +/* harmony export */ MAGIC_AREAS_DOMAINS: () => (/* binding */ MAGIC_AREAS_DOMAINS), +/* harmony export */ MAGIC_AREAS_GROUP_DOMAINS: () => (/* binding */ MAGIC_AREAS_GROUP_DOMAINS), +/* harmony export */ MAGIC_AREAS_LIGHT_DOMAINS: () => (/* binding */ MAGIC_AREAS_LIGHT_DOMAINS), +/* harmony export */ OTHER_DOMAINS: () => (/* binding */ OTHER_DOMAINS), +/* harmony export */ SENSOR_DOMAINS: () => (/* binding */ SENSOR_DOMAINS), +/* harmony export */ STATES_OFF: () => (/* binding */ STATES_OFF), +/* harmony export */ SUPPORTED_CARDS_WITH_ENTITY: () => (/* binding */ SUPPORTED_CARDS_WITH_ENTITY), +/* harmony export */ TOGGLE_DOMAINS: () => (/* binding */ TOGGLE_DOMAINS), +/* harmony export */ UNAVAILABLE: () => (/* binding */ UNAVAILABLE), +/* harmony export */ UNAVAILABLE_STATES: () => (/* binding */ UNAVAILABLE_STATES), +/* harmony export */ UNKNOWN: () => (/* binding */ UNKNOWN), +/* harmony export */ WEATHER_ICONS: () => (/* binding */ WEATHER_ICONS), +/* harmony export */ todOrder: () => (/* binding */ todOrder) +/* harmony export */ }); +const DOMAIN = "magic_areas"; +const WEATHER_ICONS = { + "clear-night": "mdi:weather-night", + cloudy: "mdi:weather-cloudy", + overcast: "mdi:weather-cloudy-arrow-right", + fog: "mdi:weather-fog", + hail: "mdi:weather-hail", + lightning: "mdi:weather-lightning", + "lightning-rainy": "mdi:weather-lightning-rainy", + partlycloudy: "mdi:weather-partly-cloudy", + pouring: "mdi:weather-pouring", + rainy: "mdi:weather-rainy", + snowy: "mdi:weather-snowy", + "snowy-rainy": "mdi:weather-snowy-rainy", + sunny: "mdi:weather-sunny", + windy: "mdi:weather-windy", + "windy-variant": "mdi:weather-windy-variant", +}; +const ALARM_ICONS = { + "armed_away": "mdi:shield-lock", + "armed_vacation": "mdi:shield-airplane", + "armed_home": "mdi:shield-home", + "armed_night": "mdi:shield-moon", + "armed_custom_bypass": "mdi:security", + "pending": "mdi:shield-outline", + "triggered": "mdi:bell-ring", + disarmed: "mdi:shield-off", +}; +const UNAVAILABLE = "unavailable"; +const UNKNOWN = "unknown"; +const todOrder = ["morning", "daytime", "evening", "night"]; +const STATES_OFF = ["closed", "locked", "off", "docked", "idle", "standby", "paused", "auto", "ok"]; +const UNAVAILABLE_STATES = ["unavailable", "unknown"]; +const MAGIC_AREAS_LIGHT_DOMAINS = "light"; +const MAGIC_AREAS_GROUP_DOMAINS = ["cover", "climate", "media_player"]; +const MAGIC_AREAS_AGGREGATE_DOMAINS = ["binary_sensor", "sensor"]; +const MAGIC_AREAS_DOMAINS = [MAGIC_AREAS_LIGHT_DOMAINS, ...MAGIC_AREAS_GROUP_DOMAINS, ...MAGIC_AREAS_AGGREGATE_DOMAINS]; +const SENSOR_DOMAINS = ["sensor"]; +const ALERT_DOMAINS = ["binary_sensor", "health"]; +const TOGGLE_DOMAINS = ["light", "switch"]; +const CLIMATE_DOMAINS = ["climate", "fan"]; +const HOUSE_INFORMATION_DOMAINS = ["camera", "cover", "vacuum", "media_player", "lock", "plant"]; +const OTHER_DOMAINS = ["camera", "cover", "vacuum", "media_player", "lock", "scene", "plant"]; +const AREA_CARDS_DOMAINS = [...TOGGLE_DOMAINS, ...CLIMATE_DOMAINS, ...OTHER_DOMAINS, "binary_sensor", "sensor"]; +const DEVICE_CLASSES = { + sensor: ["illuminance", "temperature", "humidity", "battery", "energy", "power"], + binary_sensor: ["motion", "door", "window", "vibration", "moisture", "smoke"], +}; +const AREA_CARD_SENSORS_CLASS = ["temperature"]; +const DEVICE_ICONS = { + presence_hold: 'mdi:car-brake-hold' +}; +const DOMAIN_STATE_ICONS = { + light: { on: "mdi:lightbulb", off: "mdi:lightbulb-outline" }, + switch: { on: "mdi:power-plug", off: "mdi:power-plug" }, + fan: { on: "mdi:fan", off: "mdi:fan-off" }, + sensor: { humidity: "mdi:water-percent", temperature: "mdi:thermometer", pressure: "mdi:gauge" }, + binary_sensor: { + motion: { on: "mdi:motion-sensor", off: "mdi:motion-sensor-off" }, + door: { on: "mdi:door-open", off: "mdi:door-closed" }, + window: { on: "mdi:window-open-variant", off: "mdi:window-closed-variant" }, + safety: { on: "mdi:alert-circle", off: "mdi:check-circle" }, + vibration: "mdi:vibrate", + moisture: "mdi:water-alert", + smoke: "mdi:smoke-detector-variant-alert", + }, + vacuum: { on: "mdi:robot-vacuum" }, + media_player: { on: "mdi:cast-connected" }, + lock: { on: "mdi:lock-open" }, + climate: { on: "mdi:thermostat" }, + camera: { on: "mdi:video" }, + cover: { on: "mdi:window-shutter-open", off: "mdi:window-shutter" }, + plant: { on: "mdi:flower", off: "mdi:flower" }, +}; +const DOMAIN_ICONS = { + light: "mdi:lightbulb", + climate: "mdi:thermostat", + switch: "mdi:power-plug", + fan: "mdi:fan", + sensor: "mdi:eye", + humidity: "mdi:water-percent", + pressure: "mdi:gauge", + illuminance: "mdi:brightness-5", + temperature: "mdi:thermometer", + energy: "mdi:lightning-bolt", + power: "mdi:flash", + binary_sensor: "mdi:radiobox-blank", + motion: "mdi:motion-sensor", + door: "mdi:door-open", + window: "mdi:window-open-variant", + vibration: "mdi:vibrate", + moisture: "mdi:water-alert", + vacuum: "mdi:robot-vacuum", + media_player: "mdi:cast-connected", + camera: "mdi:video", + cover: "mdi:window-shutter", + remote: "mdi:remote", + scene: "mdi:palette", + number: "mdi:ray-vertex", + button: "mdi:gesture-tap-button", + water_heater: "mdi:thermometer", + select: "mdi:format-list-bulleted", + lock: "mdi:lock", + device_tracker: "mdi:radar", + person: "mdi:account-multiple", + weather: "mdi:weather-cloudy", + automation: "mdi:robot-outline", + alarm_control_panel: "mdi:shield-home", + plant: 'mdi:flower', + input_boolean: 'mdi:toggle-switch', + health: 'mdi:shield-check-outline', +}; +const SUPPORTED_CARDS_WITH_ENTITY = [ + "button", + "calendar", + "entity", + "gauge", + "history-graph", + "light", + "media-control", + "picture-entity", + "sensor", + "thermostat", + "weather-forecast", + "custom:button-card", + "custom:mushroom-fan-card", + "custom:mushroom-cover-card", + "custom:mushroom-entity-card", + "custom:mushroom-light-card", + "tile", +]; +const AREA_STATE_ICONS = { + occupied: "mdi:account", + extended: "mdi:account-clock", + clear: "mdi:account-off", + bright: "mdi:brightness-2", + dark: "mdi:brightness-5", + sleep: "mdi:bed", +}; +const CLIMATE_PRESET_ICONS = { + away: 'mdi:home', + eco: 'mdi:leaf', + boost: 'mdi:fire', + comfort: 'mdi:sofa', + home: 'mdi:home-account', + sleep: 'mdi:weather-night', + activity: 'mdi:briefcase', +}; + + +/***/ }), + +/***/ "./src/views/AbstractView.ts": +/*!***********************************!*\ + !*** ./src/views/AbstractView.ts ***! + \***********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ AbstractView: () => (/* binding */ AbstractView) +/* harmony export */ }); +/* harmony import */ var _variables__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../variables */ "./src/variables.ts"); +/* harmony import */ var _Helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Helper */ "./src/Helper.ts"); +/* harmony import */ var _cards_ControllerCard__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../cards/ControllerCard */ "./src/cards/ControllerCard.ts"); +/* harmony import */ var _cards_SwipeCard__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../cards/SwipeCard */ "./src/cards/SwipeCard.ts"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils */ "./src/utils.ts"); +/* harmony import */ var _cards_AggregateCard__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../cards/AggregateCard */ "./src/cards/AggregateCard.ts"); +var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; +}; +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _AbstractView_domain; + + + + + + +/** + * Abstract View Class. + * + * To create a new view, extend the new class with this one. + * + * @class + * @abstract + */ +class AbstractView { + /** + * Class constructor. + * + * @param {string} [domain] The domain which the view is representing. + * + * @throws {Error} If trying to instantiate this class. + * @throws {Error} If the Helper module isn't initialized. + */ + constructor(domain = "") { + /** + * Configuration of the view. + * + * @type {LovelaceViewConfig} + */ + this.config = { + icon: "mdi:view-dashboard", + subview: false, + }; + /** + * A card to switch all entities in the view. + * + * @type {StackCardConfig} + */ + this.viewControllerCard = { + cards: [], + type: "", + }; + /** + * The domain of which we operate the devices. + * + * @private + * @readonly + */ + _AbstractView_domain.set(this, void 0); + if (!_Helper__WEBPACK_IMPORTED_MODULE_1__.Helper.isInitialized()) { + throw new Error("The Helper module must be initialized before using this one."); + } + if (domain) { + __classPrivateFieldSet(this, _AbstractView_domain, domain, "f"); + } + } + /** + * Create the cards to include in the view. + * + * @return {Promise<(StackCardConfig | TitleCardConfig)[]>} An array of card objects. + */ + async createViewCards() { + const viewCards = []; + const configEntityHidden = _Helper__WEBPACK_IMPORTED_MODULE_1__.Helper.strategyOptions.domains[__classPrivateFieldGet(this, _AbstractView_domain, "f") ?? "_"].hide_config_entities + || _Helper__WEBPACK_IMPORTED_MODULE_1__.Helper.strategyOptions.domains["_"].hide_config_entities; + if (__classPrivateFieldGet(this, _AbstractView_domain, "f") && _variables__WEBPACK_IMPORTED_MODULE_0__.MAGIC_AREAS_DOMAINS.includes(__classPrivateFieldGet(this, _AbstractView_domain, "f"))) { + viewCards.push(new _cards_AggregateCard__WEBPACK_IMPORTED_MODULE_5__.AggregateCard(__classPrivateFieldGet(this, _AbstractView_domain, "f")).createCard()); + } + const areasByFloor = (0,_utils__WEBPACK_IMPORTED_MODULE_4__.groupBy)(_Helper__WEBPACK_IMPORTED_MODULE_1__.Helper.areas, (e) => e.floor_id ?? "undisclosed"); + for (const floor of [..._Helper__WEBPACK_IMPORTED_MODULE_1__.Helper.floors, _Helper__WEBPACK_IMPORTED_MODULE_1__.Helper.strategyOptions.floors.undisclosed]) { + if (__classPrivateFieldGet(this, _AbstractView_domain, "f") && _variables__WEBPACK_IMPORTED_MODULE_0__.MAGIC_AREAS_DOMAINS.includes(__classPrivateFieldGet(this, _AbstractView_domain, "f")) && floor.floor_id !== "undisclosed") + continue; + if (!(floor.floor_id in areasByFloor) || areasByFloor[floor.floor_id].length === 0) + continue; + let floorCards = []; + if (floor.floor_id !== "undisclosed") { + floorCards.push({ + type: "custom:mushroom-title-card", + title: floor.name, + card_mod: { + style: `ha-card.header {padding-top: 8px;}`, + } + }); + } + let areaCards = []; + // Create cards for each area. + for (const [i, area] of areasByFloor[floor.floor_id].entries()) { + areaCards = []; + if (__classPrivateFieldGet(this, _AbstractView_domain, "f") && _variables__WEBPACK_IMPORTED_MODULE_0__.MAGIC_AREAS_DOMAINS.includes(__classPrivateFieldGet(this, _AbstractView_domain, "f")) && area.area_id !== "undisclosed") + continue; + const entities = _Helper__WEBPACK_IMPORTED_MODULE_1__.Helper.getDeviceEntities(area, __classPrivateFieldGet(this, _AbstractView_domain, "f") ?? ""); + const className = _Helper__WEBPACK_IMPORTED_MODULE_1__.Helper.sanitizeClassName(__classPrivateFieldGet(this, _AbstractView_domain, "f") + "Card"); + const cardModule = await __webpack_require__("./src/cards lazy recursive ^\\.\\/.*$")(`./${className}`); + // Set the target for controller cards to the current area. + let target = { + area_id: [area.area_id], + area_name: [area.name], + }; + // Set the target for controller cards to entities without an area. + if (area.area_id === "undisclosed") { + if (__classPrivateFieldGet(this, _AbstractView_domain, "f") === 'light') + target = { + entity_id: entities.map(entity => entity.entity_id), + }; + } + const swipeCard = []; + // Create a card for each domain-entity of the current area. + for (const entity of entities) { + let cardOptions = _Helper__WEBPACK_IMPORTED_MODULE_1__.Helper.strategyOptions.card_options?.[entity.entity_id]; + let deviceOptions = _Helper__WEBPACK_IMPORTED_MODULE_1__.Helper.strategyOptions.card_options?.[entity.device_id ?? "null"]; + if (cardOptions?.hidden || deviceOptions?.hidden) { + continue; + } + if (entity.entity_category === "config" && configEntityHidden) { + continue; + } + swipeCard.push(new cardModule[className](entity, cardOptions).getCard()); + } + if (swipeCard.length) { + areaCards.push(new _cards_SwipeCard__WEBPACK_IMPORTED_MODULE_3__.SwipeCard(swipeCard).getCard()); + } + // Vertical stack the area cards if it has entities. + if (areaCards.length) { + const titleCardOptions = ("controllerCardOptions" in this.config) ? this.config.controllerCardOptions : {}; + // Create and insert a Controller card. + areaCards.unshift(new _cards_ControllerCard__WEBPACK_IMPORTED_MODULE_2__.ControllerCard(target, Object.assign({ subtitle: area.name }, titleCardOptions)).createCard()); + floorCards.push({ + type: "vertical-stack", + cards: areaCards, + }); + } + } + if (floorCards.length > 0) + viewCards.push(...floorCards); + } + // Add a Controller Card for all the entities in the view. + if (viewCards.length) { + viewCards.unshift(this.viewControllerCard); + } + return viewCards; + } + /** + * Get a view object. + * + * The view includes the cards which are created by method createViewCards(). + * + * @returns {Promise} The view object. + */ + async getView() { + return { + ...this.config, + cards: await this.createViewCards(), + }; + } + /** + * Get a target of entity IDs for the given domain. + * + * @param {string} domain - The target domain to retrieve entity IDs from. + * @return {HassServiceTarget} - A target for a service call. + */ + targetDomain(domain) { + return { + entity_id: _Helper__WEBPACK_IMPORTED_MODULE_1__.Helper.entities.filter(entity => entity.entity_id.startsWith(domain + ".") + && !entity.hidden_by + && !_Helper__WEBPACK_IMPORTED_MODULE_1__.Helper.strategyOptions.card_options?.[entity.entity_id]?.hidden).map(entity => entity.entity_id), + }; + } +} +_AbstractView_domain = new WeakMap(); + + + +/***/ }), + +/***/ "./src/views/CameraView.ts": +/*!*********************************!*\ + !*** ./src/views/CameraView.ts ***! + \*********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ CameraView: () => (/* binding */ CameraView) +/* harmony export */ }); +/* harmony import */ var _cards_ControllerCard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../cards/ControllerCard */ "./src/cards/ControllerCard.ts"); +/* harmony import */ var _AbstractView__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AbstractView */ "./src/views/AbstractView.ts"); +/* harmony import */ var _Helper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Helper */ "./src/Helper.ts"); +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _a, _CameraView_domain, _CameraView_defaultConfig, _CameraView_viewControllerCardConfig; + + + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Camera View Class. + * + * Used to create a view for entities of the camera domain. + * + * @class CameraView + * @extends AbstractView + */ +class CameraView extends _AbstractView__WEBPACK_IMPORTED_MODULE_1__.AbstractView { + /** + * Class constructor. + * + * @param {views.ViewConfig} [options={}] Options for the view. + */ + constructor(options = {}) { + super(__classPrivateFieldGet(_a, _a, "f", _CameraView_domain)); + /** + * Default configuration of the view. + * + * @type {views.ViewConfig} + * @private + */ + _CameraView_defaultConfig.set(this, { + title: "Cameras", + path: "cameras", + icon: "mdi:cctv", + subview: false, + controllerCardOptions: { + showControls: false, + }, + }); + /** + * Default configuration of the view's Controller card. + * + * @type {cards.ControllerCardOptions} + * @private + */ + _CameraView_viewControllerCardConfig.set(this, { + title: `${_Helper__WEBPACK_IMPORTED_MODULE_2__.Helper.localize(`component.camera.entity_component._.name`)}s`, + subtitle: _Helper__WEBPACK_IMPORTED_MODULE_2__.Helper.getCountTemplate(__classPrivateFieldGet(_a, _a, "f", _CameraView_domain), "ne", "off") + ` ${_Helper__WEBPACK_IMPORTED_MODULE_2__.Helper.localize("component.light.entity_component._.state.on")}`, + }); + this.config = Object.assign(this.config, __classPrivateFieldGet(this, _CameraView_defaultConfig, "f"), options); + // Create a Controller card to switch all entities of the domain. + this.viewControllerCard = new _cards_ControllerCard__WEBPACK_IMPORTED_MODULE_0__.ControllerCard({}, { + ...__classPrivateFieldGet(this, _CameraView_viewControllerCardConfig, "f"), + ...("controllerCardOptions" in this.config ? this.config.controllerCardOptions : {}), + }).createCard(); + } +} +_a = CameraView, _CameraView_defaultConfig = new WeakMap(), _CameraView_viewControllerCardConfig = new WeakMap(); +/** + * Domain of the view's entities. + * + * @type {string} + * @static + * @private + */ +_CameraView_domain = { value: "camera" }; + + + +/***/ }), + +/***/ "./src/views/ClimateView.ts": +/*!**********************************!*\ + !*** ./src/views/ClimateView.ts ***! + \**********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ ClimateView: () => (/* binding */ ClimateView) +/* harmony export */ }); +/* harmony import */ var _Helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Helper */ "./src/Helper.ts"); +/* harmony import */ var _cards_ControllerCard__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../cards/ControllerCard */ "./src/cards/ControllerCard.ts"); +/* harmony import */ var _AbstractView__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AbstractView */ "./src/views/AbstractView.ts"); +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _a, _ClimateView_domain, _ClimateView_defaultConfig, _ClimateView_viewControllerCardConfig; + + + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Climate View Class. + * + * Used to create a view for entities of the climate domain. + * + * @class ClimateView + * @extends AbstractView + */ +class ClimateView extends _AbstractView__WEBPACK_IMPORTED_MODULE_2__.AbstractView { + /** + * Class constructor. + * + * @param {views.ViewConfig} [options={}] Options for the view. + */ + constructor(options = {}) { + super(__classPrivateFieldGet(_a, _a, "f", _ClimateView_domain)); + /** + * Default configuration of the view. + * + * @type {views.ViewConfig} + * @private + */ + _ClimateView_defaultConfig.set(this, { + title: "Climates", + path: "climates", + icon: "mdi:thermostat", + subview: false, + controllerCardOptions: { + showControls: false, + }, + }); + /** + * Default configuration of the view's Controller card. + * + * @type {cards.ControllerCardOptions} + * @private + */ + _ClimateView_viewControllerCardConfig.set(this, { + title: `${_Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.localize(`component.climate.entity_component._.name`)}s`, + subtitle: _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.getCountTemplate(__classPrivateFieldGet(_a, _a, "f", _ClimateView_domain), "ne", "off") + ` ${_Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.localize(`component.fan.entity_component._.state.on`)}s`, + }); + this.config = Object.assign(this.config, __classPrivateFieldGet(this, _ClimateView_defaultConfig, "f"), options); + // Create a Controller card to switch all entities of the domain. + this.viewControllerCard = new _cards_ControllerCard__WEBPACK_IMPORTED_MODULE_1__.ControllerCard(this.targetDomain(__classPrivateFieldGet(_a, _a, "f", _ClimateView_domain)), { + ...__classPrivateFieldGet(this, _ClimateView_viewControllerCardConfig, "f"), + ...("controllerCardOptions" in this.config ? this.config.controllerCardOptions : {}), + }).createCard(); + } +} +_a = ClimateView, _ClimateView_defaultConfig = new WeakMap(), _ClimateView_viewControllerCardConfig = new WeakMap(); +/** + * Domain of the view's entities. + * + * @type {string} + * @static + * @private + */ +_ClimateView_domain = { value: "climate" }; + + + +/***/ }), + +/***/ "./src/views/CoverView.ts": +/*!********************************!*\ + !*** ./src/views/CoverView.ts ***! + \********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ CoverView: () => (/* binding */ CoverView) +/* harmony export */ }); +/* harmony import */ var _Helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Helper */ "./src/Helper.ts"); +/* harmony import */ var _cards_ControllerCard__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../cards/ControllerCard */ "./src/cards/ControllerCard.ts"); +/* harmony import */ var _AbstractView__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AbstractView */ "./src/views/AbstractView.ts"); +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _a, _CoverView_domain, _CoverView_defaultConfig, _CoverView_viewControllerCardConfig; + + + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Cover View Class. + * + * Used to create a view for entities of the cover domain. + * + * @class CoverView + * @extends AbstractView + */ +class CoverView extends _AbstractView__WEBPACK_IMPORTED_MODULE_2__.AbstractView { + /** + * Class constructor. + * + * @param {views.ViewConfig} [options={}] Options for the view. + */ + constructor(options = {}) { + super(__classPrivateFieldGet(_a, _a, "f", _CoverView_domain)); + /** + * Default configuration of the view. + * + * @type {views.ViewConfig} + * @private + */ + _CoverView_defaultConfig.set(this, { + title: "Covers", + path: "covers", + icon: "mdi:window-open", + subview: false, + controllerCardOptions: { + iconOn: "mdi:arrow-up", + iconOff: "mdi:arrow-down", + onService: "cover.open_cover", + offService: "cover.close_cover", + }, + }); + /** + * Default configuration of the view's Controller card. + * + * @type {cards.ControllerCardOptions} + * @private + */ + _CoverView_viewControllerCardConfig.set(this, { + title: `${_Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.localize(`component.cover.entity_component._.name`)}`, + subtitle: _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.getCountTemplate(__classPrivateFieldGet(_a, _a, "f", _CoverView_domain), "eq", "open") + ` ${_Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.localize(`component.cover.entity_component._.state.open`)}`, + }); + this.config = Object.assign(this.config, __classPrivateFieldGet(this, _CoverView_defaultConfig, "f"), options); + // Create a Controller card to switch all entities of the domain. + this.viewControllerCard = new _cards_ControllerCard__WEBPACK_IMPORTED_MODULE_1__.ControllerCard(this.targetDomain(__classPrivateFieldGet(_a, _a, "f", _CoverView_domain)), { + ...__classPrivateFieldGet(this, _CoverView_viewControllerCardConfig, "f"), + ...("controllerCardOptions" in this.config ? this.config.controllerCardOptions : {}), + }).createCard(); + } +} +_a = CoverView, _CoverView_defaultConfig = new WeakMap(), _CoverView_viewControllerCardConfig = new WeakMap(); +/** + * Domain of the view's entities. + * + * @type {string} + * @static + * @private + */ +_CoverView_domain = { value: "cover" }; + + + +/***/ }), + +/***/ "./src/views/FanView.ts": +/*!******************************!*\ + !*** ./src/views/FanView.ts ***! + \******************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ FanView: () => (/* binding */ FanView) +/* harmony export */ }); +/* harmony import */ var _Helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Helper */ "./src/Helper.ts"); +/* harmony import */ var _cards_ControllerCard__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../cards/ControllerCard */ "./src/cards/ControllerCard.ts"); +/* harmony import */ var _AbstractView__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AbstractView */ "./src/views/AbstractView.ts"); +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _a, _FanView_domain, _FanView_defaultConfig, _FanView_viewControllerCardConfig; + + + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Fan View Class. + * + * Used to create a view for entities of the fan domain. + * + * @class FanView + * @extends AbstractView + */ +class FanView extends _AbstractView__WEBPACK_IMPORTED_MODULE_2__.AbstractView { + /** + * Class constructor. + * + * @param {views.ViewConfig} [options={}] Options for the view. + */ + constructor(options = {}) { + super(__classPrivateFieldGet(_a, _a, "f", _FanView_domain)); + /** + * Default configuration of the view. + * + * @type {views.ViewConfig} + * @private + */ + _FanView_defaultConfig.set(this, { + title: "Fans", + path: "fans", + icon: "mdi:fan", + subview: false, + controllerCardOptions: { + iconOn: "mdi:fan", + iconOff: "mdi:fan-off", + onService: "fan.turn_on", + offService: "fan.turn_off", + }, + }); + /** + * Default configuration of the view's Controller card. + * + * @type {cards.ControllerCardOptions} + * @private + */ + _FanView_viewControllerCardConfig.set(this, { + title: `${_Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.localize(`component.fan.entity_component._.name`)}s`, + subtitle: _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.getCountTemplate(__classPrivateFieldGet(_a, _a, "f", _FanView_domain), "eq", "on") + ` ${_Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.localize(`component.fan.entity_component._.state.on`)}s`, + }); + this.config = Object.assign(this.config, __classPrivateFieldGet(this, _FanView_defaultConfig, "f"), options); + // Create a Controller card to switch all entities of the domain. + this.viewControllerCard = new _cards_ControllerCard__WEBPACK_IMPORTED_MODULE_1__.ControllerCard(this.targetDomain(__classPrivateFieldGet(_a, _a, "f", _FanView_domain)), { + ...__classPrivateFieldGet(this, _FanView_viewControllerCardConfig, "f"), + ...("controllerCardOptions" in this.config ? this.config.controllerCardOptions : {}), + }).createCard(); + } +} +_a = FanView, _FanView_defaultConfig = new WeakMap(), _FanView_viewControllerCardConfig = new WeakMap(); +/** + * Domain of the view's entities. + * + * @type {string} + * @static + * @private + */ +_FanView_domain = { value: "fan" }; + + + +/***/ }), + +/***/ "./src/views/HomeView.ts": +/*!*******************************!*\ + !*** ./src/views/HomeView.ts ***! + \*******************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ HomeView: () => (/* binding */ HomeView) +/* harmony export */ }); +/* harmony import */ var _Helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Helper */ "./src/Helper.ts"); +/* harmony import */ var _AbstractView__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AbstractView */ "./src/views/AbstractView.ts"); +/* harmony import */ var _chips_SettingsChip__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../chips/SettingsChip */ "./src/chips/SettingsChip.ts"); +/* harmony import */ var _popups_LinusSettingsPopup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../popups/LinusSettingsPopup */ "./src/popups/LinusSettingsPopup.ts"); +/* harmony import */ var _chips_UnavailableChip__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../chips/UnavailableChip */ "./src/chips/UnavailableChip.ts"); +/* harmony import */ var _variables__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../variables */ "./src/variables.ts"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils */ "./src/utils.ts"); +/* harmony import */ var _types_strategy_generic__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../types/strategy/generic */ "./src/types/strategy/generic.ts"); +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _HomeView_instances, _HomeView_defaultConfig, _HomeView_createChips, _HomeView_createPersonCards, _HomeView_createAreaSection; + + + + + + + + +var isCallServiceActionConfig = _types_strategy_generic__WEBPACK_IMPORTED_MODULE_7__.generic.isCallServiceActionConfig; +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Home View Class. + * + * Used to create a Home view. + * + * @class HomeView + * @extends AbstractView + */ +class HomeView extends _AbstractView__WEBPACK_IMPORTED_MODULE_1__.AbstractView { + /** + * Class constructor. + * + * @param {views.ViewConfig} [options={}] Options for the view. + */ + constructor(options = {}) { + super(); + _HomeView_instances.add(this); + /** + * Default configuration of the view. + * + * @type {views.ViewConfig} + * @private + */ + _HomeView_defaultConfig.set(this, { + title: "Home", + icon: "mdi:home-assistant", + path: "home", + subview: false, + }); + this.config = Object.assign(this.config, __classPrivateFieldGet(this, _HomeView_defaultConfig, "f"), options); + } + /** + * Create the cards to include in the view. + * + * @return {Promise<(StackCardConfig | TemplateCardConfig | ChipsCardConfig)[]>} Promise a View Card array. + * @override + */ + async createViewCards() { + return await Promise.all([ + __classPrivateFieldGet(this, _HomeView_instances, "m", _HomeView_createChips).call(this), + __classPrivateFieldGet(this, _HomeView_instances, "m", _HomeView_createPersonCards).call(this), + __classPrivateFieldGet(this, _HomeView_instances, "m", _HomeView_createAreaSection).call(this), + ]).then(([chips, personCards, areaCards]) => { + const options = _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.strategyOptions; + const homeViewCards = []; + if (chips.length) { + // TODO: Create the Chip card at this.#createChips() + homeViewCards.push({ + type: "custom:mushroom-chips-card", + alignment: "center", + chips: chips, + }); + } + if (personCards.length) { + // TODO: Create the stack at this.#createPersonCards() + homeViewCards.push({ + type: "horizontal-stack", + cards: personCards, + }); + } + if (!_Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.strategyOptions.home_view.hidden.includes("greeting")) { + const tod = _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.magicAreasDevices.Global.entities.time_of_the_day; + homeViewCards.push({ + type: "custom:mushroom-template-card", + primary: ` + {% set tod = states("${tod?.entity_id}") %} + {% if (tod == "evening") %} Bonne soirée, {{user}}! + {% elif (tod == "daytime") %} Bonne après-midi, {{user}}! + {% elif (tod == "morning") %} Bonjour, {{user}}! + {% else %} Bonne nuit, {{user}}! + {% endif %}`, + icon: "mdi:hand-wave", + icon_color: "orange", + tap_action: { + action: "none", + }, + double_tap_action: { + action: "none", + }, + hold_action: { + action: "none", + }, + }); + } + // Add quick access cards. + if (options.quick_access_cards) { + homeViewCards.push(...options.quick_access_cards); + } + // Add area cards. + homeViewCards.push({ + type: "vertical-stack", + cards: areaCards, + }); + // Add custom cards. + if (options.extra_cards) { + homeViewCards.push(...options.extra_cards); + } + return homeViewCards; + }); + } +} +_HomeView_defaultConfig = new WeakMap(), _HomeView_instances = new WeakSet(), _HomeView_createChips = +/** + * Create the chips to include in the view. + * + * @return {Promise} Promise a chip array. + */ +async function _HomeView_createChips() { + if (_Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.strategyOptions.home_view.hidden.includes("chips")) { + // Chips section is hidden. + return []; + } + const chips = []; + const chipOptions = _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.strategyOptions.chips; + // TODO: Get domains from config. + const exposedChips = ["light", "fan", "cover", "switch", "climate", "safety", "motion", "door", "window"]; + // Create a list of area-ids, used for switching all devices via chips + const areaIds = _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.areas.map(area => area.area_id ?? ""); + let chipModule; + // Weather chip. + const weatherEntityId = chipOptions?.weather_entity ?? _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.entities.find((entity) => entity.entity_id.startsWith("weather.") && entity.disabled_by === null && entity.hidden_by === null)?.entity_id; + if (weatherEntityId) { + try { + chipModule = await Promise.resolve(/*! import() */).then(__webpack_require__.bind(__webpack_require__, /*! ../chips/WeatherChip */ "./src/chips/WeatherChip.ts")); + const weatherChip = new chipModule.WeatherChip(weatherEntityId); + chips.push(weatherChip.getChip()); + } + catch (e) { + _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.logError("An error occurred while creating the weather chip!", e); + } + } + // Alarm chip. + const alarmEntityId = chipOptions?.alarm_entity ?? _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.getAlarmEntity()?.entity_id; + if (alarmEntityId) { + try { + chipModule = await Promise.resolve(/*! import() */).then(__webpack_require__.bind(__webpack_require__, /*! ../chips/AlarmChip */ "./src/chips/AlarmChip.ts")); + const alarmChip = new chipModule.AlarmChip(alarmEntityId); + chips.push(alarmChip.getChip()); + } + catch (e) { + _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.logError("An error occurred while creating the alarm chip!", e); + } + } + // Spotify chip. + const spotifyEntityId = chipOptions?.spotify_entity ?? _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.entities.find((entity) => entity.entity_id.startsWith("media_player.spotify_") && entity.disabled_by === null && entity.hidden_by === null)?.entity_id; + if (spotifyEntityId) { + try { + chipModule = await Promise.resolve(/*! import() */).then(__webpack_require__.bind(__webpack_require__, /*! ../chips/SpotifyChip */ "./src/chips/SpotifyChip.ts")); + const spotifyChip = new chipModule.SpotifyChip(spotifyEntityId); + chips.push(spotifyChip.getChip()); + } + catch (e) { + _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.logError("An error occurred while creating the spotify chip!", e); + } + } + // Numeric chips. + for (let chipType of exposedChips) { + if (chipOptions?.[`${chipType}_count`] ?? true) { + const className = _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.sanitizeClassName(chipType + "Chip"); + try { + chipModule = await __webpack_require__("./src/chips lazy recursive ^\\.\\/.*$")(`./${className}`); + const chip = new chipModule[className](_Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.magicAreasDevices["Global"]); + if ("tap_action" in this.config && isCallServiceActionConfig(this.config.tap_action)) { + chip.setTapActionTarget({ area_id: areaIds }); + } + chips.push(chip.getChip()); + } + catch (e) { + _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.logError(`An error occurred while creating the ${chipType} chip!`, e); + } + } + } + // Extra chips. + if (chipOptions?.extra_chips) { + chips.push(...chipOptions.extra_chips); + } + // Unavailable chip. + const unavailableEntities = Object.values(_Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.magicAreasDevices["Global"]?.entities)?.filter((e) => { + const entityState = _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.getEntityState(e.entity_id); + return (exposedChips.includes(e.entity_id.split(".", 1)[0]) || exposedChips.includes(entityState?.attributes.device_class || '')) && + _variables__WEBPACK_IMPORTED_MODULE_5__.UNAVAILABLE_STATES.includes(entityState?.state); + }); + if (unavailableEntities.length) { + const unavailableChip = new _chips_UnavailableChip__WEBPACK_IMPORTED_MODULE_4__.UnavailableChip(unavailableEntities); + chips.push(unavailableChip.getChip()); + } + const linusSettings = new _chips_SettingsChip__WEBPACK_IMPORTED_MODULE_2__.SettingsChip({ tap_action: new _popups_LinusSettingsPopup__WEBPACK_IMPORTED_MODULE_3__.LinusSettings().getPopup() }); + chips.push(linusSettings.getChip()); + return chips; +}, _HomeView_createPersonCards = function _HomeView_createPersonCards() { + if (_Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.strategyOptions.home_view.hidden.includes("persons")) { + // Person section is hidden. + return []; + } + const cards = []; + Promise.resolve(/*! import() */).then(__webpack_require__.bind(__webpack_require__, /*! ../cards/PersonCard */ "./src/cards/PersonCard.ts")).then(personModule => { + for (const person of _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.entities.filter((entity) => { + return entity.entity_id.startsWith("person.") + && entity.hidden_by == null + && entity.disabled_by == null; + })) { + cards.push(new personModule.PersonCard(person).getCard()); + } + }); + return cards; +}, _HomeView_createAreaSection = +/** + * Create the area cards to include in the view. + * + * Area cards are grouped into two areas per row. + * + * @return {Promise<(TitleCardConfig | StackCardConfig)[]>} Promise an Area Card Section. + */ +async function _HomeView_createAreaSection() { + if (_Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.strategyOptions.home_view.hidden.includes("areas")) { + // Areas section is hidden. + return []; + } + const groupedCards = []; + if (!_Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.strategyOptions.home_view.hidden.includes("areasTitle")) { + groupedCards.push({ + type: "custom:mushroom-title-card", + title: `${_Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.localize("ui.components.area-picker.area")}s`, + }); + } + const areasByFloor = (0,_utils__WEBPACK_IMPORTED_MODULE_6__.groupBy)(_Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.areas, (e) => e.floor_id ?? "undisclosed"); + for (const floor of [..._Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.floors, _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.strategyOptions.floors.undisclosed]) { + let areaCards = []; + if (!(floor.floor_id in areasByFloor)) + continue; + groupedCards.push({ + type: "custom:mushroom-title-card", + subtitle: floor.name, + card_mod: { + style: ` + ha-card.header { + padding-top: 8px; + } + `, + } + }); + for (const [i, area] of areasByFloor[floor.floor_id].entries()) { + let module; + let moduleName = _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.strategyOptions.areas[area.area_id]?.type ?? + _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.strategyOptions.areas["_"]?.type ?? + "default"; + // Load module by type in strategy options. + try { + module = await __webpack_require__("./src/cards lazy recursive ^\\.\\/.*$")(`./${moduleName}`); + } + catch (e) { + // Fallback to the default strategy card. + module = await Promise.resolve(/*! import() */).then(__webpack_require__.bind(__webpack_require__, /*! ../cards/AreaCard */ "./src/cards/AreaCard.ts")); + if (_Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.strategyOptions.debug && moduleName !== "default") { + console.error(e); + } + } + // Get a card for the area. + if (!_Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.strategyOptions.areas[area.area_id]?.hidden) { + let options = { + ..._Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.strategyOptions.areas["_"], + ..._Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.strategyOptions.areas[area.area_id], + }; + areaCards.push(new module.AreaCard(area, options).getCard()); + } + // Horizontally group every two area cards if all cards are created. + if (i === areasByFloor[floor.floor_id].length - 1) { + for (let i = 0; i < areaCards.length; i += 1) { + groupedCards.push({ + type: "vertical-stack", + cards: areaCards.slice(i, i + 1), + }); + } + } + } + } + groupedCards.push({ + type: "custom:mushroom-template-card", + primary: "Ajouter une nouvelle pièce", + secondary: `Cliquer ici pour vous rendre sur la page des pièces`, + multiline_secondary: true, + icon: `mdi:view-dashboard-variant`, + fill_container: true, + tap_action: { + action: "navigate", + navigation_path: '/config/areas/dashboard' + }, + }); + return groupedCards; +}; + + + +/***/ }), + +/***/ "./src/views/LightView.ts": +/*!********************************!*\ + !*** ./src/views/LightView.ts ***! + \********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ LightView: () => (/* binding */ LightView) +/* harmony export */ }); +/* harmony import */ var _Helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Helper */ "./src/Helper.ts"); +/* harmony import */ var _cards_ControllerCard__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../cards/ControllerCard */ "./src/cards/ControllerCard.ts"); +/* harmony import */ var _AbstractView__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AbstractView */ "./src/views/AbstractView.ts"); +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _a, _LightView_domain, _LightView_defaultConfig, _LightView_viewControllerCardConfig; + + + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Light View Class. + * + * Used to create a view for entities of the light domain. + * + * @class LightView + * @extends AbstractView + */ +class LightView extends _AbstractView__WEBPACK_IMPORTED_MODULE_2__.AbstractView { + /** + * Class constructor. + * + * @param {views.ViewConfig} [options={}] Options for the view. + */ + constructor(options = {}) { + super(__classPrivateFieldGet(_a, _a, "f", _LightView_domain)); + /** + * Default configuration of the view. + * + * @type {views.ViewConfig} + * @private + */ + _LightView_defaultConfig.set(this, { + path: "lights", + icon: "mdi:lightbulb-group", + subview: false, + controllerCardOptions: { + iconOn: "mdi:lightbulb", + iconOff: "mdi:lightbulb-off", + onService: "light.turn_on", + offService: "light.turn_off", + }, + }); + /** + * Default configuration of the view's Controller card. + * + * @type {cards.ControllerCardOptions} + * @private + */ + _LightView_viewControllerCardConfig.set(this, { + title: `${_Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.localize(`component.light.entity_component._.name`)}s`, + subtitle: _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.getCountTemplate(__classPrivateFieldGet(_a, _a, "f", _LightView_domain), "eq", "on") + ` ${_Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.localize("component.light.entity_component._.state.on")}`, + }); + this.config = Object.assign(this.config, __classPrivateFieldGet(this, _LightView_defaultConfig, "f"), options); + // Create a Controller card to switch all entities of the domain. + this.viewControllerCard = new _cards_ControllerCard__WEBPACK_IMPORTED_MODULE_1__.ControllerCard(this.targetDomain(__classPrivateFieldGet(_a, _a, "f", _LightView_domain)), { + ...__classPrivateFieldGet(this, _LightView_viewControllerCardConfig, "f"), + ...("controllerCardOptions" in this.config ? this.config.controllerCardOptions : {}), + }).createCard(); + } +} +_a = LightView, _LightView_defaultConfig = new WeakMap(), _LightView_viewControllerCardConfig = new WeakMap(); +/** + * Domain of the view's entities. + * + * @type {string} + * @static + * @private + */ +_LightView_domain = { value: "light" }; + + + +/***/ }), + +/***/ "./src/views/MediaPlayerView.ts": +/*!**************************************!*\ + !*** ./src/views/MediaPlayerView.ts ***! + \**************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ MediaPlayerView: () => (/* binding */ MediaPlayerView) +/* harmony export */ }); +/* harmony import */ var _Helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Helper */ "./src/Helper.ts"); +/* harmony import */ var _cards_ControllerCard__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../cards/ControllerCard */ "./src/cards/ControllerCard.ts"); +/* harmony import */ var _AbstractView__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AbstractView */ "./src/views/AbstractView.ts"); +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _a, _MediaPlayerView_domain, _MediaPlayerView_defaultConfig, _MediaPlayerView_viewControllerCardConfig; + + + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * MediaPlayer View Class. + * + * Used to create a view for entities of the media_player domain. + * + * @class MediaPlayerView + * @extends AbstractView + */ +class MediaPlayerView extends _AbstractView__WEBPACK_IMPORTED_MODULE_2__.AbstractView { + /** + * Class constructor. + * + * @param {views.ViewConfig} [options={}] Options for the view. + */ + constructor(options = {}) { + super(__classPrivateFieldGet(_a, _a, "f", _MediaPlayerView_domain)); + /** + * Default configuration of the view. + * + * @type {views.ViewConfig} + * @private + */ + _MediaPlayerView_defaultConfig.set(this, { + title: "MediaPlayers", + path: "media_players", + icon: "mdi:cast", + subview: false, + controllerCardOptions: { + showControls: false, + }, + }); + /** + * Default configuration of the view's Controller card. + * + * @type {cards.ControllerCardOptions} + * @private + */ + _MediaPlayerView_viewControllerCardConfig.set(this, { + title: `${_Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.localize(`component.media_player.entity_component._.name`)}s`, + subtitle: _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.getCountTemplate(__classPrivateFieldGet(_a, _a, "f", _MediaPlayerView_domain), "ne", "off") + " media players on", + }); + this.config = Object.assign(this.config, __classPrivateFieldGet(this, _MediaPlayerView_defaultConfig, "f"), options); + // Create a Controller card to switch all entities of the domain. + this.viewControllerCard = new _cards_ControllerCard__WEBPACK_IMPORTED_MODULE_1__.ControllerCard(this.targetDomain(__classPrivateFieldGet(_a, _a, "f", _MediaPlayerView_domain)), { + ...__classPrivateFieldGet(this, _MediaPlayerView_viewControllerCardConfig, "f"), + ...("controllerCardOptions" in this.config ? this.config.controllerCardOptions : {}), + }).createCard(); + } +} +_a = MediaPlayerView, _MediaPlayerView_defaultConfig = new WeakMap(), _MediaPlayerView_viewControllerCardConfig = new WeakMap(); +/** + * Domain of the view's entities. + * + * @type {string} + * @static + * @private + */ +_MediaPlayerView_domain = { value: "media_player" }; + + + +/***/ }), + +/***/ "./src/views/SceneView.ts": +/*!********************************!*\ + !*** ./src/views/SceneView.ts ***! + \********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ SceneView: () => (/* binding */ SceneView) +/* harmony export */ }); +/* harmony import */ var _Helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Helper */ "./src/Helper.ts"); +/* harmony import */ var _cards_ControllerCard__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../cards/ControllerCard */ "./src/cards/ControllerCard.ts"); +/* harmony import */ var _AbstractView__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AbstractView */ "./src/views/AbstractView.ts"); +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _a, _SceneView_domain, _SceneView_defaultConfig, _SceneView_viewControllerCardConfig; + + + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Scene View Class. + * + * Used to create a view for entities of the scene domain. + * + * @class SceneView + * @extends AbstractView + */ +class SceneView extends _AbstractView__WEBPACK_IMPORTED_MODULE_2__.AbstractView { + /** + * Class constructor. + * + * @param {views.ViewConfig} [options={}] Options for the view. + */ + constructor(options = {}) { + super(__classPrivateFieldGet(_a, _a, "f", _SceneView_domain)); + /** + * Default configuration of the view. + * + * @type {views.ViewConfig} + * @private + */ + _SceneView_defaultConfig.set(this, { + title: "Scenes", + path: "scenes", + icon: "mdi:palette", + subview: false, + controllerCardOptions: { + showControls: false, + }, + }); + /** + * Default configuration of the view's Controller card. + * + * @type {cards.ControllerCardOptions} + * @private + */ + _SceneView_viewControllerCardConfig.set(this, { + title: `${_Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.localize(`ui.dialogs.quick-bar.commands.navigation.scene`)}`, + subtitle: _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.getCountTemplate(__classPrivateFieldGet(_a, _a, "f", _SceneView_domain), "ne", "on") + ` ${_Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.localize(`ui.dialogs.quick-bar.commands.navigation.scene`)}`, + }); + this.config = Object.assign(this.config, __classPrivateFieldGet(this, _SceneView_defaultConfig, "f"), options); + // Create a Controller card to scene all entities of the domain. + this.viewControllerCard = new _cards_ControllerCard__WEBPACK_IMPORTED_MODULE_1__.ControllerCard(this.targetDomain(__classPrivateFieldGet(_a, _a, "f", _SceneView_domain)), { + ...__classPrivateFieldGet(this, _SceneView_viewControllerCardConfig, "f"), + ...("controllerCardOptions" in this.config ? this.config.controllerCardOptions : {}), + }).createCard(); + } +} +_a = SceneView, _SceneView_defaultConfig = new WeakMap(), _SceneView_viewControllerCardConfig = new WeakMap(); +/** + * Domain of the view's entities. + * + * @type {string} + * @static + * @private + */ +_SceneView_domain = { value: "scene" }; + + + +/***/ }), + +/***/ "./src/views/SecurityDetailsView.ts": +/*!******************************************!*\ + !*** ./src/views/SecurityDetailsView.ts ***! + \******************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ SecurityDetailsView: () => (/* binding */ SecurityDetailsView) +/* harmony export */ }); +/* harmony import */ var _Helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Helper */ "./src/Helper.ts"); +/* harmony import */ var _cards_AggregateCard__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../cards/AggregateCard */ "./src/cards/AggregateCard.ts"); + + +/** + * Security View Class. + * + * To create a new view, extend the new class with this one. + * + * @class + * @abstract + */ +class SecurityDetailsView { + /** + * Class constructor. + * + * @throws {Error} If trying to instantiate this class. + * @throws {Error} If the Helper module isn't initialized. + */ + constructor() { + /** + * Configuration of the view. + * + * @type {LovelaceViewConfig} + */ + 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, + }; + /** + * A card to switch all entities in the view. + * + * @type {StackCardConfig} + */ + this.viewControllerCard = { + cards: [], + type: "", + }; + if (!_Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.isInitialized()) { + throw new Error("The Helper module must be initialized before using this one."); + } + } + /** + * Create the cards to include in the view. + * + * @return {Promise<(StackCardConfig | TitleCardConfig)[]>} An array of card objects. + */ + async createViewCards() { + const viewCards = []; + const globalDevice = _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.magicAreasDevices["Global"]; + const { aggregate_motion, aggregate_door, aggregate_window, } = globalDevice?.entities; + if (aggregate_motion?.entity_id) { + viewCards.push(new _cards_AggregateCard__WEBPACK_IMPORTED_MODULE_1__.AggregateCard('binary_sensor', { device_class: 'motion', title: _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.localize("component.binary_sensor.entity_component.motion.name") }).createCard()); + // viewCards.push(new AggregateCard({ entity_id: aggregate_motion.entity_id }, { title: `${Helper.localize("component.binary_sensor.entity_component.motion.name")}s` }).createCard()) + } + if (aggregate_door?.entity_id || aggregate_window?.entity_id) { + viewCards.push(new _cards_AggregateCard__WEBPACK_IMPORTED_MODULE_1__.AggregateCard('binary_sensor', { device_class: ['door', 'window'], title: _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.localize("component.binary_sensor.entity_component.opening.name") }).createCard()); + // 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()) + } + return viewCards; + } + /** + * Get a view object. + * + * The view includes the cards which are created by method createViewCards(). + * + * @returns {Promise} The view object. + */ + async getView() { + return { + ...this.config, + cards: await this.createViewCards(), + }; + } +} + + + +/***/ }), + +/***/ "./src/views/SecurityView.ts": +/*!***********************************!*\ + !*** ./src/views/SecurityView.ts ***! + \***********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ SecurityView: () => (/* binding */ SecurityView) +/* harmony export */ }); +/* harmony import */ var _Helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Helper */ "./src/Helper.ts"); +/* harmony import */ var _cards_AlarmCard__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../cards/AlarmCard */ "./src/cards/AlarmCard.ts"); +/* harmony import */ var _cards_PersonCard__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../cards/PersonCard */ "./src/cards/PersonCard.ts"); +/* harmony import */ var _cards_BinarySensorCard__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../cards/BinarySensorCard */ "./src/cards/BinarySensorCard.ts"); +/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils */ "./src/utils.ts"); + + + + + +/** + * Security View Class. + * + * To create a new view, extend the new class with this one. + * + * @class + * @abstract + */ +class SecurityView { + /** + * Class constructor. + * + * @throws {Error} If trying to instantiate this class. + * @throws {Error} If the Helper module isn't initialized. + */ + constructor() { + /** + * Configuration of the view. + * + * @type {LovelaceViewConfig} + */ + this.config = { + title: _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.localize("component.binary_sensor.entity_component.safety.name"), + path: "security", + icon: "mdi:security", + subview: false, + }; + /** + * A card to switch all entities in the view. + * + * @type {StackCardConfig} + */ + this.viewControllerCard = { + cards: [], + type: "", + }; + if (!_Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.isInitialized()) { + throw new Error("The Helper module must be initialized before using this one."); + } + } + /** + * Create the cards to include in the view. + * + * @return {Promise<(StackCardConfig | TitleCardConfig)[]>} An array of card objects. + */ + async createViewCards() { + const viewCards = []; + const alarmEntity = _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.getAlarmEntity(); + if (alarmEntity?.entity_id) { + viewCards.push({ + type: "custom:mushroom-title-card", + subtitle: "Alarme", + card_mod: { + style: `ha-card.header { padding-top: 8px; }`, + } + }); + viewCards.push(new _cards_AlarmCard__WEBPACK_IMPORTED_MODULE_1__.AlarmCard(alarmEntity).getCard()); + } + const persons = _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.getPersonsEntity(); + if (persons?.length) { + viewCards.push({ + type: "custom:mushroom-title-card", + subtitle: "Personnes", + card_mod: { + style: `ha-card.header { padding-top: 8px; }`, + } + }); + for (const person of persons) { + viewCards.push(new _cards_PersonCard__WEBPACK_IMPORTED_MODULE_2__.PersonCard(person, { + layout: "horizontal", + primary_info: "name", + secondary_info: "state" + }).getCard()); + } + } + const globalDevice = _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.magicAreasDevices["Global"]; + const { aggregate_motion, aggregate_door, aggregate_window, } = globalDevice?.entities; + if (aggregate_motion || aggregate_door || aggregate_window) { + viewCards.push({ + type: "custom:mushroom-title-card", + subtitle: "Capteurs", + card_mod: { + style: `ha-card.header { padding-top: 8px; }`, + } + }); + if (aggregate_motion?.entity_id) + viewCards.push(new _cards_BinarySensorCard__WEBPACK_IMPORTED_MODULE_3__.BinarySensorCard(aggregate_motion, { tap_action: (0,_utils__WEBPACK_IMPORTED_MODULE_4__.navigateTo)('security-details') }).getCard()); + if (aggregate_door?.entity_id) + viewCards.push(new _cards_BinarySensorCard__WEBPACK_IMPORTED_MODULE_3__.BinarySensorCard(aggregate_door, { tap_action: (0,_utils__WEBPACK_IMPORTED_MODULE_4__.navigateTo)('security-details') }).getCard()); + if (aggregate_window?.entity_id) + viewCards.push(new _cards_BinarySensorCard__WEBPACK_IMPORTED_MODULE_3__.BinarySensorCard(aggregate_window, { tap_action: (0,_utils__WEBPACK_IMPORTED_MODULE_4__.navigateTo)('security-details') }).getCard()); + } + return viewCards; + } + /** + * Get a view object. + * + * The view includes the cards which are created by method createViewCards(). + * + * @returns {Promise} The view object. + */ + async getView() { + return { + ...this.config, + cards: await this.createViewCards(), + }; + } +} + + + +/***/ }), + +/***/ "./src/views/SwitchView.ts": +/*!*********************************!*\ + !*** ./src/views/SwitchView.ts ***! + \*********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ SwitchView: () => (/* binding */ SwitchView) +/* harmony export */ }); +/* harmony import */ var _Helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Helper */ "./src/Helper.ts"); +/* harmony import */ var _cards_ControllerCard__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../cards/ControllerCard */ "./src/cards/ControllerCard.ts"); +/* harmony import */ var _AbstractView__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AbstractView */ "./src/views/AbstractView.ts"); +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _a, _SwitchView_domain, _SwitchView_defaultConfig, _SwitchView_viewControllerCardConfig; + + + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Switch View Class. + * + * Used to create a view for entities of the switch domain. + * + * @class SwitchView + * @extends AbstractView + */ +class SwitchView extends _AbstractView__WEBPACK_IMPORTED_MODULE_2__.AbstractView { + /** + * Class constructor. + * + * @param {views.ViewConfig} [options={}] Options for the view. + */ + constructor(options = {}) { + super(__classPrivateFieldGet(_a, _a, "f", _SwitchView_domain)); + /** + * Default configuration of the view. + * + * @type {views.ViewConfig} + * @private + */ + _SwitchView_defaultConfig.set(this, { + title: "Switches", + path: "switches", + icon: "mdi:dip-switch", + subview: false, + controllerCardOptions: { + iconOn: "mdi:power-plug", + iconOff: "mdi:power-plug-off", + onService: "switch.turn_on", + offService: "switch.turn_off", + }, + }); + /** + * Default configuration of the view's Controller card. + * + * @type {cards.ControllerCardOptions} + * @private + */ + _SwitchView_viewControllerCardConfig.set(this, { + title: `${_Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.localize(`component.switch.entity_component._.name`)}s`, + subtitle: _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.getCountTemplate(__classPrivateFieldGet(_a, _a, "f", _SwitchView_domain), "eq", "on") + " switches on", + }); + this.config = Object.assign(this.config, __classPrivateFieldGet(this, _SwitchView_defaultConfig, "f"), options); + // Create a Controller card to switch all entities of the domain. + this.viewControllerCard = new _cards_ControllerCard__WEBPACK_IMPORTED_MODULE_1__.ControllerCard(this.targetDomain(__classPrivateFieldGet(_a, _a, "f", _SwitchView_domain)), { + ...__classPrivateFieldGet(this, _SwitchView_viewControllerCardConfig, "f"), + ...("controllerCardOptions" in this.config ? this.config.controllerCardOptions : {}), + }).createCard(); + } +} +_a = SwitchView, _SwitchView_defaultConfig = new WeakMap(), _SwitchView_viewControllerCardConfig = new WeakMap(); +/** + * Domain of the view's entities. + * + * @type {string} + * @static + * @private + */ +_SwitchView_domain = { value: "switch" }; + + + +/***/ }), + +/***/ "./src/views/VacuumView.ts": +/*!*********************************!*\ + !*** ./src/views/VacuumView.ts ***! + \*********************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ VacuumView: () => (/* binding */ VacuumView) +/* harmony export */ }); +/* harmony import */ var _Helper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Helper */ "./src/Helper.ts"); +/* harmony import */ var _cards_ControllerCard__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../cards/ControllerCard */ "./src/cards/ControllerCard.ts"); +/* harmony import */ var _AbstractView__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AbstractView */ "./src/views/AbstractView.ts"); +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _a, _VacuumView_domain, _VacuumView_defaultConfig, _VacuumView_viewControllerCardConfig; + + + +// noinspection JSUnusedGlobalSymbols Class is dynamically imported. +/** + * Vacuum View Class. + * + * Used to create a view for entities of the vacuum domain. + * + * @class VacuumView + * @extends AbstractView + */ +class VacuumView extends _AbstractView__WEBPACK_IMPORTED_MODULE_2__.AbstractView { + /** + * Class constructor. + * + * @param {views.ViewConfig} [options={}] Options for the view. + */ + constructor(options = {}) { + super(__classPrivateFieldGet(_a, _a, "f", _VacuumView_domain)); + /** + * Default configuration of the view. + * + * @type {views.ViewConfig} + * @private + */ + _VacuumView_defaultConfig.set(this, { + title: "Vacuums", + path: "vacuums", + icon: "mdi:robot-vacuum", + subview: false, + controllerCardOptions: { + iconOn: "mdi:robot-vacuum", + iconOff: "mdi:robot-vacuum-off", + onService: "vacuum.start", + offService: "vacuum.stop", + }, + }); + /** + * Default configuration of the view's Controller card. + * + * @type {cards.ControllerCardOptions} + * @private + */ + _VacuumView_viewControllerCardConfig.set(this, { + title: `${_Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.localize(`component.vacuum.entity_component._.name`)}s`, + subtitle: _Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.getCountTemplate(__classPrivateFieldGet(_a, _a, "f", _VacuumView_domain), "ne", "off") + ` ${_Helper__WEBPACK_IMPORTED_MODULE_0__.Helper.localize(`component.vacuum.entity_component._.state.on`)}`, + }); + this.config = Object.assign(this.config, __classPrivateFieldGet(this, _VacuumView_defaultConfig, "f"), options); + // Create a Controller card to switch all entities of the domain. + this.viewControllerCard = new _cards_ControllerCard__WEBPACK_IMPORTED_MODULE_1__.ControllerCard(this.targetDomain(__classPrivateFieldGet(_a, _a, "f", _VacuumView_domain)), { + ...__classPrivateFieldGet(this, _VacuumView_viewControllerCardConfig, "f"), + ...("controllerCardOptions" in this.config ? this.config.controllerCardOptions : {}), + }).createCard(); + } +} +_a = VacuumView, _VacuumView_defaultConfig = new WeakMap(), _VacuumView_viewControllerCardConfig = new WeakMap(); +/** + * Domain of the view's entities. + * + * @type {string} + * @static + * @private + */ +_VacuumView_domain = { value: "vacuum" }; + + + +/***/ }), + +/***/ "./src/cards lazy recursive ^\\.\\/.*$": +/*!***************************************************!*\ + !*** ./src/cards/ lazy ^\.\/.*$ namespace object ***! + \***************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var map = { + "./AbstractCard": [ + "./src/cards/AbstractCard.ts" + ], + "./AbstractCard.ts": [ + "./src/cards/AbstractCard.ts" + ], + "./AggregateCard": [ + "./src/cards/AggregateCard.ts", + "main" + ], + "./AggregateCard.ts": [ + "./src/cards/AggregateCard.ts", + "main" + ], + "./AlarmCard": [ + "./src/cards/AlarmCard.ts", + "main" + ], + "./AlarmCard.ts": [ + "./src/cards/AlarmCard.ts", + "main" + ], + "./AreaButtonCard": [ + "./src/cards/AreaButtonCard.ts", + "main" + ], + "./AreaButtonCard.ts": [ + "./src/cards/AreaButtonCard.ts", + "main" + ], + "./AreaCard": [ + "./src/cards/AreaCard.ts", + "main" + ], + "./AreaCard.ts": [ + "./src/cards/AreaCard.ts", + "main" + ], + "./BinarySensorCard": [ + "./src/cards/BinarySensorCard.ts", + "main" + ], + "./BinarySensorCard.ts": [ + "./src/cards/BinarySensorCard.ts", + "main" + ], + "./CameraCard": [ + "./src/cards/CameraCard.ts", + "main" + ], + "./CameraCard.ts": [ + "./src/cards/CameraCard.ts", + "main" + ], + "./ClimateCard": [ + "./src/cards/ClimateCard.ts", + "main" + ], + "./ClimateCard.ts": [ + "./src/cards/ClimateCard.ts", + "main" + ], + "./ControllerCard": [ + "./src/cards/ControllerCard.ts" + ], + "./ControllerCard.ts": [ + "./src/cards/ControllerCard.ts" + ], + "./CoverCard": [ + "./src/cards/CoverCard.ts", + "main" + ], + "./CoverCard.ts": [ + "./src/cards/CoverCard.ts", + "main" + ], + "./FanCard": [ + "./src/cards/FanCard.ts", + "main" + ], + "./FanCard.ts": [ + "./src/cards/FanCard.ts", + "main" + ], + "./HaAreaCard": [ + "./src/cards/HaAreaCard.ts", + "main" + ], + "./HaAreaCard.ts": [ + "./src/cards/HaAreaCard.ts", + "main" + ], + "./LightCard": [ + "./src/cards/LightCard.ts", + "main" + ], + "./LightCard.ts": [ + "./src/cards/LightCard.ts", + "main" + ], + "./LockCard": [ + "./src/cards/LockCard.ts", + "main" + ], + "./LockCard.ts": [ + "./src/cards/LockCard.ts", + "main" + ], + "./MainAreaCard": [ + "./src/cards/MainAreaCard.ts" + ], + "./MainAreaCard.ts": [ + "./src/cards/MainAreaCard.ts" + ], + "./MediaPlayerCard": [ + "./src/cards/MediaPlayerCard.ts", + "main" + ], + "./MediaPlayerCard.ts": [ + "./src/cards/MediaPlayerCard.ts", + "main" + ], + "./MiscellaneousCard": [ + "./src/cards/MiscellaneousCard.ts", + "main" + ], + "./MiscellaneousCard.ts": [ + "./src/cards/MiscellaneousCard.ts", + "main" + ], + "./NumberCard": [ + "./src/cards/NumberCard.ts", + "main" + ], + "./NumberCard.ts": [ + "./src/cards/NumberCard.ts", + "main" + ], + "./PersonCard": [ + "./src/cards/PersonCard.ts", + "main" + ], + "./PersonCard.ts": [ + "./src/cards/PersonCard.ts", + "main" + ], + "./SceneCard": [ + "./src/cards/SceneCard.ts", + "main" + ], + "./SceneCard.ts": [ + "./src/cards/SceneCard.ts", + "main" + ], + "./SensorCard": [ + "./src/cards/SensorCard.ts" + ], + "./SensorCard.ts": [ + "./src/cards/SensorCard.ts" + ], + "./SwipeCard": [ + "./src/cards/SwipeCard.ts" + ], + "./SwipeCard.ts": [ + "./src/cards/SwipeCard.ts" + ], + "./SwitchCard": [ + "./src/cards/SwitchCard.ts", + "main" + ], + "./SwitchCard.ts": [ + "./src/cards/SwitchCard.ts", + "main" + ], + "./VacuumCard": [ + "./src/cards/VacuumCard.ts", + "main" + ], + "./VacuumCard.ts": [ + "./src/cards/VacuumCard.ts", + "main" + ] +}; +function webpackAsyncContext(req) { + if(!__webpack_require__.o(map, req)) { + return Promise.resolve().then(() => { + var e = new Error("Cannot find module '" + req + "'"); + e.code = 'MODULE_NOT_FOUND'; + throw e; + }); + } + + var ids = map[req], id = ids[0]; + return Promise.all(ids.slice(1).map(__webpack_require__.e)).then(() => { + return __webpack_require__(id); + }); +} +webpackAsyncContext.keys = () => (Object.keys(map)); +webpackAsyncContext.id = "./src/cards lazy recursive ^\\.\\/.*$"; +module.exports = webpackAsyncContext; + +/***/ }), + +/***/ "./src/chips lazy recursive ^\\.\\/.*$": +/*!***************************************************!*\ + !*** ./src/chips/ lazy ^\.\/.*$ namespace object ***! + \***************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var map = { + "./AbstractChip": [ + "./src/chips/AbstractChip.ts" + ], + "./AbstractChip.ts": [ + "./src/chips/AbstractChip.ts" + ], + "./AlarmChip": [ + "./src/chips/AlarmChip.ts", + "main" + ], + "./AlarmChip.ts": [ + "./src/chips/AlarmChip.ts", + "main" + ], + "./AreaScenesChips": [ + "./src/chips/AreaScenesChips.ts" + ], + "./AreaScenesChips.ts": [ + "./src/chips/AreaScenesChips.ts" + ], + "./AreaStateChip": [ + "./src/chips/AreaStateChip.ts" + ], + "./AreaStateChip.ts": [ + "./src/chips/AreaStateChip.ts" + ], + "./ClimateChip": [ + "./src/chips/ClimateChip.ts", + "main" + ], + "./ClimateChip.ts": [ + "./src/chips/ClimateChip.ts", + "main" + ], + "./CoverChip": [ + "./src/chips/CoverChip.ts", + "main" + ], + "./CoverChip.ts": [ + "./src/chips/CoverChip.ts", + "main" + ], + "./DoorChip": [ + "./src/chips/DoorChip.ts", + "main" + ], + "./DoorChip.ts": [ + "./src/chips/DoorChip.ts", + "main" + ], + "./FanChip": [ + "./src/chips/FanChip.ts", + "main" + ], + "./FanChip.ts": [ + "./src/chips/FanChip.ts", + "main" + ], + "./LightChip": [ + "./src/chips/LightChip.ts", + "main" + ], + "./LightChip.ts": [ + "./src/chips/LightChip.ts", + "main" + ], + "./LightControlChip": [ + "./src/chips/LightControlChip.ts" + ], + "./LightControlChip.ts": [ + "./src/chips/LightControlChip.ts" + ], + "./LinusAggregateChip": [ + "./src/chips/LinusAggregateChip.ts" + ], + "./LinusAggregateChip.ts": [ + "./src/chips/LinusAggregateChip.ts" + ], + "./LinusAlarmChip": [ + "./src/chips/LinusAlarmChip.ts", + "main" + ], + "./LinusAlarmChip.ts": [ + "./src/chips/LinusAlarmChip.ts", + "main" + ], + "./LinusClimateChip": [ + "./src/chips/LinusClimateChip.ts", + "main" + ], + "./LinusClimateChip.ts": [ + "./src/chips/LinusClimateChip.ts", + "main" + ], + "./LinusLightChip": [ + "./src/chips/LinusLightChip.ts", + "main" + ], + "./LinusLightChip.ts": [ + "./src/chips/LinusLightChip.ts", + "main" + ], + "./MotionChip": [ + "./src/chips/MotionChip.ts", + "main" + ], + "./MotionChip.ts": [ + "./src/chips/MotionChip.ts", + "main" + ], + "./SafetyChip": [ + "./src/chips/SafetyChip.ts", + "main" + ], + "./SafetyChip.ts": [ + "./src/chips/SafetyChip.ts", + "main" + ], + "./SettingsChip": [ + "./src/chips/SettingsChip.ts" + ], + "./SettingsChip.ts": [ + "./src/chips/SettingsChip.ts" + ], + "./SpotifyChip": [ + "./src/chips/SpotifyChip.ts", + "main" + ], + "./SpotifyChip.ts": [ + "./src/chips/SpotifyChip.ts", + "main" + ], + "./SwitchChip": [ + "./src/chips/SwitchChip.ts", + "main" + ], + "./SwitchChip.ts": [ + "./src/chips/SwitchChip.ts", + "main" + ], + "./ToggleSceneChip": [ + "./src/chips/ToggleSceneChip.ts" + ], + "./ToggleSceneChip.ts": [ + "./src/chips/ToggleSceneChip.ts" + ], + "./UnavailableChip": [ + "./src/chips/UnavailableChip.ts" + ], + "./UnavailableChip.ts": [ + "./src/chips/UnavailableChip.ts" + ], + "./WeatherChip": [ + "./src/chips/WeatherChip.ts", + "main" + ], + "./WeatherChip.ts": [ + "./src/chips/WeatherChip.ts", + "main" + ], + "./WindowChip": [ + "./src/chips/WindowChip.ts", + "main" + ], + "./WindowChip.ts": [ + "./src/chips/WindowChip.ts", + "main" + ] +}; +function webpackAsyncContext(req) { + if(!__webpack_require__.o(map, req)) { + return Promise.resolve().then(() => { + var e = new Error("Cannot find module '" + req + "'"); + e.code = 'MODULE_NOT_FOUND'; + throw e; + }); + } + + var ids = map[req], id = ids[0]; + return Promise.all(ids.slice(1).map(__webpack_require__.e)).then(() => { + return __webpack_require__(id); + }); +} +webpackAsyncContext.keys = () => (Object.keys(map)); +webpackAsyncContext.id = "./src/chips lazy recursive ^\\.\\/.*$"; +module.exports = webpackAsyncContext; + +/***/ }), + +/***/ "./src/views lazy recursive ^\\.\\/.*$": +/*!***************************************************!*\ + !*** ./src/views/ lazy ^\.\/.*$ namespace object ***! + \***************************************************/ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +var map = { + "./AbstractView": [ + "./src/views/AbstractView.ts", + "main" + ], + "./AbstractView.ts": [ + "./src/views/AbstractView.ts", + "main" + ], + "./CameraView": [ + "./src/views/CameraView.ts", + "main" + ], + "./CameraView.ts": [ + "./src/views/CameraView.ts", + "main" + ], + "./ClimateView": [ + "./src/views/ClimateView.ts", + "main" + ], + "./ClimateView.ts": [ + "./src/views/ClimateView.ts", + "main" + ], + "./CoverView": [ + "./src/views/CoverView.ts", + "main" + ], + "./CoverView.ts": [ + "./src/views/CoverView.ts", + "main" + ], + "./FanView": [ + "./src/views/FanView.ts", + "main" + ], + "./FanView.ts": [ + "./src/views/FanView.ts", + "main" + ], + "./HomeView": [ + "./src/views/HomeView.ts", + "main" + ], + "./HomeView.ts": [ + "./src/views/HomeView.ts", + "main" + ], + "./LightView": [ + "./src/views/LightView.ts", + "main" + ], + "./LightView.ts": [ + "./src/views/LightView.ts", + "main" + ], + "./MediaPlayerView": [ + "./src/views/MediaPlayerView.ts", + "main" + ], + "./MediaPlayerView.ts": [ + "./src/views/MediaPlayerView.ts", + "main" + ], + "./SceneView": [ + "./src/views/SceneView.ts", + "main" + ], + "./SceneView.ts": [ + "./src/views/SceneView.ts", + "main" + ], + "./SecurityDetailsView": [ + "./src/views/SecurityDetailsView.ts", + "main" + ], + "./SecurityDetailsView.ts": [ + "./src/views/SecurityDetailsView.ts", + "main" + ], + "./SecurityView": [ + "./src/views/SecurityView.ts", + "main" + ], + "./SecurityView.ts": [ + "./src/views/SecurityView.ts", + "main" + ], + "./SwitchView": [ + "./src/views/SwitchView.ts", + "main" + ], + "./SwitchView.ts": [ + "./src/views/SwitchView.ts", + "main" + ], + "./VacuumView": [ + "./src/views/VacuumView.ts", + "main" + ], + "./VacuumView.ts": [ + "./src/views/VacuumView.ts", + "main" + ] +}; +function webpackAsyncContext(req) { + if(!__webpack_require__.o(map, req)) { + return Promise.resolve().then(() => { + var e = new Error("Cannot find module '" + req + "'"); + e.code = 'MODULE_NOT_FOUND'; + throw e; + }); + } + + var ids = map[req], id = ids[0]; + return __webpack_require__.e(ids[1]).then(() => { + return __webpack_require__(id); + }); +} +webpackAsyncContext.keys = () => (Object.keys(map)); +webpackAsyncContext.id = "./src/views lazy recursive ^\\.\\/.*$"; +module.exports = webpackAsyncContext; + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/compat get default export */ +/******/ (() => { +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = (module) => { +/******/ var getter = module && module.__esModule ? +/******/ () => (module['default']) : +/******/ () => (module); +/******/ __webpack_require__.d(getter, { a: getter }); +/******/ return getter; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/ensure chunk */ +/******/ (() => { +/******/ // The chunk loading function for additional chunks +/******/ // Since all referenced chunks are already included +/******/ // in this file, this function is empty here. +/******/ __webpack_require__.e = () => (Promise.resolve()); +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/******/ /* webpack/runtime/make namespace object */ +/******/ (() => { +/******/ // define __esModule on exports +/******/ __webpack_require__.r = (exports) => { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ })(); +/******/ +/************************************************************************/ +/******/ +/******/ // startup +/******/ // Load entry module and return exports +/******/ // This entry module is referenced by other modules so it can't be inlined +/******/ var __webpack_exports__ = __webpack_require__("./src/mushroom-strategy.ts"); +/******/ +/******/ })() +; +//# sourceMappingURL=linus-strategy.js.map \ No newline at end of file diff --git a/custom_components/linus_dashboard/js/linus-strategy.js.map b/custom_components/linus_dashboard/js/linus-strategy.js.map new file mode 100644 index 0000000..0bef14c --- /dev/null +++ b/custom_components/linus_dashboard/js/linus-strategy.js.map @@ -0,0 +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;AAQG;AAErC;;;;GAIG;AACH,MAAM,MAAM;IAiFV;;;;;;;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;QACd,OAAO,2BAAI,yBAAO,CAAC;IACrB,CAAC;IAED;;;;;OAKG;IACH,MAAM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CAAC,GAAG;YACxE,QAAQ,EAAE,2CAAM,CAAC,gBAAgB,CAAC,yBAAU,8BAAQ,EAAE,IAAI,EAAE,KAAK,CAAC,GAAI,IAAI,2CAAM,CAAC,QAAQ,CAAC,8CAA8C,CAAC,EAAE;SAC5I,EAAC;QAUA,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,2BAAI,iCAAe,EAAE,OAAO,CAAC,CAAC;QAEvE,iEAAiE;QACjE,IAAI,CAAC,kBAAkB,GAAG,IAAI,iEAAc,CAC1C,IAAI,CAAC,YAAY,CAAC,yBAAU,8BAAQ,CAAC,EACrC;YACE,GAAG,2BAAI,4CAA0B;YACjC,GAAG,CAAC,uBAAuB,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,CAA+B;SACnH,CAAC,CAAC,UAAU,EAAE,CAAC;IACpB,CAAC;;;AAxDD;;;;;;GAMG;AACI,8BAAkB,QAAQ,EAAnB,CAAoB;AAoDhB;;;;;;;;;;;AC3EpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;;;ACxMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;;;AC1LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;UC1HA;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://mushroom-strategy/./node_modules/deepmerge/dist/cjs.js","webpack://mushroom-strategy/./src/Helper.ts","webpack://mushroom-strategy/./src/cards/AbstractCard.ts","webpack://mushroom-strategy/./src/cards/AggregateCard.ts","webpack://mushroom-strategy/./src/cards/AlarmCard.ts","webpack://mushroom-strategy/./src/cards/AreaButtonCard.ts","webpack://mushroom-strategy/./src/cards/AreaCard.ts","webpack://mushroom-strategy/./src/cards/BinarySensorCard.ts","webpack://mushroom-strategy/./src/cards/CameraCard.ts","webpack://mushroom-strategy/./src/cards/ClimateCard.ts","webpack://mushroom-strategy/./src/cards/ControllerCard.ts","webpack://mushroom-strategy/./src/cards/CoverCard.ts","webpack://mushroom-strategy/./src/cards/FanCard.ts","webpack://mushroom-strategy/./src/cards/HaAreaCard.ts","webpack://mushroom-strategy/./src/cards/LightCard.ts","webpack://mushroom-strategy/./src/cards/LockCard.ts","webpack://mushroom-strategy/./src/cards/MainAreaCard.ts","webpack://mushroom-strategy/./src/cards/MediaPlayerCard.ts","webpack://mushroom-strategy/./src/cards/MiscellaneousCard.ts","webpack://mushroom-strategy/./src/cards/NumberCard.ts","webpack://mushroom-strategy/./src/cards/PersonCard.ts","webpack://mushroom-strategy/./src/cards/SceneCard.ts","webpack://mushroom-strategy/./src/cards/SensorCard.ts","webpack://mushroom-strategy/./src/cards/SwipeCard.ts","webpack://mushroom-strategy/./src/cards/SwitchCard.ts","webpack://mushroom-strategy/./src/cards/VacuumCard.ts","webpack://mushroom-strategy/./src/chips/AbstractChip.ts","webpack://mushroom-strategy/./src/chips/AlarmChip.ts","webpack://mushroom-strategy/./src/chips/AreaScenesChips.ts","webpack://mushroom-strategy/./src/chips/AreaStateChip.ts","webpack://mushroom-strategy/./src/chips/ClimateChip.ts","webpack://mushroom-strategy/./src/chips/CoverChip.ts","webpack://mushroom-strategy/./src/chips/DoorChip.ts","webpack://mushroom-strategy/./src/chips/FanChip.ts","webpack://mushroom-strategy/./src/chips/LightChip.ts","webpack://mushroom-strategy/./src/chips/LightControlChip.ts","webpack://mushroom-strategy/./src/chips/LinusAggregateChip.ts","webpack://mushroom-strategy/./src/chips/LinusAlarmChip.ts","webpack://mushroom-strategy/./src/chips/LinusClimateChip.ts","webpack://mushroom-strategy/./src/chips/LinusLightChip.ts","webpack://mushroom-strategy/./src/chips/MotionChip.ts","webpack://mushroom-strategy/./src/chips/SafetyChip.ts","webpack://mushroom-strategy/./src/chips/SettingsChip.ts","webpack://mushroom-strategy/./src/chips/SpotifyChip.ts","webpack://mushroom-strategy/./src/chips/SwitchChip.ts","webpack://mushroom-strategy/./src/chips/ToggleSceneChip.ts","webpack://mushroom-strategy/./src/chips/UnavailableChip.ts","webpack://mushroom-strategy/./src/chips/WeatherChip.ts","webpack://mushroom-strategy/./src/chips/WindowChip.ts","webpack://mushroom-strategy/./src/configurationDefaults.ts","webpack://mushroom-strategy/./src/mushroom-strategy.ts","webpack://mushroom-strategy/./src/popups/AbstractPopup.ts","webpack://mushroom-strategy/./src/popups/AggregateAreaListPopup.ts","webpack://mushroom-strategy/./src/popups/AggregateListPopup.ts","webpack://mushroom-strategy/./src/popups/AreaInformationsPopup.ts","webpack://mushroom-strategy/./src/popups/GroupListPopup.ts","webpack://mushroom-strategy/./src/popups/LightSettingsPopup.ts","webpack://mushroom-strategy/./src/popups/LinusSettingsPopup.ts","webpack://mushroom-strategy/./src/popups/SceneSettingsPopup.ts","webpack://mushroom-strategy/./src/popups/WeatherPopup.ts","webpack://mushroom-strategy/./src/types/lovelace-mushroom/cards/vacuum-card-config.ts","webpack://mushroom-strategy/./src/types/strategy/generic.ts","webpack://mushroom-strategy/./src/utils.ts","webpack://mushroom-strategy/./src/variables.ts","webpack://mushroom-strategy/./src/views/AbstractView.ts","webpack://mushroom-strategy/./src/views/CameraView.ts","webpack://mushroom-strategy/./src/views/ClimateView.ts","webpack://mushroom-strategy/./src/views/CoverView.ts","webpack://mushroom-strategy/./src/views/FanView.ts","webpack://mushroom-strategy/./src/views/HomeView.ts","webpack://mushroom-strategy/./src/views/LightView.ts","webpack://mushroom-strategy/./src/views/MediaPlayerView.ts","webpack://mushroom-strategy/./src/views/SceneView.ts","webpack://mushroom-strategy/./src/views/SecurityDetailsView.ts","webpack://mushroom-strategy/./src/views/SecurityView.ts","webpack://mushroom-strategy/./src/views/SwitchView.ts","webpack://mushroom-strategy/./src/views/VacuumView.ts","webpack://mushroom-strategy/./src/cards/ lazy ^\\.\\/.*$ namespace object","webpack://mushroom-strategy/./src/chips/ lazy ^\\.\\/.*$ namespace object","webpack://mushroom-strategy/./src/views/ lazy ^\\.\\/.*$ namespace object","webpack://mushroom-strategy/webpack/bootstrap","webpack://mushroom-strategy/webpack/runtime/compat get default export","webpack://mushroom-strategy/webpack/runtime/define property getters","webpack://mushroom-strategy/webpack/runtime/ensure chunk","webpack://mushroom-strategy/webpack/runtime/hasOwnProperty shorthand","webpack://mushroom-strategy/webpack/runtime/make namespace object","webpack://mushroom-strategy/webpack/before-startup","webpack://mushroom-strategy/webpack/startup","webpack://mushroom-strategy/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 { EntityRegistryEntry } from \"./types/homeassistant/data/entity_registry\";\nimport { DeviceRegistryEntry, MagicAreaRegistryEntry } 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 { FloorRegistryEntry } from \"./types/homeassistant/data/floor_registry\";\nimport { DOMAIN } from \"./variables\";\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 {EntityRegistryEntry[]}\n * @private\n */\n static #entities: EntityRegistryEntry[];\n\n /**\n * An array of entities from Home Assistant's device registry.\n *\n * @type {DeviceRegistryEntry[]}\n * @private\n */\n static #devices: DeviceRegistryEntry[];\n\n /**\n * An array of entities from Home Assistant's area registry.\n *\n * @type {StrategyArea[]}\n * @private\n */\n static #areas: StrategyArea[] = [];\n\n /**\n * An array of entities from Home Assistant's area registry.\n *\n * @type {StrategyFloor[]}\n * @private\n */\n static #floors: StrategyFloor[] = [];\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 * 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 {StrategyArea[]}\n * @static\n */\n static get areas(): StrategyArea[] {\n return this.#areas;\n }\n\n /**\n * Get the entities from Home Assistant's floor registry.\n *\n * @returns {StrategyFloor[]}\n * @static\n */\n static get floors(): StrategyFloor[] {\n return 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 {DeviceRegistryEntry[]}\n * @static\n */\n static get devices(): DeviceRegistryEntry[] {\n return this.#devices;\n }\n\n /**\n * Get the entities from Home Assistant's entity registry.\n *\n * @returns {EntityRegistryEntry[]}\n * @static\n */\n static get entities(): EntityRegistryEntry[] {\n return this.#entities;\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 console.log('info.hass.resources.fr', info.hass.resources.fr)\n this.#strategyOptions = deepmerge(configurationDefaults, info.config?.strategy?.options ?? {});\n this.#debug = this.#strategyOptions.debug;\n\n try {\n // Query the registries of Home Assistant.\n\n // noinspection ES6MissingAwait False positive? https://youtrack.jetbrains.com/issue/WEB-63746\n [Helper.#entities, Helper.#devices, Helper.#areas, Helper.#floors] = 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 ]);\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 // Create and add the undisclosed area if not hidden in the strategy options.\n if (!this.#strategyOptions.areas.undisclosed?.hidden) {\n this.#strategyOptions.areas.undisclosed = {\n ...configurationDefaults.areas.undisclosed,\n ...this.#strategyOptions.areas.undisclosed,\n };\n\n // Make sure the custom configuration of the undisclosed area doesn't overwrite the area_id.\n this.#strategyOptions.areas.undisclosed.area_id = \"undisclosed\";\n\n this.#areas.push(this.#strategyOptions.areas.undisclosed);\n }\n\n // Merge custom areas of the strategy options into strategy areas.\n this.#areas = Helper.areas.map(area => {\n return { ...area, ...this.#strategyOptions.areas?.[area.area_id] };\n });\n\n // Sort strategy areas by order first and then by name.\n this.#areas.sort((a, b) => {\n return (a.order ?? Infinity) - (b.order ?? Infinity) || a.name.localeCompare(b.name);\n });\n\n // Find undisclosed and put it in last position.\n const indexUndisclosed = this.#areas.findIndex(item => item.area_id === \"undisclosed\");\n if (indexUndisclosed !== -1) {\n const areaUndisclosed = this.#areas.splice(indexUndisclosed, 1)[0];\n this.#areas.push(areaUndisclosed);\n }\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 // Get magic areas devices.\n this.#magicAreasDevices = Helper.devices\n .filter(device => device.manufacturer === 'Magic Areas')\n .reduce((acc: Record, device) => {\n acc[device.name!] = {\n ...device,\n area_name: device.name!,\n entities: this.#entities.filter(entity => entity.device_id === device.id)?.reduce((entities: Record, entity) => {\n entities[entity.translation_key!] = entity;\n return entities;\n }, {})\n };\n return acc;\n }, {});\n\n console.log('this.#magicAreasDevices', 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, area_id?: string): string {\n // noinspection JSMismatchedCollectionQueryUpdate (False positive per 17-04-2023)\n /**\n * Array of entity state-entries, filtered by domain.\n *\n * Each element contains a template-string which is used to access home assistant's state machine (state object) in\n * a template.\n * E.g. \"states['light.kitchen']\"\n *\n * The array excludes hidden and disabled entities.\n *\n * @type {string[]}\n */\n const states: string[] = [];\n\n if (!this.isInitialized()) {\n console.warn(\"Helper class should be initialized before calling this method!\");\n }\n\n // Get the ID of the devices which are linked to the given area.\n for (const area of this.#areas) {\n if (area_id && area.area_id !== area_id) continue\n\n const areaDeviceIds = this.#devices.filter((device) => {\n return device.area_id === area.area_id;\n }).map((device) => {\n return device.id;\n });\n\n // Get the entities of which all conditions of the callback function are met. @see areaFilterCallback.\n const newStates = this.#entities.filter(\n this.#areaFilterCallback, {\n area: area,\n domain: domain,\n areaDeviceIds: areaDeviceIds,\n })\n .map((entity) => `states['${entity.entity_id}']`);\n\n states.push(...newStates);\n }\n\n return `{% set entities = [${states}] %} {{ entities | selectattr('state','${operator}','${value}') | 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(domain: string, device_class: string, operator: string, value: string, area_id?: string): string {\n // noinspection JSMismatchedCollectionQueryUpdate (False positive per 17-04-2023)\n /**\n * Array of entity state-entries, filtered by device_class.\n *\n * Each element contains a template-string which is used to access home assistant's state machine (state object) in\n * a template.\n * E.g. \"states['light.kitchen']\"\n *\n * The array excludes hidden and disabled entities.\n *\n * @type {string[]}\n */\n const states: string[] = [];\n\n if (!this.isInitialized()) {\n console.warn(\"Helper class should be initialized before calling this method!\");\n }\n\n // Get the ID of the devices which are linked to the given area.\n for (const area of this.#areas) {\n if (area_id && area.area_id !== area_id) continue\n\n const areaDeviceIds = this.#devices.filter((device) => {\n return device.area_id === area.area_id;\n }).map((device) => {\n return device.id;\n });\n\n // Get the entities of which all conditions of the callback function are met. @see areaFilterCallback.\n const newStates = this.#entities.filter(\n this.#areaFilterCallback, {\n area: area,\n domain: domain,\n areaDeviceIds: areaDeviceIds,\n })\n .map((entity) => `states['${entity.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}') | selectattr('state','${operator}','${value}') | list | count }}`;\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 {EntityRegistryEntry[]} Array of device entities.\n * @static\n */\n static getDeviceEntities(area: AreaRegistryEntry, domain: string): EntityRegistryEntry[] {\n if (!this.isInitialized()) {\n console.warn(\"Helper class should be initialized before calling this method!\");\n }\n\n // Get the ID of the devices which are linked to the given area.\n const areaDeviceIds = this.#devices.filter((device) => {\n return (device.area_id ?? \"undisclosed\") === area.area_id;\n }).map((device: DeviceRegistryEntry) => {\n\n return device.id;\n });\n\n // Return the entities of which all conditions of the callback function are met. @see areaFilterCallback.\n let device_entities = this.#entities.filter(\n this.#areaFilterCallback, {\n area: area,\n domain: domain,\n areaDeviceIds: areaDeviceIds,\n })\n .sort((a, b) => {\n return (a.original_name ?? \"undefined\").localeCompare(b.original_name ?? \"undefined\");\n });\n\n if (domain == \"light\") {\n\n const device_lights = Object.values(this.#magicAreasDevices[area.name]?.entities ?? [])\n .filter(e => e.translation_key !== 'all_lights' && e.entity_id.endsWith('_lights')\n )\n\n device_lights.forEach(light => {\n const child_lights = Helper.#hassStates[light.entity_id].attributes?.entity_id;\n const filteredEntities = device_entities.filter(entity => !child_lights.includes(entity.entity_id));\n device_entities = [light, ...filteredEntities];\n })\n }\n\n return device_entities\n }\n\n /**\n * Get state entities, filtered by area and domain.\n *\n * The result excludes hidden and disabled entities.\n *\n * @param {AreaRegistryEntry} 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: AreaRegistryEntry, domain: string): HassEntity[] {\n if (!this.isInitialized()) {\n console.warn(\"Helper class should be initialized before calling this method!\");\n }\n\n const states: HassEntity[] = [];\n\n // Create a map for the hassEntities and devices {id: object} to improve lookup speed.\n const entityMap: {\n [s: string]: EntityRegistryEntry;\n } = Object.fromEntries(this.#entities.map((entity) => [entity.entity_id, entity]));\n const deviceMap: {\n [s: string]: DeviceRegistryEntry;\n } = Object.fromEntries(this.#devices.map((device) => [device.id, device]));\n\n // Get states whose entity-id starts with the given string.\n const stateEntities = Object.values(this.#hassStates).filter(\n (state) => state.entity_id.startsWith(`${domain}.`),\n );\n\n for (const state of stateEntities) {\n const hassEntity = entityMap[state.entity_id];\n const device = deviceMap[hassEntity?.device_id ?? \"\"];\n\n // Collect states of which any (whichever comes first) of the conditions below are met:\n // 1. The linked entity is linked to the given area.\n // 2. The entity is linked to a device, and the linked device is linked to the given area.\n if (\n (hassEntity?.area_id === area.area_id)\n || (device && device.area_id === area.area_id)\n ) {\n states.push(state);\n }\n }\n\n return states;\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 * Callback function for filtering entities.\n *\n * Entities of which all the conditions below are met are kept:\n * 1. The entity is not hidden and is not disabled.\n * 2. The entity's domain matches the given domain.\n * 3. Or/Neither the entity's linked device (if any) or/nor the entity itself is linked to the given area.\n * (See variable areaMatch)\n *\n * @param {EntityRegistryEntry} entity The current hass entity to evaluate.\n * @this {AreaFilterContext}\n *\n * @return {boolean} True to keep the entity.\n * @static\n */\n static #areaFilterCallback(\n this: {\n area: AreaRegistryEntry,\n areaDeviceIds: string[],\n domain: string,\n },\n entity: EntityRegistryEntry): boolean {\n const entityUnhidden = entity.hidden_by === null && entity.disabled_by === null;\n const domainMatches = entity.entity_id.startsWith(`${this.domain}.`);\n const linusDeviceIds = Helper.#devices.filter(d => [DOMAIN, \"adaptive_lighting\"].includes(d.identifiers[0]?.[0])).map(e => e.id)\n const isLinusEntity = linusDeviceIds.includes(entity.device_id ?? \"\") || entity.platform === DOMAIN\n const entityLinked = this.area.area_id === \"undisclosed\"\n // Undisclosed area;\n // nor the entity itself, neither the entity's linked device (if any) is linked to any area.\n ? !entity.area_id && (this.areaDeviceIds.includes(entity.device_id ?? \"\") || !entity.device_id)\n // Area is a hass entity;\n // The entity's linked device or the entity itself is linked to the given area.\n : this.areaDeviceIds.includes(entity.device_id ?? \"\") || entity.area_id === this.area.area_id;\n\n return (!isLinusEntity && entityUnhidden && domainMatches && entityLinked);\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 | undefined {\n return this.#hassLocalize(translationKey);\n }\n\n /**\n * Get valid entity.\n *\n * @return {EntityRegistryEntry}\n */\n static getValidEntity(entity: EntityRegistryEntry): Boolean {\n return entity.disabled_by === null && entity.hidden_by === null\n }\n\n /**\n * Get Main Alarm entity.\n *\n * @return {EntityRegistryEntry}\n */\n static getAlarmEntity(): EntityRegistryEntry | undefined {\n return Helper.#entities.find(\n (entity) => entity.entity_id.startsWith(\"alarm_control_panel.\") && Helper.getValidEntity(entity),\n )\n }\n\n /**\n * Get Persons entity.\n *\n * @return {EntityRegistryEntry}\n */\n static getPersonsEntity(): EntityRegistryEntry[] | undefined {\n return Helper.#entities.filter(\n (entity) => entity.entity_id.startsWith(\"person.\") && Helper.getValidEntity(entity),\n )\n }\n\n /**\n * Get Cameras entity.\n *\n * @return {EntityRegistryEntry}\n */\n static getCamerasEntity(): EntityRegistryEntry[] | undefined {\n return Helper.#entities.filter(\n (entity) => entity.entity_id.startsWith(\"camera.\") && Helper.getValidEntity(entity),\n )\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: \"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 { HassServiceTarget } from \"home-assistant-js-websocket\";\nimport { getAggregateEntity, getStateContent, groupBy } from \"../utils\";\nimport { Helper } from \"../Helper\";\nimport { TemplateCardConfig } from \"../types/lovelace-mushroom/cards/template-card-config\";\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 const areasByFloor = groupBy(Helper.areas, (e) => e.floor_id ?? \"undisclosed\");\n\n for (const floor of [...Helper.floors, Helper.strategyOptions.floors.undisclosed]) {\n\n if (!(floor.floor_id in areasByFloor) || areasByFloor[floor.floor_id].length === 0) continue\n\n let floorCards: (TemplateCardConfig)[] = [];\n floorCards.push({\n type: \"custom:mushroom-title-card\",\n subtitle: floor.name,\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 areasByFloor[floor.floor_id].entries()) {\n\n if (Helper.strategyOptions.areas[area.area_id]?.hidden) continue\n\n if (area.area_id !== \"undisclosed\") {\n const areaEntities = getAggregateEntity(Helper.magicAreasDevices[area.name], 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: area.name,\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 === areasByFloor[floor.floor_id].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 { AbstractCard } from \"./AbstractCard\";\nimport { cards } from \"../types/strategy/cards\";\nimport { AreaRegistryEntry } from \"../types/homeassistant/data/area_registry\";\nimport { TemplateCardConfig } from \"../types/lovelace-mushroom/cards/template-card-config\";\nimport { Helper } from \"../Helper\";\nimport { LightControlChip } from \"../chips/LightControlChip\";\nimport { LinusLightChip } from \"../chips/LinusLightChip\";\nimport { LinusClimateChip } from \"../chips/LinusClimateChip\";\nimport { LinusAggregateChip } from \"../chips/LinusAggregateChip\";\nimport { AreaStateChip } from \"../chips/AreaStateChip\";\n\nimport { MagicAreaRegistryEntry } from \"../types/homeassistant/data/device_registry\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Area Button Card Class\n *\n * Used to create a card for an entity of the area domain.\n *\n * @class\n * @extends AbstractCard\n */\nclass AreaCard extends AbstractCard {\n\n getDefaultConfig(area: AreaRegistryEntry, device: MagicAreaRegistryEntry): TemplateCardConfig {\n\n if (area.area_id === \"undisclosed\") {\n return {\n type: \"custom:stack-in-card\",\n cards: [\n {\n type: \"custom:stack-in-card\",\n mode: \"horizontal\",\n cards: [\n {\n type: \"custom:mushroom-template-card\",\n primary: area.name,\n secondary: null,\n icon: \"mdi:devices\",\n icon_color: \"grey\",\n fill_container: true,\n layout: \"horizontal\",\n multiline_secondary: false,\n tap_action: {\n action: \"navigate\",\n navigation_path: area.area_id,\n },\n hold_action: {\n action: \"none\",\n },\n double_tap_action: {\n action: \"none\"\n },\n card_mod: {\n style: `\n :host {\n background: #1f1f1f;\n --mush-icon-size: 74px;\n height: 66px;\n margin-left: -26px !important;\n }\n mushroom-badge-icon {\n left: 178px;\n top: 17px;\n }\n ha-card {\n box-shadow: none!important;\n border: none;\n }\n `,\n }\n }\n ],\n card_mod: {\n style: `\n ha-card {\n box-shadow: none!important;\n border: none;\n }\n `\n }\n }\n ]\n }\n }\n\n const {\n area_state,\n all_lights,\n aggregate_temperature,\n aggregate_battery,\n aggregate_door,\n aggregate_window,\n aggregate_health,\n aggregate_climate,\n aggregate_cover,\n light_control\n } = device.entities\n\n const icon = area.icon || \"mdi:home-outline\"\n\n return {\n type: \"custom:stack-in-card\",\n cards: [\n {\n type: \"custom:stack-in-card\",\n mode: \"horizontal\",\n cards: [\n {\n type: \"custom:mushroom-template-card\",\n primary: area.name,\n secondary: `\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 icon: icon,\n icon_color: `\n {{ \"indigo\" if \"dark\" in state_attr('${area_state?.entity_id}', 'states') else \"amber\" }}\n `,\n fill_container: true,\n layout: \"horizontal\",\n multiline_secondary: false,\n badge_icon: `\n {% set bl = states('${aggregate_battery?.entity_id}') %}\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 badge_color: `{% set bl = states('${aggregate_battery?.entity_id}') %}\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 {% elif bl | int() == 100 %} green\n {% else %} disabled\n {% endif %}\n `,\n tap_action: {\n action: \"navigate\",\n navigation_path: area.area_id,\n },\n hold_action: {\n action: \"none\",\n },\n double_tap_action: {\n action: \"none\"\n },\n card_mod: {\n style: `\n :host {\n background: transparent;\n --mush-icon-size: 74px;\n height: 66px;\n margin-left: -26px !important;\n }\n mushroom-badge-icon {\n top: 17px;\n }\n ha-card {\n box-shadow: none!important;\n border: none;\n }\n `,\n }\n },\n {\n type: \"custom:mushroom-chips-card\",\n alignment: \"end\",\n chips: [\n area_state?.entity_id && {\n type: \"conditional\",\n conditions: [\n {\n entity: area_state?.entity_id,\n state_not: \"unavailable\"\n }\n ],\n chip: new AreaStateChip(device).getChip(),\n },\n aggregate_health?.entity_id && {\n type: \"conditional\",\n conditions: [\n {\n entity: aggregate_health?.entity_id,\n state: \"on\"\n }\n ],\n chip: new LinusAggregateChip(device, \"health\").getChip(),\n },\n aggregate_window?.entity_id && {\n type: \"conditional\",\n conditions: [\n {\n entity: aggregate_window?.entity_id,\n state: \"on\"\n }\n ],\n chip: new LinusAggregateChip(device, \"window\").getChip(),\n },\n aggregate_door?.entity_id && {\n type: \"conditional\",\n conditions: [\n {\n entity: aggregate_door?.entity_id,\n state: \"on\"\n }\n ],\n chip: new LinusAggregateChip(device, \"door\").getChip(),\n },\n aggregate_cover?.entity_id && {\n type: \"conditional\",\n conditions: [\n {\n entity: aggregate_cover?.entity_id,\n state: \"on\"\n }\n ],\n chip: new LinusAggregateChip(device, \"cover\").getChip(),\n },\n aggregate_climate?.entity_id && {\n \"type\": \"conditional\",\n \"conditions\": [\n {\n \"entity\": aggregate_climate?.entity_id,\n \"state_not\": \"unavailable\"\n }\n ],\n \"chip\": new LinusClimateChip(device).getChip()\n },\n all_lights?.entity_id && {\n \"type\": \"conditional\",\n \"conditions\": [\n {\n \"entity\": all_lights?.entity_id,\n \"state_not\": \"unavailable\"\n }\n ],\n \"chip\": new LinusLightChip(device, area.area_id).getChip()\n },\n all_lights?.entity_id && {\n \"type\": \"conditional\",\n \"conditions\": [\n {\n \"entity\": all_lights?.entity_id,\n \"state_not\": \"unavailable\"\n }\n ],\n \"chip\": new LightControlChip(light_control?.entity_id).getChip()\n },\n ].filter(Boolean),\n card_mod: {\n style: `\n ha-card {\n --chip-box-shadow: none;\n --chip-spacing: 0px;\n width: -webkit-fill-available;\n position: absolute;\n top: 16px;\n right: 8px;\n }\n .chip-container {\n position: absolute;\n right: 0px;\n }\n `\n }\n }\n ],\n card_mod: {\n style: `\n ha-card {\n box-shadow: none!important;\n border: none;\n }\n `\n }\n },\n {\n type: \"custom:mushroom-light-card\",\n entity: all_lights?.entity_id,\n fill_container: true,\n show_brightness_control: true,\n icon_type: \"none\",\n primary_info: \"none\",\n secondary_info: \"none\",\n use_light_color: true,\n layout: \"horizontal\",\n card_mod: {\n style: `\n :host {\n --mush-control-height: 1rem;\n }\n ha-card {\n box-shadow: none!important;\n border: none;\n }\n `\n }\n }\n ]\n }\n }\n\n /**\n * Class constructor.\n *\n * @param {AreaRegistryEntry} area The area entity to create a card for.\n * @param {cards.TemplateCardOptions} [options={}] Options for the card.\n *\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor(area: AreaRegistryEntry, options: cards.TemplateCardOptions = {}) {\n super(area);\n\n // Don't override the default card type if default is set in the strategy options.\n if (options.type === \"AreaButtonCard\") {\n delete options.type;\n }\n\n const device = Helper.magicAreasDevices[area.name];\n\n if (device) {\n const defaultConfig = this.getDefaultConfig(area, device)\n this.config = Object.assign(this.config, defaultConfig, options);\n }\n }\n}\n\nexport { AreaCard };\n","import {AbstractCard} from \"./AbstractCard\";\nimport {cards} from \"../types/strategy/cards\";\nimport {AreaRegistryEntry} from \"../types/homeassistant/data/area_registry\";\nimport {TemplateCardConfig} from \"../types/lovelace-mushroom/cards/template-card-config\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Area Card Class\n *\n * Used to create a card for an entity of the area domain.\n *\n * @class\n * @extends AbstractCard\n */\nclass AreaCard extends AbstractCard {\n /**\n * Default configuration of the card.\n *\n * @type {TemplateCardConfig}\n * @private\n */\n #defaultConfig: TemplateCardConfig = {\n type: \"custom:mushroom-template-card\",\n primary: undefined,\n icon: \"mdi:texture-box\",\n icon_color: \"blue\",\n tap_action: {\n action: \"navigate\",\n navigation_path: \"\",\n },\n hold_action: {\n action: \"none\",\n },\n };\n\n /**\n * Class constructor.\n *\n * @param {AreaRegistryEntry} area The area entity to create a card for.\n * @param {cards.TemplateCardOptions} [options={}] Options for the card.\n *\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor(area: AreaRegistryEntry, options: cards.TemplateCardOptions = {}) {\n super(area);\n\n // Don't override the default card type if default is set in the strategy options.\n if (options.type === \"default\") {\n delete options.type;\n }\n\n // Initialize the default configuration.\n this.#defaultConfig.primary = area.name;\n if (this.#defaultConfig.tap_action && (\"navigation_path\" in this.#defaultConfig.tap_action)) {\n this.#defaultConfig.tap_action.navigation_path = area.area_id;\n }\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport {AreaCard};\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: \"tile\",\n icon: undefined,\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\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 { StackCardConfig } from \"../types/homeassistant/lovelace/cards/types\";\nimport { LovelaceCardConfig } from \"../types/homeassistant/data/lovelace\";\nimport { HassServiceTarget } from \"home-assistant-js-websocket\";\nimport { Helper } from \"../Helper\";\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 {HassServiceTarget} The target to control the entities of.\n * @private\n */\n readonly #target: HassServiceTarget;\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 = {}) {\n this.#target = target;\n this.#defaultConfig = {\n ...this.#defaultConfig,\n ...options,\n };\n }\n\n /**\n * Create a Controller card.\n *\n * @return {StackCardConfig} A Controller card.\n */\n createCard(): StackCardConfig {\n const cards: LovelaceCardConfig[] = [\n {\n type: \"custom:mushroom-title-card\",\n title: this.#defaultConfig.title,\n subtitle: this.#defaultConfig.subtitle,\n },\n ];\n\n if (this.#defaultConfig.showControls || this.#defaultConfig.extraControls) {\n const linusDevice = Array.isArray(this.#target.area_name) ? Helper.magicAreasDevices[this.#target.area_name[0]] : undefined\n \n cards.push({\n type: \"custom:mushroom-chips-card\",\n alignment: \"end\",\n chips: [\n (this.#defaultConfig.showControls &&\n (this.#target.entity_id && typeof this.#target.entity_id === \"string\" ?\n {\n type: \"template\",\n entity: this.#target.entity_id,\n icon: `{{ '${this.#defaultConfig.iconOn}' if states(entity) == 'on' else '${this.#defaultConfig.iconOff}' }}`,\n icon_color: `{{ 'amber' if states(entity) == 'on' else 'red' }}`,\n tap_action: {\n action: \"toggle\"\n },\n hold_action: {\n action: \"more-info\"\n }\n } :\n {\n type: \"template\",\n entity: this.#target.entity_id,\n icon: this.#defaultConfig.iconOff,\n tap_action: {\n action: \"call-service\",\n service: this.#defaultConfig.offService,\n target: this.#target,\n data: {},\n },\n })\n ),\n ...(this.#defaultConfig.extraControls && this.#target ? this.#defaultConfig.extraControls(linusDevice) : [])\n ],\n card_mod: {\n style: `ha-card {padding: var(--title-padding);}`\n }\n });\n }\n\n return {\n type: \"horizontal-stack\",\n cards: cards,\n };\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 {AreaRegistryEntry} from \"../types/homeassistant/data/area_registry\";\nimport {AreaCardConfig} from \"../types/homeassistant/lovelace/cards/types\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * HA Area Card Class\n *\n * Used to create a card for an entity of the area domain using the built-in type 'area'.\n *\n * @class\n * @extends AbstractCard\n */\nclass AreaCard extends AbstractCard {\n /**\n * Default configuration of the card.\n *\n * @type {AreaCardConfig}\n * @private\n */\n #defaultConfig: AreaCardConfig = {\n type: \"area\",\n area: \"\",\n };\n\n /**\n * Class constructor.\n *\n * @param {AreaRegistryEntry} area The area entity to create a card for.\n * @param {cards.AreaCardOptions} [options={}] Options for the card.\n * @throws {Error} If the Helper module isn't initialized.\n */\n\n constructor(area: AreaRegistryEntry, options: cards.AreaCardOptions = {}) {\n super(area);\n\n // Initialize the default configuration.\n this.#defaultConfig.area = area.area_id;\n this.#defaultConfig.navigation_path = this.#defaultConfig.area;\n\n // Enforce the card type.\n delete options.type;\n\n this.config = Object.assign(this.config, this.#defaultConfig, options);\n }\n}\n\nexport {AreaCard};\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 { AreaRegistryEntry } from \"../types/homeassistant/data/area_registry\";\nimport { TemplateCardConfig } from \"../types/lovelace-mushroom/cards/template-card-config\";\nimport { Helper } from \"../Helper\";\nimport { LinusAggregateChip } from \"../chips/LinusAggregateChip\";\nimport { AreaStateChip } from \"../chips/AreaStateChip\";\n\nimport { AreaScenesChips } from \"../chips/AreaScenesChips\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Area Card Class\n *\n * Used to create a card for an entity of the area domain.\n *\n * @class\n * @extends AbstractCard\n */\nclass MainAreaCard extends AbstractCard {\n\n getDefaultConfig(area: AreaRegistryEntry): TemplateCardConfig {\n\n const device = Helper.magicAreasDevices[area.name];\n\n const {\n area_state,\n aggregate_temperature,\n aggregate_humidity,\n aggregate_illuminance,\n aggregate_window,\n aggregate_door,\n aggregate_health,\n aggregate_cover,\n } = device.entities\n\n return {\n type: \"custom:layout-card\",\n layout_type: \"custom:masonry-layout\",\n card_mod: {\n },\n cards: [\n {\n type: \"custom:mod-card\",\n style: `\n ha-card {\n position: relative;\n }\n .card-content {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n `,\n card: {\n type: \"vertical-stack\",\n cards: [\n\n {\n type: \"custom:mushroom-chips-card\",\n alignment: \"end\",\n chips: [\n aggregate_temperature?.entity_id && {\n type: \"conditional\",\n conditions: [\n {\n entity: aggregate_temperature?.entity_id,\n state_not: \"unavailable\"\n }\n ],\n chip: new LinusAggregateChip(device, \"temperature\", true, true).getChip(),\n },\n aggregate_humidity?.entity_id && {\n type: \"conditional\",\n conditions: [\n {\n entity: aggregate_humidity?.entity_id,\n state_not: \"unavailable\"\n }\n ],\n chip: new LinusAggregateChip(device, \"humidity\", true, true).getChip(),\n },\n aggregate_illuminance?.entity_id && {\n type: \"conditional\",\n conditions: [\n {\n entity: aggregate_illuminance?.entity_id,\n state_not: \"unavailable\"\n }\n ],\n chip: new LinusAggregateChip(device, \"illuminance\", true, true).getChip(),\n },\n ].filter(Boolean),\n card_mod: {\n style: `\n ha-card {\n position: absolute;\n top: 24px;\n left: 0px;\n right: 8px;\n z-index: 2;\n }\n `\n }\n },\n {\n type: \"custom:mushroom-chips-card\",\n alignment: \"end\",\n chips: [\n aggregate_window?.entity_id && {\n type: \"conditional\",\n conditions: [\n {\n entity: aggregate_window?.entity_id,\n state_not: \"unavailable\"\n }\n ],\n chip: new LinusAggregateChip(device, \"window\", true, true).getChip(),\n },\n aggregate_door?.entity_id && {\n type: \"conditional\",\n conditions: [\n {\n entity: aggregate_door?.entity_id,\n state_not: \"unavailable\"\n }\n ],\n chip: new LinusAggregateChip(device, \"door\", true, true).getChip(),\n },\n aggregate_health?.entity_id && {\n type: \"conditional\",\n conditions: [\n {\n entity: aggregate_health?.entity_id,\n state_not: \"unavailable\"\n }\n ],\n chip: new LinusAggregateChip(device, \"health\", true, true).getChip(),\n },\n aggregate_cover?.entity_id && {\n type: \"conditional\",\n conditions: [\n {\n entity: aggregate_cover?.entity_id,\n state_not: \"unavailable\"\n }\n ],\n chip: new LinusAggregateChip(device, \"cover\", true, true).getChip(),\n },\n area_state?.entity_id && {\n type: \"conditional\",\n conditions: [\n {\n entity: area_state?.entity_id,\n state_not: \"unavailable\"\n }\n ],\n chip: new AreaStateChip(device, true).getChip(),\n },\n ].filter(Boolean),\n card_mod: {\n style: `\n ha-card {\n position: absolute;\n bottom: 8px;\n left: 0px;\n right: 8px;\n z-index: 2;\n }\n `\n }\n },\n\n {\n type: \"area\",\n area: area.area_id,\n show_camera: true,\n alert_classes: [],\n sensor_classes: [],\n aspect_ratio: \"16:9\",\n\n card_mod: {\n style: `\n ha-card {\n position: relative;\n z-index: 1;\n }\n .sensors {\n display: none;\n }\n .buttons {\n display: none;\n }\n `\n }\n }\n ]\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 ].filter(Boolean)\n }\n }\n\n /**\n * Class constructor.\n *\n * @param {AreaRegistryEntry} area The area entity to create a card for.\n * @param {cards.TemplateCardOptions} [options={}] Options for the card.\n *\n * @throws {Error} If the Helper module isn't initialized.\n */\n constructor(area: AreaRegistryEntry, options: cards.TemplateCardOptions = {}) {\n super(area);\n\n // Don't override the default card type if default is set in the strategy options.\n if (options.type === \"LinusMainAreaCard\") {\n delete options.type;\n }\n\n const defaultConfig = this.getDefaultConfig(area)\n\n this.config = Object.assign(this.config, defaultConfig, options);\n }\n}\n\nexport { MainAreaCard };\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 layout: \"vertical\",\n primary_info: \"none\",\n secondary_info: \"none\",\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 { 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","import { shiftIterator } from \"superstruct/dist/utils\";\nimport { Helper } from \"../Helper\";\nimport { MagicAreaRegistryEntry } from \"../types/homeassistant/data/device_registry\";\nimport { LovelaceChipConfig, TemplateChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { DOMAIN, todOrder } from \"../variables\";\nimport { slugify } from \"../utils\";\nimport { AreaRegistryEntry } from \"../types/homeassistant/data/area_registry\";\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: AreaRegistryEntry): TemplateChipConfig[] {\n\n const selects = todOrder.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: `${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)}_${todOrder[index]}_snapshot_scene`\n chips.push({\n type: \"template\",\n entity: scene?.entity_id,\n icon: scene?.attributes.icon,\n content: todOrder[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: todOrder[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: AreaRegistryEntry) {\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 { MagicAreaRegistryEntry } from \"../types/homeassistant/data/device_registry\";\nimport { ConditionalChipConfig, TemplateChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { AREA_STATE_ICONS, DEVICE_ICONS, DOMAIN_ICONS } from \"../variables\";\nimport { AbstractChip } from \"./AbstractChip\";\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 ${DOMAIN_ICONS.motion}\n {% elif media_player in ['on', 'playing'] %}\n ${DOMAIN_ICONS.media_player}\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 { MagicAreaRegistryEntry } from \"../types/homeassistant/data/device_registry\";\nimport { ConditionalChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { chips } from \"../types/strategy/chips\";\nimport { navigateTo } from \"../utils\";\nimport { DOMAIN_STATE_ICONS } 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 how many climates are operating.\n */\nclass ClimateChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @type {ConditionalChipConfig}\n *\n */\n getDefaultConfig(entity_id: string): ConditionalChipConfig {\n const icon = DOMAIN_STATE_ICONS.climate\n return {\n type: \"conditional\",\n conditions: [\n {\n entity: entity_id,\n state_not: \"unavailable\"\n }\n ],\n chip: {\n type: \"template\",\n entity: entity_id,\n icon_color: \"{{ 'red' if is_state(entity, 'on') else 'grey' }}\",\n icon: icon.on,\n content: `{{ expand(states.${entity_id}.attributes.entity_id is defined and states.${entity_id}.attributes.entity_id) | selectattr( 'state', 'eq', 'on') | list | count }}`,\n tap_action: navigateTo('climate'),\n },\n }\n }\n\n /**\n * Class Constructor.\n *\n * @param {chips.TemplateChipOptions} options The chip options.\n */\n constructor(device: MagicAreaRegistryEntry, options: chips.TemplateChipOptions = {}) {\n super();\n\n if (!device.entities.climate_group?.entity_id) {\n throw new Error(`No aggregate motion entity found for device: ${device.name}`);\n }\n\n const defaultConfig = this.getDefaultConfig(device.entities.climate_group.entity_id)\n this.config = Object.assign(this.config, defaultConfig);\n\n }\n}\n\nexport { ClimateChip };\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 icon_color: \"cyan\",\n content: Helper.getCountTemplate(\"cover\", \"eq\", \"open\"),\n tap_action: {\n action: \"navigate\",\n navigation_path: \"covers\",\n },\n hold_action: {\n action: \"navigate\",\n navigation_path: \"covers\",\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 { CoverChip };\n","import { MagicAreaRegistryEntry } from \"../types/homeassistant/data/device_registry\";\nimport { ConditionalChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { chips } from \"../types/strategy/chips\";\nimport { navigateTo } from \"../utils\";\nimport { DOMAIN_STATE_ICONS } from \"../variables\";\nimport { AbstractChip } from \"./AbstractChip\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Door Chip class.\n *\n * Used to create a chip to indicate how many doors are on and to turn all off.\n */\nclass DoorChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @type {ConditionalChipConfig}\n *\n */\n getDefaultConfig(entity_id: string): ConditionalChipConfig {\n const icon = DOMAIN_STATE_ICONS.binary_sensor.door\n return {\n type: \"conditional\",\n conditions: [\n {\n entity: entity_id,\n state_not: \"unavailable\"\n }\n ],\n chip: {\n type: \"template\",\n entity: entity_id,\n icon_color: \"{{ 'red' if is_state(entity, 'on') else 'grey' }}\",\n icon: `{{ '${icon.on}' if is_state(entity, 'on') else '${icon.off}' }}`,\n content: `{{ expand(states.${entity_id}.attributes.entity_id is defined and states.${entity_id}.attributes.entity_id) | selectattr( 'state', 'eq', 'on') | list | count }}`,\n tap_action: navigateTo('security-details'),\n },\n }\n }\n\n /**\n * Class Constructor.\n *\n * @param {chips.TemplateChipOptions} options The chip options.\n */\n constructor(device: MagicAreaRegistryEntry, options: chips.TemplateChipOptions = {}) {\n super();\n\n if (device.entities.aggregate_door?.entity_id) {\n const defaultConfig = this.getDefaultConfig(device.entities.aggregate_door.entity_id)\n this.config = Object.assign(this.config, defaultConfig);\n }\n\n\n }\n}\n\nexport { DoorChip };\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 icon_color: \"green\",\n content: Helper.getCountTemplate(\"fan\", \"eq\", \"on\"),\n tap_action: {\n action: \"call-service\",\n service: \"fan.turn_off\",\n },\n hold_action: {\n action: \"navigate\",\n navigation_path: \"fans\",\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 {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\";\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: Helper.getCountTemplate(\"light\", \"eq\", \"on\"),\n tap_action: {\n action: \"call-service\",\n service: \"light.turn_off\",\n },\n hold_action: {\n action: \"navigate\",\n navigation_path: \"lights\",\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 {LightChip};\n","import {AbstractChip} from \"./AbstractChip\";\nimport {TemplateChipConfig} from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\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 LightControlChip 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 icon: \"mdi:lightbulb-auto\",\n icon_color: \"{% if is_state(config.entity, 'on') %}green{% else %}red{% endif %}\",\n tap_action: {\n action: \"more-info\"\n },\n // double_tap_action: {\n // action: \"call-service\",\n // service: \"switch.toggle\",\n // data: {\n // entity_id: undefined\n // }\n // }\n };\n\n /**\n * Class Constructor.\n *\n * @param {chips.TemplateChipOptions} options The chip options.\n */\n constructor(entity_id: string) {\n super();\n\n this.#defaultConfig.entity = entity_id\n this.config = Object.assign(this.config, this.#defaultConfig);\n\n }\n}\n\nexport {LightControlChip};\n","import { AggregateAreaListPopup } from \"../popups/AggregateAreaListPopup\";\nimport { AggregateListPopup } from \"../popups/AggregateListPopup\";\nimport { MagicAreaRegistryEntry } from \"../types/homeassistant/data/device_registry\";\nimport { ConditionalChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { DOMAIN_ICONS } 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 LinusAggregateChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @type {ConditionalChipConfig | undefined}\n *\n */\n getDefaultConfig(device: MagicAreaRegistryEntry, deviceClass: string, showContent: boolean, by_area: boolean = false): ConditionalChipConfig | undefined {\n\n const entity = device.entities[`aggregate_${deviceClass}`]\n\n if(!entity?.entity_id) return undefined\n\n const domain = entity?.entity_id.split(\".\")[0]\n\n let icon = DOMAIN_ICONS[deviceClass as \"motion\"]\n let icon_color = ''\n let content = ''\n\n if (domain === \"binary_sensor\") {\n icon_color = `{{ 'red' if expand(states.${entity?.entity_id}.attributes.sensors is defined and states.${entity?.entity_id}.attributes.sensors) | selectattr( 'state', 'eq', 'on') | list | count > 0 else 'grey' }}`\n content = showContent ? `{{ expand(states.${entity?.entity_id}.attributes.sensors is defined and states.${entity?.entity_id}.attributes.sensors) | selectattr( 'state', 'eq', 'on') | list | count }}` : \"\"\n }\n\n if (domain === \"sensor\") {\n if (deviceClass === \"battery\") {\n icon_color = `{% set bl = states('${entity?.entity_id}') %}\n {% if bl == 'unknown' or bl == 'unavailable' %}\n {% elif bl | int() < 30 %} red\n {% elif bl | int() < 50 %} orange\n {% elif bl | int() <= 100 %} green\n {% else %} disabled{% endif %}`\n icon = `{% set bl = states('${entity?.entity_id}') %}\n {% if bl == 'unknown' or bl == 'unavailable' %}\n {% elif bl | int() < 10 %}mdi:battery-outline\n {% elif bl | int() < 20 %} mdi:battery1\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{% endif %} `\n content = showContent ? `{{ states('${entity?.entity_id}') | int | round(1) }} %` : \"\"\n }\n if (deviceClass === \"temperature\") icon_color = `{% set bl = states('${entity?.entity_id}') | int() %} {% if bl < 20 %} blue\n {% elif bl < 30 %} orange\n {% elif bl >= 30 %} red{% else %} disabled{% endif %}`\n if (deviceClass === \"illuminance\") icon_color = `{{ 'blue' if 'dark' in state_attr('${device.entities.area_state?.entity_id}', 'states') else 'amber' }}`\n\n content = showContent ? `{{ states.${entity?.entity_id}.state | float | round(1) }} {{ states.${entity?.entity_id}.attributes.unit_of_measurement }}` : \"\"\n }\n\n if (deviceClass === \"cover\") {\n icon_color = `{{ 'red' if is_state('${entity?.entity_id}', 'open') else 'grey' }}`\n content = showContent ? `{{ expand(states.${entity?.entity_id}.attributes.entity_id) | selectattr( 'state', 'eq', 'open') | list | count }}` : \"\"\n }\n\n if (deviceClass === \"health\") {\n icon_color = `{{ 'red' if is_state(entity, 'on') else 'green' }}`\n }\n\n const tap_action = by_area ? new AggregateAreaListPopup(entity?.entity_id, deviceClass).getPopup() : new AggregateListPopup(entity?.entity_id, deviceClass).getPopup()\n\n return {\n type: \"conditional\",\n conditions: [\n {\n entity: entity?.entity_id ?? \"\",\n state_not: \"unavailable\"\n }\n ],\n chip: {\n type: \"template\",\n entity: entity?.entity_id,\n icon_color: icon_color,\n icon: icon,\n content: content,\n tap_action: tap_action\n },\n }\n }\n\n /**\n * Class Constructor.\n *\n * @param {chips.TemplateChipOptions} options The chip options.\n */\n constructor(device: MagicAreaRegistryEntry, deviceClass: string, showContent: boolean = false, by_area: boolean = false) {\n super();\n\n const defaultConfig = this.getDefaultConfig(device, deviceClass, showContent, by_area)\n\n this.config = Object.assign(this.config, defaultConfig);\n\n }\n}\n\nexport { LinusAggregateChip };\n","import { AlarmChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\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 LinusAlarmChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @type {ConditionalChipConfig}\n *\n */\n getDefaultConfig(entity_id: any): AlarmChipConfig {\n return {\n type: \"alarm-control-panel\",\n entity: entity_id,\n tap_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(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 {LinusAlarmChip};\n","import { MagicAreaRegistryEntry } from \"../types/homeassistant/data/device_registry\";\nimport { TemplateChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\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 LinusClimateChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @type {ConditionalChipConfig}\n *\n */\n getDefaultConfig(device: MagicAreaRegistryEntry, showContent: boolean): TemplateChipConfig {\n return {\n \"type\": \"template\",\n \"entity\": device.entities.aggregate_climate?.entity_id,\n \"icon_color\": `{{ 'orange' if is_state('${device.entities.aggregate_climate?.entity_id}', 'heat') else 'grey' }}`,\n \"icon\": \"mdi:thermostat\",\n \"content\": showContent ? `{{ states.${device.entities.aggregate_climate?.entity_id}.attributes.preset_mode }}` : \"\",\n // \"tap_action\": climateList(hass, area)\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 { LinusClimateChip };\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 { AggregateListPopup } from \"../popups/AggregateListPopup\";\nimport { MagicAreaRegistryEntry } from \"../types/homeassistant/data/device_registry\";\nimport { DOMAIN } from \"../variables\";\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 LinusLightChip extends AbstractChip {\n\n /**\n * Class Constructor.\n *\n * @param {chips.TemplateChipOptions} options The chip options.\n */\n constructor(device: MagicAreaRegistryEntry, area_id: string, show_content?: boolean, show_group?: boolean) {\n super();\n\n const defaultConfig: TemplateChipConfig = {\n type: \"template\",\n entity: device.entities.all_lights?.entity_id,\n icon_color: `{{ 'amber' if expand(states.${device.entities.all_lights?.entity_id}.attributes.entity_id) | selectattr( 'state', 'eq', 'on') | list | count > 0 else 'grey' }}`,\n icon: \"mdi:lightbulb-group\",\n content: show_content ? `{{ expand(states.${device.entities.all_lights?.entity_id}.attributes.entity_id) | selectattr( 'state', 'eq', 'on') | list | count }}` : \"\",\n tap_action: show_group ? new AggregateListPopup(device.entities.all_lights?.entity_id, \"light\").getPopup() : {\n action: \"call-service\",\n service: `${DOMAIN}.area_light_toggle`,\n data: {\n area: area_id\n }\n }\n }\n\n this.config = Object.assign(this.config, defaultConfig);\n }\n}\n\nexport { LinusLightChip };\n","import { MagicAreaRegistryEntry } from \"../types/homeassistant/data/device_registry\";\nimport { ConditionalChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { chips } from \"../types/strategy/chips\";\nimport { navigateTo } from \"../utils\";\nimport { DOMAIN_STATE_ICONS } from \"../variables\";\nimport { AbstractChip } from \"./AbstractChip\";\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 on and to turn all off.\n */\nclass MotionChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @type {ConditionalChipConfig}\n *\n */\n getDefaultConfig(entity_id: string): ConditionalChipConfig {\n const icon = DOMAIN_STATE_ICONS.binary_sensor.motion\n return {\n type: \"conditional\",\n conditions: [\n {\n entity: entity_id,\n state_not: \"unavailable\"\n }\n ],\n chip: {\n type: \"template\",\n entity: entity_id,\n icon_color: \"{{ 'red' if is_state(entity, 'on') else 'grey' }}\",\n icon: `{{ '${icon.on}' if is_state(entity, 'on') else '${icon.off}' }}`,\n content: `{{ expand(states.${entity_id}.attributes.entity_id is defined and states.${entity_id}.attributes.entity_id) | selectattr( 'state', 'eq', 'on') | list | count }}`,\n tap_action: navigateTo('security-details'),\n },\n }\n }\n\n /**\n * Class Constructor.\n *\n * @param {chips.TemplateChipOptions} options The chip options.\n */\n constructor(device: MagicAreaRegistryEntry, options: chips.TemplateChipOptions = {}) {\n super();\n\n if (device.entities.aggregate_motion?.entity_id) {\n const defaultConfig = this.getDefaultConfig(device.entities.aggregate_motion.entity_id)\n this.config = Object.assign(this.config, defaultConfig);\n }\n\n\n }\n}\n\nexport { MotionChip };\n","import { MagicAreaRegistryEntry } from \"../types/homeassistant/data/device_registry\";\nimport { ConditionalChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { chips } from \"../types/strategy/chips\";\nimport { navigateTo } from \"../utils\";\nimport { DOMAIN_STATE_ICONS } from \"../variables\";\nimport { AbstractChip } from \"./AbstractChip\";\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 on and to turn all off.\n */\nclass SafetyChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @type {ConditionalChipConfig}\n *\n */\n getDefaultConfig(entity_id: string): ConditionalChipConfig {\n const icon = DOMAIN_STATE_ICONS.binary_sensor.safety\n return {\n type: \"conditional\",\n conditions: [\n {\n entity: entity_id,\n state_not: \"unavailable\"\n }\n ],\n chip: {\n type: \"template\",\n entity: entity_id,\n icon_color: \"{{ 'red' if is_state(entity, 'on') else 'grey' }}\",\n icon: `{{ '${icon.on}' if is_state(entity, 'on') else '${icon.off}' }}`,\n content: `{{ expand(states.${entity_id}.attributes.entity_id is defined and states.${entity_id}.attributes.entity_id) | selectattr( 'state', 'eq', 'on') | list | count }}`,\n tap_action: navigateTo('security-details'),\n },\n }\n }\n\n /**\n * Class Constructor.\n *\n * @param {chips.TemplateChipOptions} options The chip options.\n */\n constructor(device: MagicAreaRegistryEntry, options: chips.TemplateChipOptions = {}) {\n super();\n\n if (device.entities.aggregate_safety?.entity_id) {\n const defaultConfig = this.getDefaultConfig(device.entities.aggregate_safety.entity_id)\n this.config = Object.assign(this.config, defaultConfig);\n }\n\n\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 icon_color: \"blue\",\n content: Helper.getCountTemplate(\"switch\", \"eq\", \"on\"),\n tap_action: {\n action: \"navigate\",\n navigation_path: \"switches\",\n },\n hold_action: {\n action: \"navigate\",\n navigation_path: \"switches\",\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 {SwitchChip};\n","import { MagicAreaRegistryEntry } from \"../types/homeassistant/data/device_registry\";\nimport { TemplateChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { 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: `${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 { GroupListPopup } from \"../popups/GroupListPopup\";\nimport { AbstractChip } from \"./AbstractChip\";\nimport { EntityRegistryEntry } from '../types/homeassistant/data/entity_registry';\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 getDefaultConfig(entities: EntityRegistryEntry[]) {\n return {\n type: \"template\",\n icon_color: \"orange\",\n icon: 'mdi:help',\n tap_action: new GroupListPopup(entities, \"Unavailable entities\").getPopup()\n };\n }\n /**\n * Class Constructor.\n *\n * @param {EntityRegistryEntry[]} entities The chip entities.\n */\n constructor(entities: EntityRegistryEntry[]) {\n super();\n const defaultConfig = this.getDefaultConfig(entities);\n this.config = Object.assign(this.config, 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 { MagicAreaRegistryEntry } from \"../types/homeassistant/data/device_registry\";\nimport { ConditionalChipConfig } from \"../types/lovelace-mushroom/utils/lovelace/chip/types\";\nimport { chips } from \"../types/strategy/chips\";\nimport { navigateTo } from \"../utils\";\nimport { DOMAIN_STATE_ICONS } from \"../variables\";\nimport { AbstractChip } from \"./AbstractChip\";\n\n// noinspection JSUnusedGlobalSymbols Class is dynamically imported.\n/**\n * Window Chip class.\n *\n * Used to create a chip to indicate how many windows are on and to turn all off.\n */\nclass WindowChip extends AbstractChip {\n /**\n * Default configuration of the chip.\n *\n * @type {ConditionalChipConfig}\n *\n */\n getDefaultConfig(entity_id: string): ConditionalChipConfig {\n const icon = DOMAIN_STATE_ICONS.binary_sensor.window\n return {\n type: \"conditional\",\n conditions: [\n {\n entity: entity_id,\n state_not: \"unavailable\"\n }\n ],\n chip: {\n type: \"template\",\n entity: entity_id,\n icon_color: \"{{ 'red' if is_state(entity, 'on') else 'grey' }}\",\n icon: `{{ '${icon.on}' if is_state(entity, 'on') else '${icon.off}' }}`,\n content: `{{ expand(states.${entity_id}.attributes.entity_id is defined and states.${entity_id}.attributes.entity_id) | selectattr( 'state', 'eq', 'on') | list | count }}`,\n tap_action: navigateTo('security-details'),\n },\n }\n }\n\n /**\n * Class Constructor.\n *\n * @param {chips.TemplateChipOptions} options The chip options.\n */\n constructor(device: MagicAreaRegistryEntry, options: chips.TemplateChipOptions = {}) {\n super();\n\n if (device.entities?.aggregate_window?.entity_id) {\n const defaultConfig = this.getDefaultConfig(device.entities.aggregate_window.entity_id)\n this.config = Object.assign(this.config, defaultConfig);\n }\n\n }\n}\n\nexport { WindowChip };\n","import { generic } from \"./types/strategy/generic\";\nimport StrategyDefaults = generic.StrategyDefaults;\nimport { LightControlChip } from \"./chips/LightControlChip\";\nimport { SettingsChip } from \"./chips/SettingsChip\";\nimport { LightSettings } from \"./popups/LightSettingsPopup\";\nimport { ToggleSceneChip } from \"./chips/ToggleSceneChip\";\nimport { SceneSettings } from \"./popups/SceneSettingsPopup\";\nimport { MagicAreaRegistryEntry } from \"./types/homeassistant/data/device_registry\";\n\n/**\n * Default configuration for the mushroom strategy.\n */\nexport const configurationDefaults: StrategyDefaults = {\n areas: {\n undisclosed: {\n aliases: [],\n area_id: \"undisclosed\",\n name: \"Non assigné\",\n picture: null,\n hidden: false,\n }\n },\n floors: {\n undisclosed: {\n aliases: [],\n floor_id: \"undisclosed\",\n name: \"Non assigné\",\n hidden: false,\n }\n },\n debug: true,\n domains: {\n _: {\n hide_config_entities: false,\n },\n default: {\n title: \"Divers\",\n showControls: false,\n hidden: false,\n },\n light: {\n // title: \"Lights\",\n showControls: true,\n extraControls: (device: MagicAreaRegistryEntry) => {\n return [\n new LightControlChip(device.entities.light_control?.entity_id).getChip(),\n new SettingsChip({ tap_action: new LightSettings(device).getPopup() }).getChip()\n ]\n },\n iconOn: \"mdi:lightbulb\",\n iconOff: \"mdi:lightbulb-off\",\n onService: \"light.turn_on\",\n offService: \"light.turn_off\",\n hidden: false,\n order: 1\n },\n scene: {\n title: \"Scènes\",\n showControls: false,\n extraControls: (device: MagicAreaRegistryEntry) => {\n\n return [\n {\n type: \"conditional\",\n conditions: [{\n entity: device.entities.all_lights?.entity_id,\n state_not: \"unavailable\"\n }],\n chip: new ToggleSceneChip(device).getChip(),\n },\n new SettingsChip({ tap_action: new SceneSettings(device).getPopup() }).getChip()\n ]\n },\n iconOn: \"mdi:lightbulb\",\n iconOff: \"mdi:lightbulb-off\",\n onService: \"scene.turn_on\",\n hidden: false,\n order: 2\n },\n fan: {\n title: \"Fans\",\n showControls: true,\n iconOn: \"mdi:fan\",\n iconOff: \"mdi:fan-off\",\n onService: \"fan.turn_on\",\n offService: \"fan.turn_off\",\n hidden: false,\n order: 4\n },\n cover: {\n title: \"Covers\",\n showControls: true,\n iconOn: \"mdi:arrow-up\",\n iconOff: \"mdi:arrow-down\",\n onService: \"cover.open_cover\",\n offService: \"cover.close_cover\",\n hidden: false,\n order: 8\n },\n switch: {\n title: \"Switches\",\n showControls: true,\n iconOn: \"mdi:power-plug\",\n iconOff: \"mdi:power-plug-off\",\n onService: \"switch.turn_on\",\n offService: \"switch.turn_off\",\n hidden: false,\n order: 5\n },\n camera: {\n title: \"Cameras\",\n showControls: false,\n hidden: false,\n order: 6\n },\n lock: {\n title: \"Locks\",\n showControls: false,\n hidden: false,\n order: 7\n },\n climate: {\n title: \"Climates\",\n showControls: true,\n hidden: false,\n order: 3\n },\n media_player: {\n title: \"Media Players\",\n showControls: true,\n hidden: false,\n order: 9\n },\n sensor: {\n title: \"Sensors\",\n showControls: false,\n hidden: false,\n },\n binary_sensor: {\n title: \"Binary Sensors\",\n showControls: false,\n hidden: false,\n },\n number: {\n title: \"Numbers\",\n showControls: false,\n hidden: false,\n },\n vacuum: {\n title: \"Vacuums\",\n showControls: true,\n hidden: false,\n order: 10\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 media_player: {\n order: 4,\n hidden: false,\n },\n climate: {\n order: 5,\n hidden: false,\n },\n fan: {\n order: 6,\n hidden: false,\n },\n cover: {\n order: 7,\n hidden: false,\n },\n camera: {\n order: 8,\n hidden: false,\n },\n switch: {\n order: 9,\n hidden: false,\n },\n vacuum: {\n order: 10,\n hidden: false,\n },\n scene: {\n order: 11,\n hidden: false,\n },\n securityDetails: {\n hidden: false,\n },\n }\n};\n","import { Helper } from \"./Helper\";\nimport { SensorCard } from \"./cards/SensorCard\";\nimport { ControllerCard } from \"./cards/ControllerCard\";\nimport { generic } from \"./types/strategy/generic\";\nimport { LovelaceCardConfig, LovelaceConfig, LovelaceViewConfig } from \"./types/homeassistant/data/lovelace\";\nimport { StackCardConfig } from \"./types/homeassistant/lovelace/cards/types\";\nimport { EntityCardConfig } from \"./types/lovelace-mushroom/cards/entity-card-config\";\nimport { HassServiceTarget } from \"home-assistant-js-websocket\";\nimport StrategyArea = generic.StrategyArea;\nimport { SwipeCard } from \"./cards/SwipeCard\";\nimport { MainAreaCard } from \"./cards/MainAreaCard\";\nimport { SwipeCardConfig } from \"./types/lovelace-mushroom/cards/swipe-card-config\";\n\n/**\n * Mushroom Dashboard Strategy.
\n *
\n * Mushroom dashboard strategy provides a strategy for Home-Assistant to create a dashboard automatically.
\n * The strategy makes use Mushroom and Mini Graph cards to represent your entities.
\n *
\n * Features:
\n * 🛠 Automatically create dashboard with three lines of yaml.
\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/mushroom-strategy} for more information.\n */\nclass MushroomStrategy 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 await Helper.initialize(info);\n\n // Create views.\n const views: LovelaceViewConfig[] = info.config?.views ?? [];\n\n let viewModule;\n\n // Create a view for each exposed domain.\n for (let viewId of Helper.getExposedViewIds()) {\n try {\n const viewType = Helper.sanitizeClassName(viewId + \"View\");\n viewModule = await import(`./views/${viewType}`);\n const view: LovelaceViewConfig = await new viewModule[viewType](Helper.strategyOptions.views[viewId]).getView();\n\n if (view.cards?.length) {\n views.push(view);\n }\n } catch (e) {\n Helper.logError(`View '${viewId}' couldn't be loaded!`, e);\n }\n }\n\n // Create subviews for each area.\n for (let area of Helper.areas) {\n if (!area.hidden) {\n views.push({\n title: area.name,\n path: area.area_id ?? area.name,\n subview: true,\n strategy: {\n type: \"custom:mushroom-strategy\",\n options: {\n area,\n },\n },\n });\n }\n }\n\n // Add custom views.\n if (Helper.strategyOptions.extra_views) {\n views.push(...Helper.strategyOptions.extra_views);\n }\n\n // Return the created views.\n return {\n views: views,\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 static async generateView(info: generic.ViewInfo): Promise {\n const exposedDomainIds = Helper.getExposedDomainIds();\n const area = info.view.strategy?.options?.area ?? {} as StrategyArea;\n const viewCards: LovelaceCardConfig[] = [...(area.extra_cards ?? [])];\n\n\n if (area.area_id !== \"undisclosed\")\n viewCards.push(new MainAreaCard(area).getCard());\n\n // Set the target for controller cards to the current area.\n let target: HassServiceTarget = {\n area_id: [area.area_id],\n area_name: [area.name],\n };\n\n // Create cards for each domain.\n for (const domain of exposedDomainIds) {\n if (domain === \"default\") {\n continue;\n }\n\n const className = Helper.sanitizeClassName(domain + \"Card\");\n\n let domainCards = [];\n\n try {\n domainCards = await import(`./cards/${className}`).then(cardModule => {\n let domainCards = [] as any[];\n const entities = Helper.getDeviceEntities(area, domain);\n let configEntityHidden =\n Helper.strategyOptions.domains[domain ?? \"_\"].hide_config_entities\n || Helper.strategyOptions.domains[\"_\"].hide_config_entities;\n\n const magicAreasDevice = Helper.magicAreasDevices[area.name]\n const magicAreasKey = domain === \"light\" ? 'all_lights' : `${domain}_group`\n\n // Set the target for controller cards to linus aggregate entity if exist.\n if (magicAreasDevice && magicAreasDevice.entities[magicAreasKey]) {\n target[\"entity_id\"] = magicAreasDevice.entities[magicAreasKey].entity_id\n } else {\n target[\"entity_id\"] = undefined\n }\n // Set the target for controller cards to entities without an area.\n if (area.area_id === \"undisclosed\") {\n target = {\n entity_id: entities.map(entity => entity.entity_id),\n }\n }\n\n if (entities.length) {\n // Create a Controller card for the current domain.\n\n const title = Helper.localize(domain === 'scene' ? 'ui.dialogs.quick-bar.commands.navigation.scene' :`component.${domain}.entity_component._.name`);\n const titleCard = new ControllerCard(\n target,\n { ...Helper.strategyOptions.domains[domain], domain, title },\n ).createCard();\n\n if (domain === \"sensor\") {\n // Create a card for each entity-sensor of the current area.\n const sensorStates = Helper.getStateEntities(area, \"sensor\");\n const sensorCards: EntityCardConfig[] = [];\n\n for (const sensor of entities) {\n // Find the state of the current sensor.\n const sensorState = sensorStates.find(state => state.entity_id === sensor.entity_id);\n let cardOptions = Helper.strategyOptions.card_options?.[sensor.entity_id];\n let deviceOptions = Helper.strategyOptions.card_options?.[sensor.device_id ?? \"null\"];\n\n if (!cardOptions?.hidden && !deviceOptions?.hidden) {\n if (sensorState?.attributes.unit_of_measurement) {\n cardOptions = {\n ...{\n type: \"custom:mini-graph-card\",\n entities: [sensor.entity_id],\n },\n ...cardOptions,\n };\n }\n\n sensorCards.push(new SensorCard(sensor, cardOptions).getCard());\n }\n }\n\n if (sensorCards.length) {\n domainCards.push(new SwipeCard(sensorCards).getCard())\n\n domainCards.unshift(titleCard);\n }\n\n return domainCards;\n }\n\n // Create a card for each other domain-entity of the current area.\n for (const entity of entities) {\n let deviceOptions;\n let cardOptions = Helper.strategyOptions.card_options?.[entity.entity_id];\n\n if (entity.device_id) {\n deviceOptions = Helper.strategyOptions.card_options?.[entity.device_id];\n }\n\n // Don't include the entity if hidden in the strategy options.\n if (cardOptions?.hidden || deviceOptions?.hidden) {\n continue;\n }\n\n // Don't include the config-entity if hidden in the strategy options.\n if (entity.entity_category === \"config\" && configEntityHidden) {\n continue;\n }\n\n domainCards.push(new cardModule[className](entity, cardOptions).getCard());\n }\n\n domainCards = [new SwipeCard(domainCards).getCard()];\n\n if (domainCards.length) {\n domainCards.unshift(titleCard);\n }\n }\n\n return domainCards;\n });\n } catch (e) {\n Helper.logError(\"An error occurred while creating the domain cards!\", e);\n }\n\n if (domainCards.length) {\n viewCards.push({\n type: \"vertical-stack\",\n cards: domainCards,\n });\n }\n }\n\n if (!Helper.strategyOptions.domains.default.hidden) {\n // Create cards for any other domain.\n // Collect device entities of the current area.\n const areaDevices = Helper.devices.filter((device) => device.area_id === area.area_id)\n .map((device) => device.id);\n\n // Collect the remaining entities of which all conditions below are met:\n // 1. The entity is not hidden.\n // 2. The entity's domain isn't exposed (entities of exposed domains are already included).\n // 3. The entity is linked to a device which is linked to the current area,\n // or the entity itself is linked to the current area.\n const miscellaneousEntities = Helper.entities.filter((entity) => {\n const entityLinked = areaDevices.includes(entity.device_id ?? \"null\") || entity.area_id === 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 // Create a column of miscellaneous entity cards.\n if (miscellaneousEntities.length) {\n let miscellaneousCards: (StackCardConfig | EntityCardConfig | SwipeCardConfig)[] = [];\n\n try {\n miscellaneousCards = await import(\"./cards/MiscellaneousCard\").then(cardModule => {\n const miscellaneousCards: (StackCardConfig | EntityCardConfig)[] = [\n new ControllerCard(target, Helper.strategyOptions.domains.default).createCard(),\n ];\n\n const swipeCard = []\n\n for (const entity of miscellaneousEntities) {\n let cardOptions = Helper.strategyOptions.card_options?.[entity.entity_id];\n let deviceOptions = Helper.strategyOptions.card_options?.[entity.device_id ?? \"null\"];\n\n // Don't include the entity if hidden in the strategy options.\n if (cardOptions?.hidden || deviceOptions?.hidden) {\n continue;\n }\n\n // Don't include the config-entity if hidden in the strategy options\n if (entity.entity_category === \"config\" && Helper.strategyOptions.domains[\"_\"].hide_config_entities) {\n continue;\n }\n\n swipeCard.push(new cardModule.MiscellaneousCard(entity, cardOptions).getCard());\n\n }\n\n return [...miscellaneousCards, new SwipeCard(swipeCard).getCard()];\n });\n } catch (e) {\n Helper.logError(\"An error occurred while creating the domain cards!\", e);\n }\n\n viewCards.push({\n type: \"vertical-stack\",\n cards: miscellaneousCards,\n });\n }\n }\n\n // Return cards.\n return {\n cards: viewCards,\n };\n }\n}\n\ncustomElements.define(\"ll-strategy-mushroom-strategy\", MushroomStrategy);\n\nexport const version = \"v4.0.1\";\nconsole.info(\n \"%c Linus Strategy %c \".concat(version, \" \"),\n \"color: white; background: coral; font-weight: 700;\", \"color: coral; background: white; 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 { PopupActionConfig } from \"../types/homeassistant/data/lovelace\";\nimport { StackCardConfig } from \"../types/homeassistant/lovelace/cards/types\";\nimport { TemplateCardConfig } from \"../types/lovelace-mushroom/cards/template-card-config\";\nimport { TitleCardConfig } from \"../types/lovelace-mushroom/cards/title-card-config\";\nimport { groupBy } 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 AggregateAreaListPopup extends AbstractPopup {\n\n getDefaultConfig(aggregate_entity: any, deviceClass: string, is_binary_sensor: boolean): PopupActionConfig {\n\n const groupedCards: (TitleCardConfig | StackCardConfig)[] = [];\n\n\n let areaCards: (TemplateCardConfig)[] = [];\n\n for (const [i, entity_id] of aggregate_entity.attributes.entity_id?.entries() ?? []) {\n\n // Get a card for the area.\n if (entity_id) {\n\n areaCards.push({\n type: \"tile\",\n entity: entity_id,\n // primary: area.name,\n state_content: is_binary_sensor ? 'last-changed' : 'state',\n color: is_binary_sensor ? 'red' : false,\n // badge_icon: \"mdi:numeric-9\",\n // badge_color: \"red\",\n });\n }\n \n // Horizontally group every two area cards if all cards are created.\n if (i === aggregate_entity.attributes.entity_id.length - 1) {\n for (let i = 0; i < areaCards.length; i += 2) {\n groupedCards.push({\n type: \"horizontal-stack\",\n cards: areaCards.slice(i, i + 2),\n } as StackCardConfig);\n }\n }\n\n }\n\n return {\n \"action\": \"fire-dom-event\",\n \"browser_mod\": {\n \"service\": \"browser_mod.popup\",\n \"data\": {\n \"title\": aggregate_entity?.attributes?.friendly_name,\n \"content\": {\n \"type\": \"vertical-stack\",\n \"cards\": [\n {\n type: \"custom:mushroom-entity-card\",\n entity: aggregate_entity.entity_id,\n color: is_binary_sensor ? 'red' : false,\n secondary_info: is_binary_sensor ? 'last-changed' : 'state',\n },\n {\n \"type\": \"history-graph\",\n \"hours_to_show\": 10,\n \"show_names\": false,\n \"entities\": [\n {\n \"entity\": aggregate_entity.entity_id,\n \"name\": \" \"\n }\n ]\n },\n ...groupedCards,\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, type: string) {\n super();\n\n const aggregate_entity = Helper.getEntityState(entity_id)\n\n if (aggregate_entity) {\n const is_binary_sensor = [\"motion\", \"window\", \"door\", \"health\"].includes(type)\n\n const defaultConfig = this.getDefaultConfig(aggregate_entity, type, is_binary_sensor)\n\n this.config = Object.assign(this.config, defaultConfig);\n }\n\n }\n}\n\nexport { AggregateAreaListPopup };\n","import { Helper } from \"../Helper\";\nimport { PopupActionConfig } from \"../types/homeassistant/data/lovelace\";\nimport { StackCardConfig } from \"../types/homeassistant/lovelace/cards/types\";\nimport { TemplateCardConfig } from \"../types/lovelace-mushroom/cards/template-card-config\";\nimport { TitleCardConfig } from \"../types/lovelace-mushroom/cards/title-card-config\";\nimport { groupBy } 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 AggregateListPopup extends AbstractPopup {\n\n getDefaultConfig(aggregate_entity: any, deviceClass: string, is_binary_sensor: boolean): PopupActionConfig {\n\n const groupedCards: (TitleCardConfig | StackCardConfig)[] = [];\n\n const areasByFloor = groupBy(Helper.areas, (e) => e.floor_id ?? \"undisclosed\");\n\n for (const floor of [...Helper.floors, Helper.strategyOptions.floors.undisclosed]) {\n\n if (!(floor.floor_id in areasByFloor) || areasByFloor[floor.floor_id].length === 0) continue\n\n groupedCards.push({\n type: \"custom:mushroom-title-card\",\n subtitle: floor.name,\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 areasByFloor[floor.floor_id].entries()) {\n\n const entity = Helper.magicAreasDevices[area.name]?.entities[`aggregate_${aggregate_entity.attributes?.device_class}`]\n\n // Get a card for the area.\n if (entity && !Helper.strategyOptions.areas[area.area_id]?.hidden) {\n\n areaCards.push({\n type: \"tile\",\n entity: entity?.entity_id,\n primary: area.name,\n state_content: is_binary_sensor ? 'last-changed' : 'state',\n color: is_binary_sensor ? 'red' : false,\n // badge_icon: \"mdi:numeric-9\",\n // badge_color: \"red\",\n });\n }\n \n // Horizontally group every two area cards if all cards are created.\n if (i === areasByFloor[floor.floor_id].length - 1) {\n for (let i = 0; i < areaCards.length; i += 2) {\n groupedCards.push({\n type: \"horizontal-stack\",\n cards: areaCards.slice(i, i + 2),\n } as StackCardConfig);\n }\n }\n\n }\n\n if(areaCards.length === 0) groupedCards.pop()\n \n }\n\n return {\n \"action\": \"fire-dom-event\",\n \"browser_mod\": {\n \"service\": \"browser_mod.popup\",\n \"data\": {\n \"title\": aggregate_entity?.attributes?.friendly_name,\n \"content\": {\n \"type\": \"vertical-stack\",\n \"cards\": [\n {\n type: \"custom:mushroom-entity-card\",\n entity: aggregate_entity.entity_id,\n color: is_binary_sensor ? 'red' : false,\n secondary_info: is_binary_sensor ? 'last-changed' : 'state',\n },\n {\n \"type\": \"history-graph\",\n \"hours_to_show\": 10,\n \"show_names\": false,\n \"entities\": [\n {\n \"entity\": aggregate_entity.entity_id,\n \"name\": \" \"\n }\n ]\n },\n ...groupedCards,\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, type: string) {\n super();\n\n const aggregate_entity = Helper.getEntityState(entity_id)\n\n if (aggregate_entity) {\n const is_binary_sensor = [\"motion\", \"window\", \"door\", \"health\"].includes(type)\n\n const defaultConfig = this.getDefaultConfig(aggregate_entity, type, is_binary_sensor)\n\n this.config = Object.assign(this.config, defaultConfig);\n }\n\n }\n}\n\nexport { AggregateListPopup };\n","import { Helper } from \"../Helper\";\nimport { MagicAreaRegistryEntry } from \"../types/homeassistant/data/device_registry\";\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 // {\n // type: \"horizontal-stack\",\n // cards: [\n // {\n // type: \"custom:mushroom-chips-card\",\n // alignment: \"end\",\n // chips: currentStateChip(states),\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 { EntityRegistryEntry } from \"../types/homeassistant/data/entity_registry\";\nimport { groupBy } 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 GroupListPopup extends AbstractPopup {\n getDefaultConfig(entities: EntityRegistryEntry[], title: string) {\n const entitiesByArea = groupBy(entities, (e) => e.area_id ?? \"undisclosed\");\n \n return {\n \"action\": \"fire-dom-event\",\n \"browser_mod\": {\n \"service\": \"browser_mod.popup\",\n \"data\": {\n \"title\": title,\n \"content\": {\n \"type\": \"vertical-stack\",\n \"cards\": Object.entries(entitiesByArea).map(([area_id, entities]) => ([\n {\n type: \"markdown\",\n content: `${Helper.areas.find(a => a.area_id === area_id)?.name}`,\n },\n {\n type: \"custom:layout-card\",\n layout_type: \"custom:horizontal-layout\",\n layout: {\n width: 150,\n },\n cards: entities?.map((entity) => ({\n type: \"custom:mushroom-entity-card\",\n vertical: true,\n entity: entity.entity_id,\n secondary_info: 'last-changed',\n })),\n }\n ])).flat()\n }\n }\n }\n };\n }\n /**\n * Class Constructor.\n *\n * @param {EntityRegistryEntry[]} entities The chip entities.\n * @param {string} title The chip title.\n */\n constructor(entities: EntityRegistryEntry[], title: string) {\n super();\n const defaultConfig = this.getDefaultConfig(entities, title);\n this.config = Object.assign(this.config, defaultConfig);\n }\n}\n\nexport {GroupListPopup};\n","import { Helper } from \"../Helper\";\nimport { MagicAreaRegistryEntry } from \"../types/homeassistant/data/device_registry\";\nimport { PopupActionConfig } from \"../types/homeassistant/data/lovelace\";\nimport { slugify } from \"../utils\";\nimport { 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: `${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","import { Helper } from \"../Helper\";\nimport { version } from \"../mushroom-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 LinusSettings 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: \"Paramètre de Linus\",\n content: {\n type: \"vertical-stack\",\n cards: [\n {\n type: \"horizontal-stack\",\n cards: [\n {\n type: \"custom:mushroom-template-card\",\n primary: \"Recharger Linus\",\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: \"Redémarrer Linus\",\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 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 { LinusSettings };\n","import { MagicAreaRegistryEntry } from \"../types/homeassistant/data/device_registry\";\nimport { PopupActionConfig } from \"../types/homeassistant/data/lovelace\";\nimport { slugify } from \"../utils\";\nimport { DOMAIN, todOrder } from \"../variables\";\nimport { AbstractPopup } from \"./AbstractPopup\";\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 ? todOrder.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: `${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 { 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\";\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 & { area: StrategyArea }\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 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 order?: number;\n hidden?: boolean;\n extra_cards?: LovelaceCardConfig[];\n type?: string;\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 }\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 { MagicAreaRegistryEntry } from \"./types/homeassistant/data/device_registry\";\nimport { EntityRegistryEntry } from \"./types/homeassistant/data/entity_registry\";\nimport { ActionConfig } from \"./types/homeassistant/data/lovelace\";\nimport { MAGIC_AREAS_AGGREGATE_DOMAINS, MAGIC_AREAS_GROUP_DOMAINS } from \"./variables\";\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\n\nexport function slugify(name: string | null): string {\n if (name === null) {\n return \"\";\n }\n return name.toLowerCase().normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\").replace(/\\s+/g, \"_\");\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: `/dashboard/${path}`,\n }\n}\n\nexport function getAggregateEntity(device: MagicAreaRegistryEntry, domains: string | string[], deviceClasses?: string | string[]): EntityRegistryEntry[] {\n\n const aggregateKeys = []\n\n for (const domain of Array.isArray(domains) ? domains : [domains]) {\n\n if (domain === \"light\") {\n Object.values(device.entities)?.map(entity => {\n if (entity.entity_id.endsWith('_lights')) {\n aggregateKeys.push(entity)\n }\n })\n }\n\n if (MAGIC_AREAS_GROUP_DOMAINS.includes(domain)) {\n aggregateKeys.push(device.entities[`${domain}_group` as 'cover_group'])\n }\n\n if (MAGIC_AREAS_AGGREGATE_DOMAINS.includes(domain)) {\n for (const deviceClass of Array.isArray(deviceClasses) ? deviceClasses : [deviceClasses]) {\n aggregateKeys.push(device.entities[`aggregate_${deviceClass}` as 'aggregate_motion'])\n }\n\n }\n }\n\n return aggregateKeys.filter(Boolean)\n}","export const DOMAIN = \"magic_areas\";\nexport const WEATHER_ICONS = {\n \"clear-night\": \"mdi:weather-night\",\n cloudy: \"mdi:weather-cloudy\",\n overcast: \"mdi:weather-cloudy-arrow-right\",\n fog: \"mdi:weather-fog\",\n hail: \"mdi:weather-hail\",\n lightning: \"mdi:weather-lightning\",\n \"lightning-rainy\": \"mdi:weather-lightning-rainy\",\n partlycloudy: \"mdi:weather-partly-cloudy\",\n pouring: \"mdi:weather-pouring\",\n rainy: \"mdi:weather-rainy\",\n snowy: \"mdi:weather-snowy\",\n \"snowy-rainy\": \"mdi:weather-snowy-rainy\",\n sunny: \"mdi:weather-sunny\",\n windy: \"mdi:weather-windy\",\n \"windy-variant\": \"mdi:weather-windy-variant\",\n};\n\nexport const ALARM_ICONS = {\n \"armed_away\": \"mdi:shield-lock\",\n \"armed_vacation\": \"mdi:shield-airplane\",\n \"armed_home\": \"mdi:shield-home\",\n \"armed_night\": \"mdi:shield-moon\",\n \"armed_custom_bypass\": \"mdi:security\",\n \"pending\": \"mdi:shield-outline\",\n \"triggered\": \"mdi:bell-ring\",\n disarmed: \"mdi:shield-off\",\n};\n\nexport const UNAVAILABLE = \"unavailable\";\nexport const UNKNOWN = \"unknown\";\n\n\nexport const todOrder = [\"morning\", \"daytime\", \"evening\", \"night\"];\n\n\nexport const STATES_OFF = [\"closed\", \"locked\", \"off\", \"docked\", \"idle\", \"standby\", \"paused\", \"auto\", \"ok\"];\n\nexport const UNAVAILABLE_STATES = [\"unavailable\", \"unknown\"];\n\nexport const MAGIC_AREAS_LIGHT_DOMAINS = \"light\";\nexport const MAGIC_AREAS_GROUP_DOMAINS = [\"cover\", \"climate\", \"media_player\"];\nexport const MAGIC_AREAS_AGGREGATE_DOMAINS = [\"binary_sensor\", \"sensor\"];\n\nexport const MAGIC_AREAS_DOMAINS = [MAGIC_AREAS_LIGHT_DOMAINS, ...MAGIC_AREAS_GROUP_DOMAINS, ...MAGIC_AREAS_AGGREGATE_DOMAINS];\n\nexport const SENSOR_DOMAINS = [\"sensor\"];\n\nexport const ALERT_DOMAINS = [\"binary_sensor\", \"health\"];\n\nexport const TOGGLE_DOMAINS = [\"light\", \"switch\"];\n\nexport const CLIMATE_DOMAINS = [\"climate\", \"fan\"];\n\nexport const HOUSE_INFORMATION_DOMAINS = [\"camera\", \"cover\", \"vacuum\", \"media_player\", \"lock\", \"plant\"];\n\nexport const OTHER_DOMAINS = [\"camera\", \"cover\", \"vacuum\", \"media_player\", \"lock\", \"scene\", \"plant\"];\n\nexport const AREA_CARDS_DOMAINS = [...TOGGLE_DOMAINS, ...CLIMATE_DOMAINS, ...OTHER_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_CARD_SENSORS_CLASS = [\"temperature\"];\n\nexport const DEVICE_ICONS = {\n presence_hold: 'mdi:car-brake-hold'\n};\n\nexport const DOMAIN_STATE_ICONS = {\n light: { on: \"mdi:lightbulb\", off: \"mdi:lightbulb-outline\" },\n switch: { on: \"mdi:power-plug\", off: \"mdi:power-plug\" },\n fan: { on: \"mdi:fan\", off: \"mdi:fan-off\" },\n sensor: { humidity: \"mdi:water-percent\", temperature: \"mdi:thermometer\", pressure: \"mdi:gauge\" },\n binary_sensor: {\n motion: { on: \"mdi:motion-sensor\", off: \"mdi:motion-sensor-off\" },\n door: { on: \"mdi:door-open\", off: \"mdi:door-closed\" },\n window: { on: \"mdi:window-open-variant\", off: \"mdi:window-closed-variant\" },\n safety: { on: \"mdi:alert-circle\", off: \"mdi:check-circle\" },\n vibration: \"mdi:vibrate\",\n moisture: \"mdi:water-alert\",\n smoke: \"mdi:smoke-detector-variant-alert\",\n },\n vacuum: { on: \"mdi:robot-vacuum\" },\n media_player: { on: \"mdi:cast-connected\" },\n lock: { on: \"mdi:lock-open\" },\n climate: { on: \"mdi:thermostat\" },\n camera: { on: \"mdi:video\" },\n cover: { on: \"mdi:window-shutter-open\", off: \"mdi:window-shutter\" },\n plant: { on: \"mdi:flower\", off: \"mdi:flower\" },\n};\n\nexport const DOMAIN_ICONS = {\n light: \"mdi:lightbulb\",\n climate: \"mdi:thermostat\",\n switch: \"mdi:power-plug\",\n fan: \"mdi:fan\",\n sensor: \"mdi:eye\",\n humidity: \"mdi:water-percent\",\n pressure: \"mdi:gauge\",\n illuminance: \"mdi:brightness-5\",\n temperature: \"mdi:thermometer\",\n energy: \"mdi:lightning-bolt\",\n power: \"mdi:flash\",\n binary_sensor: \"mdi:radiobox-blank\",\n motion: \"mdi:motion-sensor\",\n door: \"mdi:door-open\",\n window: \"mdi:window-open-variant\",\n vibration: \"mdi:vibrate\",\n moisture: \"mdi:water-alert\",\n vacuum: \"mdi:robot-vacuum\",\n media_player: \"mdi:cast-connected\",\n camera: \"mdi:video\",\n cover: \"mdi:window-shutter\",\n remote: \"mdi:remote\",\n scene: \"mdi:palette\",\n number: \"mdi:ray-vertex\",\n button: \"mdi:gesture-tap-button\",\n water_heater: \"mdi:thermometer\",\n select: \"mdi:format-list-bulleted\",\n lock: \"mdi:lock\",\n device_tracker: \"mdi:radar\",\n person: \"mdi:account-multiple\",\n weather: \"mdi:weather-cloudy\",\n automation: \"mdi:robot-outline\",\n alarm_control_panel: \"mdi:shield-home\",\n plant: 'mdi:flower',\n input_boolean: 'mdi:toggle-switch',\n health: 'mdi:shield-check-outline',\n};\n\nexport const SUPPORTED_CARDS_WITH_ENTITY = [\n \"button\",\n \"calendar\",\n \"entity\",\n \"gauge\",\n \"history-graph\",\n \"light\",\n \"media-control\",\n \"picture-entity\",\n \"sensor\",\n \"thermostat\",\n \"weather-forecast\",\n \"custom:button-card\",\n \"custom:mushroom-fan-card\",\n \"custom:mushroom-cover-card\",\n \"custom:mushroom-entity-card\",\n \"custom:mushroom-light-card\",\n \"tile\",\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 CLIMATE_PRESET_ICONS = {\n away: 'mdi:home',\n eco: 'mdi:leaf',\n boost: 'mdi:fire',\n comfort: 'mdi:sofa',\n home: 'mdi:home-account',\n sleep: 'mdi:weather-night',\n activity: 'mdi:briefcase',\n};\n","import { MAGIC_AREAS_DOMAINS } from './../variables';\nimport { Helper } from \"../Helper\";\nimport { ControllerCard } from \"../cards/ControllerCard\";\nimport { StackCardConfig } from \"../types/homeassistant/lovelace/cards/types\";\nimport { LovelaceCardConfig, LovelaceViewConfig } from \"../types/homeassistant/data/lovelace\";\nimport { cards } from \"../types/strategy/cards\";\nimport { TitleCardConfig } from \"../types/lovelace-mushroom/cards/title-card-config\";\nimport { HassServiceTarget } from \"home-assistant-js-websocket\";\nimport abstractCardConfig = cards.AbstractCardConfig;\nimport { SwipeCard } from \"../cards/SwipeCard\";\nimport { groupBy } from \"../utils\";\nimport { AggregateCard } from \"../cards/AggregateCard\";\nimport { TemplateCardConfig } from '../types/lovelace-mushroom/cards/template-card-config';\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 {LovelaceViewConfig}\n */\n config: LovelaceViewConfig = {\n icon: \"mdi:view-dashboard\",\n subview: false,\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 * The domain of which we operate the devices.\n *\n * @private\n * @readonly\n */\n readonly #domain?: string;\n\n /**\n * Class constructor.\n *\n * @param {string} [domain] The domain 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 = \"\") {\n if (!Helper.isInitialized()) {\n throw new Error(\"The Helper module must be initialized before using this one.\");\n }\n\n if (domain) {\n this.#domain = domain;\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 const configEntityHidden =\n Helper.strategyOptions.domains[this.#domain ?? \"_\"].hide_config_entities\n || Helper.strategyOptions.domains[\"_\"].hide_config_entities;\n\n\n if (this.#domain && MAGIC_AREAS_DOMAINS.includes(this.#domain)) {\n viewCards.push(new AggregateCard(this.#domain).createCard())\n }\n\n const areasByFloor = groupBy(Helper.areas, (e) => e.floor_id ?? \"undisclosed\");\n\n for (const floor of [...Helper.floors, Helper.strategyOptions.floors.undisclosed]) {\n\n if(this.#domain && MAGIC_AREAS_DOMAINS.includes(this.#domain) && floor.floor_id !== \"undisclosed\") continue\n if (!(floor.floor_id in areasByFloor) || areasByFloor[floor.floor_id].length === 0) continue\n\n\n let floorCards: (TemplateCardConfig)[] = [];\n\n if (floor.floor_id !== \"undisclosed\") {\n floorCards.push({\n type: \"custom:mushroom-title-card\",\n title: floor.name,\n card_mod: {\n style: `ha-card.header {padding-top: 8px;}`,\n }\n });\n }\n\n\n let areaCards: abstractCardConfig[] = [];\n\n // Create cards for each area.\n for (const [i, area] of areasByFloor[floor.floor_id].entries()) {\n\n areaCards = [];\n\n if(this.#domain && MAGIC_AREAS_DOMAINS.includes(this.#domain) && area.area_id !== \"undisclosed\") continue\n\n const entities = Helper.getDeviceEntities(area, this.#domain ?? \"\");\n const className = Helper.sanitizeClassName(this.#domain + \"Card\");\n const cardModule = await import(`../cards/${className}`);\n\n // Set the target for controller cards to the current area.\n let target: HassServiceTarget = {\n area_id: [area.area_id],\n area_name: [area.name],\n };\n\n // Set the target for controller cards to entities without an area.\n if (area.area_id === \"undisclosed\") {\n\n if (this.#domain === 'light')\n target = {\n entity_id: entities.map(entity => entity.entity_id),\n }\n }\n\n const swipeCard = []\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 if (entity.entity_category === \"config\" && configEntityHidden) {\n continue;\n }\n\n swipeCard.push(new cardModule[className](entity, cardOptions).getCard());\n }\n if (swipeCard.length) {\n areaCards.push(new SwipeCard(swipeCard).getCard())\n }\n\n // Vertical stack the area cards if it has entities.\n if (areaCards.length) {\n\n const titleCardOptions = (\"controllerCardOptions\" in this.config) ? this.config.controllerCardOptions : {};\n\n // Create and insert a Controller card.\n areaCards.unshift(new ControllerCard(target, Object.assign({ subtitle: area.name }, titleCardOptions)).createCard());\n\n floorCards.push({\n type: \"vertical-stack\",\n cards: areaCards,\n } as StackCardConfig);\n }\n }\n\n if (floorCards.length > 0) viewCards.push(...floorCards)\n }\n\n // Add a Controller Card for all the entities in the view.\n if (viewCards.length) {\n viewCards.unshift(this.viewControllerCard);\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 /**\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.entities.filter(\n entity =>\n entity.entity_id.startsWith(domain + \".\")\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 {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 controllerCardOptions: {\n showControls: false,\n },\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 {},\n {\n ...this.#viewControllerCardConfig,\n ...(\"controllerCardOptions\" in this.config ? this.config.controllerCardOptions : {}) as cards.ControllerCardConfig,\n }).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\";\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 controllerCardOptions: {\n showControls: false,\n },\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 ...(\"controllerCardOptions\" in this.config ? this.config.controllerCardOptions : {}) as cards.ControllerCardConfig,\n }).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: \"covers\",\n icon: \"mdi:window-open\",\n subview: false,\n controllerCardOptions: {\n iconOn: \"mdi:arrow-up\",\n iconOff: \"mdi:arrow-down\",\n onService: \"cover.open_cover\",\n offService: \"cover.close_cover\",\n },\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 ...(\"controllerCardOptions\" in this.config ? this.config.controllerCardOptions : {}) as cards.ControllerCardConfig,\n }).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 controllerCardOptions: {\n iconOn: \"mdi:fan\",\n iconOff: \"mdi:fan-off\",\n onService: \"fan.turn_on\",\n offService: \"fan.turn_off\",\n },\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 ...(\"controllerCardOptions\" in this.config ? this.config.controllerCardOptions : {}) as cards.ControllerCardConfig,\n }).createCard();\n }\n}\n\nexport {FanView};\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 { AreaCardConfig, StackCardConfig } from \"../types/homeassistant/lovelace/cards/types\";\nimport { TemplateCardConfig } from \"../types/lovelace-mushroom/cards/template-card-config\";\nimport { ActionConfig } from \"../types/homeassistant/data/lovelace\";\nimport { TitleCardConfig } from \"../types/lovelace-mushroom/cards/title-card-config\";\nimport { PersonCardConfig } from \"../types/lovelace-mushroom/cards/person-card-config\";\nimport { SettingsChip } from \"../chips/SettingsChip\";\nimport { LinusSettings } from \"../popups/LinusSettingsPopup\";\nimport { UnavailableChip } from \"../chips/UnavailableChip\";\nimport { UNAVAILABLE_STATES } from \"../variables\";\nimport { groupBy } from \"../utils\";\nimport { generic } from \"../types/strategy/generic\";\nimport isCallServiceActionConfig = generic.isCallServiceActionConfig;\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 * @extends AbstractView\n */\nclass HomeView extends AbstractView {\n /**\n * Default configuration of the view.\n *\n * @type {views.ViewConfig}\n * @private\n */\n #defaultConfig: views.ViewConfig = {\n title: \"Home\",\n icon: \"mdi:home-assistant\",\n path: \"home\",\n subview: false,\n };\n\n /**\n * Class constructor.\n *\n * @param {views.ViewConfig} [options={}] Options for the view.\n */\n constructor(options: views.ViewConfig = {}) {\n super();\n\n this.config = Object.assign(this.config, this.#defaultConfig, 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 createViewCards(): Promise<(StackCardConfig | TemplateCardConfig | ChipsCardConfig)[]> {\n return await Promise.all([\n this.#createChips(),\n this.#createPersonCards(),\n this.#createAreaSection(),\n ]).then(([chips, personCards, areaCards]) => {\n const options = Helper.strategyOptions;\n const homeViewCards = [];\n\n if (chips.length) {\n // TODO: Create the Chip card at this.#createChips()\n homeViewCards.push({\n type: \"custom:mushroom-chips-card\",\n alignment: \"center\",\n chips: chips,\n } as ChipsCardConfig)\n }\n\n if (personCards.length) {\n // TODO: Create the stack at this.#createPersonCards()\n homeViewCards.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 homeViewCards.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 == \"morning\") %} Bonjour, {{user}}!\n {% else %} Bonne nuit, {{user}}!\n {% endif %}`,\n icon: \"mdi:hand-wave\",\n icon_color: \"orange\",\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 homeViewCards.push(...options.quick_access_cards);\n }\n\n // Add area cards.\n homeViewCards.push({\n type: \"vertical-stack\",\n cards: areaCards,\n } as StackCardConfig);\n\n // Add custom cards.\n if (options.extra_cards) {\n homeViewCards.push(...options.extra_cards);\n }\n\n return homeViewCards;\n });\n }\n\n /**\n * Create the chips to include in the view.\n *\n * @return {Promise} Promise a chip array.\n */\n async #createChips(): Promise {\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 // TODO: Get domains from config.\n const exposedChips = [\"light\", \"fan\", \"cover\", \"switch\", \"climate\", \"safety\", \"motion\", \"door\", \"window\"];\n // Create a list of area-ids, used for switching all devices via chips\n const areaIds = Helper.areas.map(area => area.area_id ?? \"\");\n\n let chipModule;\n\n // Weather chip.\n const weatherEntityId = chipOptions?.weather_entity ?? Helper.entities.find(\n (entity) => entity.entity_id.startsWith(\"weather.\") && entity.disabled_by === null && entity.hidden_by === null,\n )?.entity_id;\n\n if (weatherEntityId) {\n try {\n chipModule = await import(\"../chips/WeatherChip\");\n const weatherChip = new chipModule.WeatherChip(weatherEntityId);\n\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 = chipOptions?.alarm_entity ?? Helper.getAlarmEntity()?.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.entities.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 // Numeric chips.\n for (let chipType of exposedChips) {\n if (chipOptions?.[`${chipType}_count` as string] ?? true) {\n const className = Helper.sanitizeClassName(chipType + \"Chip\");\n try {\n chipModule = await import((`../chips/${className}`));\n const chip = new chipModule[className](Helper.magicAreasDevices[\"Global\"]);\n\n if (\"tap_action\" in this.config && isCallServiceActionConfig(this.config.tap_action)) {\n chip.setTapActionTarget({ area_id: areaIds });\n }\n chips.push(chip.getChip());\n } catch (e) {\n Helper.logError(`An error occurred while creating the ${chipType} chip!`, e);\n }\n }\n }\n\n // Extra chips.\n if (chipOptions?.extra_chips) {\n chips.push(...chipOptions.extra_chips);\n }\n\n // Unavailable chip.\n const unavailableEntities = Object.values(Helper.magicAreasDevices[\"Global\"]?.entities)?.filter((e) => {\n const entityState = Helper.getEntityState(e.entity_id);\n return (exposedChips.includes(e.entity_id.split(\".\", 1)[0]) || exposedChips.includes(entityState?.attributes.device_class || '')) &&\n UNAVAILABLE_STATES.includes(entityState?.state);\n });\n\n if (unavailableEntities.length) {\n const unavailableChip = new UnavailableChip(unavailableEntities);\n chips.push(unavailableChip.getChip());\n }\n\n const linusSettings = new SettingsChip({ tap_action: new LinusSettings().getPopup() })\n\n chips.push(linusSettings.getChip());\n\n return chips;\n }\n\n /**\n * Create the person cards to include in the view.\n *\n * @return {PersonCardConfig[]} A Person Card array.\n */\n #createPersonCards(): PersonCardConfig[] {\n if (Helper.strategyOptions.home_view.hidden.includes(\"persons\")) {\n // Person section is hidden.\n\n return [];\n }\n\n const cards: PersonCardConfig[] = [];\n\n import(\"../cards/PersonCard\").then(personModule => {\n for (const person of Helper.entities.filter((entity) => {\n return entity.entity_id.startsWith(\"person.\")\n && entity.hidden_by == null\n && entity.disabled_by == null;\n })) {\n cards.push(new personModule.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<(TitleCardConfig | StackCardConfig)[]>} Promise an Area Card Section.\n */\n async #createAreaSection(): Promise<(TitleCardConfig | StackCardConfig)[]> {\n if (Helper.strategyOptions.home_view.hidden.includes(\"areas\")) {\n // Areas section is hidden.\n\n return [];\n }\n\n const groupedCards: (TitleCardConfig | StackCardConfig)[] = [];\n\n if (!Helper.strategyOptions.home_view.hidden.includes(\"areasTitle\")) {\n groupedCards.push({\n type: \"custom:mushroom-title-card\",\n title: `${Helper.localize(\"ui.components.area-picker.area\")}s`,\n },\n );\n }\n\n const areasByFloor = groupBy(Helper.areas, (e) => e.floor_id ?? \"undisclosed\");\n\n for (const floor of [...Helper.floors, Helper.strategyOptions.floors.undisclosed]) {\n\n let areaCards: (TemplateCardConfig | AreaCardConfig)[] = [];\n if (!(floor.floor_id in areasByFloor)) continue\n\n groupedCards.push({\n type: \"custom:mushroom-title-card\",\n subtitle: floor.name,\n card_mod: {\n style: `\n ha-card.header {\n padding-top: 8px;\n }\n `,\n }\n });\n\n for (const [i, area] of areasByFloor[floor.floor_id].entries()) {\n\n type ModuleType = typeof import(\"../cards/AreaCard\");\n\n let module: ModuleType;\n let moduleName =\n Helper.strategyOptions.areas[area.area_id]?.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/AreaCard\");\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.area_id as string]?.hidden) {\n let options = {\n ...Helper.strategyOptions.areas[\"_\"],\n ...Helper.strategyOptions.areas[area.area_id],\n };\n\n areaCards.push(new module.AreaCard(area, options).getCard());\n }\n\n // Horizontally group every two area cards if all cards are created.\n if (i === areasByFloor[floor.floor_id].length - 1) {\n for (let i = 0; i < areaCards.length; i += 1) {\n groupedCards.push({\n type: \"vertical-stack\",\n cards: areaCards.slice(i, i + 1),\n } as StackCardConfig);\n }\n }\n }\n }\n\n groupedCards.push({\n type: \"custom:mushroom-template-card\",\n primary: \"Ajouter une nouvelle pièce\",\n secondary: `Cliquer ici pour vous rendre sur la page des pièces`,\n multiline_secondary: true,\n icon: `mdi:view-dashboard-variant`,\n fill_container: true,\n tap_action: {\n action: \"navigate\",\n navigation_path: '/config/areas/dashboard'\n },\n } as any)\n\n return groupedCards;\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 controllerCardOptions: {\n iconOn: \"mdi:lightbulb\",\n iconOff: \"mdi:lightbulb-off\",\n onService: \"light.turn_on\",\n offService: \"light.turn_off\",\n },\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 ...(\"controllerCardOptions\" in this.config ? this.config.controllerCardOptions : {}) as cards.ControllerCardConfig,\n }).createCard();\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 controllerCardOptions: {\n showControls: false,\n },\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 ...(\"controllerCardOptions\" in this.config ? this.config.controllerCardOptions : {}) as cards.ControllerCardConfig,\n }).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 controllerCardOptions: {\n showControls: false,\n },\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 ...(\"controllerCardOptions\" in this.config ? this.config.controllerCardOptions : {}) as cards.ControllerCardConfig,\n }).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 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 { 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 { AlarmCard } from \"../cards/AlarmCard\";\nimport { PersonCard } from \"../cards/PersonCard\";\nimport { BinarySensorCard } from \"../cards/BinarySensorCard\";\nimport { navigateTo } from \"../utils\";\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 SecurityView {\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\",\n icon: \"mdi:security\",\n subview: false,\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 alarmEntity = Helper.getAlarmEntity();\n if (alarmEntity?.entity_id) {\n viewCards.push({\n type: \"custom:mushroom-title-card\",\n subtitle: \"Alarme\",\n card_mod: {\n style: `ha-card.header { padding-top: 8px; }`,\n }\n })\n viewCards.push(new AlarmCard(alarmEntity).getCard())\n }\n\n const persons = Helper.getPersonsEntity()\n if (persons?.length) {\n viewCards.push({\n type: \"custom:mushroom-title-card\",\n subtitle: \"Personnes\",\n card_mod: {\n style: `ha-card.header { padding-top: 8px; }`,\n }\n })\n\n for (const person of persons) {\n viewCards.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 const {\n aggregate_motion,\n aggregate_door,\n aggregate_window,\n } = globalDevice?.entities;\n\n if (aggregate_motion || aggregate_door || aggregate_window) {\n viewCards.push({\n type: \"custom:mushroom-title-card\",\n subtitle: \"Capteurs\",\n card_mod: {\n style: `ha-card.header { padding-top: 8px; }`,\n }\n })\n if (aggregate_motion?.entity_id) viewCards.push(new BinarySensorCard(aggregate_motion, { tap_action: navigateTo('security-details') }).getCard());\n if (aggregate_door?.entity_id) viewCards.push(new BinarySensorCard(aggregate_door, { tap_action: navigateTo('security-details') }).getCard());\n if (aggregate_window?.entity_id) viewCards.push(new BinarySensorCard(aggregate_window, { tap_action: navigateTo('security-details') }).getCard());\n }\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 { 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 * 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 controllerCardOptions: {\n iconOn: \"mdi:power-plug\",\n iconOff: \"mdi:power-plug-off\",\n onService: \"switch.turn_on\",\n offService: \"switch.turn_off\",\n },\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 ...(\"controllerCardOptions\" in this.config ? this.config.controllerCardOptions : {}) as cards.ControllerCardConfig,\n }).createCard();\n }\n}\n\nexport {SwitchView};\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 controllerCardOptions: {\n iconOn: \"mdi:robot-vacuum\",\n iconOff: \"mdi:robot-vacuum-off\",\n onService: \"vacuum.start\",\n offService: \"vacuum.stop\",\n },\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 ...(\"controllerCardOptions\" in this.config ? this.config.controllerCardOptions : {}) as cards.ControllerCardConfig,\n }).createCard();\n }\n}\n\nexport {VacuumView};\n","var map = {\n\t\"./AbstractCard\": [\n\t\t\"./src/cards/AbstractCard.ts\"\n\t],\n\t\"./AbstractCard.ts\": [\n\t\t\"./src/cards/AbstractCard.ts\"\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\"./AreaButtonCard\": [\n\t\t\"./src/cards/AreaButtonCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./AreaButtonCard.ts\": [\n\t\t\"./src/cards/AreaButtonCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./AreaCard\": [\n\t\t\"./src/cards/AreaCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./AreaCard.ts\": [\n\t\t\"./src/cards/AreaCard.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\"./HaAreaCard\": [\n\t\t\"./src/cards/HaAreaCard.ts\",\n\t\t\"main\"\n\t],\n\t\"./HaAreaCard.ts\": [\n\t\t\"./src/cards/HaAreaCard.ts\",\n\t\t\"main\"\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\"./MainAreaCard\": [\n\t\t\"./src/cards/MainAreaCard.ts\"\n\t],\n\t\"./MainAreaCard.ts\": [\n\t\t\"./src/cards/MainAreaCard.ts\"\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],\n\t\"./SensorCard.ts\": [\n\t\t\"./src/cards/SensorCard.ts\"\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\"./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],\n\t\"./AreaScenesChips.ts\": [\n\t\t\"./src/chips/AreaScenesChips.ts\"\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\t\"main\"\n\t],\n\t\"./ClimateChip.ts\": [\n\t\t\"./src/chips/ClimateChip.ts\",\n\t\t\"main\"\n\t],\n\t\"./CoverChip\": [\n\t\t\"./src/chips/CoverChip.ts\",\n\t\t\"main\"\n\t],\n\t\"./CoverChip.ts\": [\n\t\t\"./src/chips/CoverChip.ts\",\n\t\t\"main\"\n\t],\n\t\"./DoorChip\": [\n\t\t\"./src/chips/DoorChip.ts\",\n\t\t\"main\"\n\t],\n\t\"./DoorChip.ts\": [\n\t\t\"./src/chips/DoorChip.ts\",\n\t\t\"main\"\n\t],\n\t\"./FanChip\": [\n\t\t\"./src/chips/FanChip.ts\",\n\t\t\"main\"\n\t],\n\t\"./FanChip.ts\": [\n\t\t\"./src/chips/FanChip.ts\",\n\t\t\"main\"\n\t],\n\t\"./LightChip\": [\n\t\t\"./src/chips/LightChip.ts\",\n\t\t\"main\"\n\t],\n\t\"./LightChip.ts\": [\n\t\t\"./src/chips/LightChip.ts\",\n\t\t\"main\"\n\t],\n\t\"./LightControlChip\": [\n\t\t\"./src/chips/LightControlChip.ts\"\n\t],\n\t\"./LightControlChip.ts\": [\n\t\t\"./src/chips/LightControlChip.ts\"\n\t],\n\t\"./LinusAggregateChip\": [\n\t\t\"./src/chips/LinusAggregateChip.ts\"\n\t],\n\t\"./LinusAggregateChip.ts\": [\n\t\t\"./src/chips/LinusAggregateChip.ts\"\n\t],\n\t\"./LinusAlarmChip\": [\n\t\t\"./src/chips/LinusAlarmChip.ts\",\n\t\t\"main\"\n\t],\n\t\"./LinusAlarmChip.ts\": [\n\t\t\"./src/chips/LinusAlarmChip.ts\",\n\t\t\"main\"\n\t],\n\t\"./LinusClimateChip\": [\n\t\t\"./src/chips/LinusClimateChip.ts\",\n\t\t\"main\"\n\t],\n\t\"./LinusClimateChip.ts\": [\n\t\t\"./src/chips/LinusClimateChip.ts\",\n\t\t\"main\"\n\t],\n\t\"./LinusLightChip\": [\n\t\t\"./src/chips/LinusLightChip.ts\",\n\t\t\"main\"\n\t],\n\t\"./LinusLightChip.ts\": [\n\t\t\"./src/chips/LinusLightChip.ts\",\n\t\t\"main\"\n\t],\n\t\"./MotionChip\": [\n\t\t\"./src/chips/MotionChip.ts\",\n\t\t\"main\"\n\t],\n\t\"./MotionChip.ts\": [\n\t\t\"./src/chips/MotionChip.ts\",\n\t\t\"main\"\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\t\"main\"\n\t],\n\t\"./SwitchChip.ts\": [\n\t\t\"./src/chips/SwitchChip.ts\",\n\t\t\"main\"\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\t\"./WindowChip\": [\n\t\t\"./src/chips/WindowChip.ts\",\n\t\t\"main\"\n\t],\n\t\"./WindowChip.ts\": [\n\t\t\"./src/chips/WindowChip.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\"./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\"./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\"./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\"./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 __webpack_require__.e(ids[1]).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/mushroom-strategy.ts\");\n",""],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/custom_components/linus_dashboard/lovelace/ui-lovelace.yaml b/custom_components/linus_dashboard/lovelace/ui-lovelace.yaml new file mode 100644 index 0000000..3c76ab4 --- /dev/null +++ b/custom_components/linus_dashboard/lovelace/ui-lovelace.yaml @@ -0,0 +1,7 @@ +strategy: + type: custom:mushroom-strategy + options: + areas: + _: + type: AreaButtonCard +views: [] diff --git a/custom_components/linus_dashboard/manifest.json b/custom_components/linus_dashboard/manifest.json index 33453c5..8a09e44 100644 --- a/custom_components/linus_dashboard/manifest.json +++ b/custom_components/linus_dashboard/manifest.json @@ -1,12 +1,12 @@ { "domain": "linus_dashboard", - "name": "Linus Dashboard", + "name": "Linus dashboard", "codeowners": [ "@Thank-you-Linus" ], "config_flow": true, "documentation": "https://github.com/Thank-you-Linus/Linus-Dashboard", - "iot_class": "cloud_polling", + "iot_class": "calculated", "issue_tracker": "https://github.com/Thank-you-Linus/Linus-Dashboard/issues", - "version": "0.0.0" + "version": "0.0.1" } \ No newline at end of file diff --git a/hacs.json b/hacs.json index fd017d6..1afcc40 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1,5 @@ { - "name": "Linus Dashboard", + "name": "Linus dashboard", "hide_default_branch": true, "homeassistant": "2024.6.0", "render_readme": true diff --git a/scripts/develop b/scripts/develop index 9b633fd..fe75b05 100755 --- a/scripts/develop +++ b/scripts/develop @@ -11,7 +11,7 @@ if [[ ! -d "${PWD}/config" ]]; then fi # Set the path to custom_components -## This let's us have the structure we want /custom_components/Linus-Dashboard +## This let's us have the structure we want /custom_components/linus_dashboard ## while at the same time have Home Assistant configuration inside /config ## without resulting to symlinks. export PYTHONPATH="${PYTHONPATH}:${PWD}/custom_components"