diff --git a/Adding-and-Hiding-entities-and-devices.md b/Adding-and-Hiding-entities-and-devices.md deleted file mode 100644 index 013d758..0000000 --- a/Adding-and-Hiding-entities-and-devices.md +++ /dev/null @@ -1,33 +0,0 @@ -# Adding devices to areas - -You can add devices to an area by going to `Settings` found at the bottom of the sidebar. - -1. Click `Devices and integration`. -2. Select the integration of your device. -3. Click the device you wish to add. -4. Click the `pencil icon` found in the top right corner. -5. Enter an area in the area field. - -You can also set an entity of that device to a different area by going to the advanced settings of that entity. - -If you created an entity in your `configuration.yaml` you may need to enter a `unique_id` first before you set an area -to it. -See [Home Assistant's documentation](https://www.home-assistant.io/faq/unique_id/) for more info. - -# Hiding specific entities and devices - -When creating this dashboard for the first time, you probably have many entities that you don't want to see. -You can hide these entities by following the steps below: - -1. Click and hold the entity. -2. Click the `cog icon` in the top right corner of the popup. -3. Set `Visible` to `off`. - -The view should update when the page is refreshed. - -> [!NOTE] -> If you don't want to hide the entity from all dashboards, you can use [Card Options](https://github.com/AalianKhan/mushroom-strategy/wiki/Strategy-Options#card-options) -> to hide specific entities and devices. - - -![Views](https://github.com/AalianKhan/mushroom-strategy/blob/main/docs/Hidden.png) diff --git a/Entities-and-devices-notes.md b/Entities-and-devices-notes.md new file mode 100644 index 0000000..ed6f52e --- /dev/null +++ b/Entities-and-devices-notes.md @@ -0,0 +1,37 @@ +# Adding devices to areas + +You can add devices to an area by going to `Settings` found at the bottom of the sidebar. + +1. Select `Devices & services`. +2. Select `Devices` at the top. +3. Select the device you wish to add to an area. +4. Select the `pencil icon` found in the top right corner. +5. Enter an area in the area field. + +Entities of that device can be set to a different area by going to the settings of that entity. + +> [!CAUTION] +> If you created an entity manually (in your `configuration.yaml`) you may need to enter a `unique_id` first before you +> set an area to it. +> See Home Assistant's [documentation][uniqueIdUrl] for more info about unique ids. + +# Hiding specific entities from the Strategy + +When creating this dashboard for the first time, you probably have many entities that you don't want to see. +You can hide these entities by following the steps below: + +1. Click and hold the entity. +2. Click the `cog icon` in the top right corner of the popup. +3. Set `Visible` to `off`. + +The view should update when the page is refreshed. + +> [!NOTE] +> If you don't want to hide the entity from all dashboards, you can use [Card Options][cardOptionsUrl] +> to hide specific entities and devices. + + + +[uniqueIdUrl]: https://www.home-assistant.io/faq/unique_id + +[cardOptionsUrl]: https://github.com/DigiLive/mushroom-strategy/wiki/Strategy-Options#card-options diff --git a/Full-Example.md b/Full-Example.md index cf05748..4cbd16e 100644 --- a/Full-Example.md +++ b/Full-Example.md @@ -1,4 +1,4 @@ -Here is a full example utilizing all the options provided with the strategy +Here is a full example using all the options provided with the strategy. ```yaml strategy: @@ -7,6 +7,7 @@ strategy: views: light: title: illumination + order: 1 switches: hidden: true icon: mdi:toggle-switch @@ -14,6 +15,12 @@ strategy: hidden: - greeting - areasTitle + domains: + _: + hide_config_entities: true + light: + title: "My cool lights" + order: 1 chips: weather_entity: weather.forecast_home climate_count: false @@ -44,6 +51,8 @@ strategy: tap_action: action: toggle areas: + _: + type: default family_room_id: name: Family Room icon: mdi:television @@ -60,38 +69,21 @@ strategy: name: Kitchen icon: mdi:silverware-fork-knife icon_color: red + order: 1 master_bedroom_id: name: Master Bedroom icon: mdi:bed-king icon_color: blue - abias_bedroom_id: - name: Abia's Bedroom + kids_bedroom_id: + name: Kids Bedroom icon: mdi:flower-tulip icon_color: green - aalians_bedroom_id: - name: Aalian's Bedroom - icon: mdi:rocket-launch - icon_color: yellow - rohaans_bedroom_id: - name: Rohaan's Bedroom - icon: mdi:controller - icon_color: red - hallway_id: - name: Hallway - living_room_id: - name: Living Room - icon: mdi:sofa - front_door_id: - name: Front Door - icon: mdi:door-closed card_options: fan.master_bedroom_fan: type: custom:mushroom-fan-card remote.harmony_hub_wk: hidden: true quick_access_cards: - - type: custom:mushroom-title-card - title: Security - type: custom:mushroom-cover-card entity: cover.garage_door show_buttons_control: true @@ -112,7 +104,7 @@ strategy: vacuum_platform: default extra_views: - theme: Backend-selected - title: cool view + title: Cool view path: cool-view icon: mdi:emoticon-cool badges: [] diff --git a/Home.md b/Home.md index f062483..e6edd3d 100644 --- a/Home.md +++ b/Home.md @@ -3,78 +3,61 @@ ## Prerequisites Mushroom dashboard strategy and dependencies are available in [HACS][hacsUrl] (Home Assistant Community Store). -Install HACS if you don't have it already. -For assistance, you can follow the [HACS Installation Guide](https://hacs.xyz/docs/setup/prerequisites). +Install HACS if you don't have it already. +For assistance, you can follow the [installation guide](https://hacs.xyz/docs/setup/prerequisites). + +Once you have HACS installed, you can install custom integration and plug-ins. +This guide offers you badges to open your Home Assistant on the correct page. +If the badges don't work, try installing from HACS manually: + +1. Open HACS in Home Assistant (Usually in the menu on the left side). +2. At the top, search for the component you want to install. +3. Select the `three-dot` menu on the right side of the component and select `Download`. +4. Choose the desired version and select `Download` again. You need to install the following HACS integrations before you can use this strategy. -Open the links below and follow the installation instructions or use the badges to open the HACS repository at your Home -Assistant instance directly. +Click the badges below and follow the installation instructions. +They will open the HACS repository at your Home Assistant instance directly. -- [Mushroom cards][mushroomUrl] +[![Open in HACS at your Home Assistant instance.][hacsBadge]][hacsMushroomUrl] to install [Mushroom][mushroomUrl]. +[![Open in HACS at your Home Assistant instance.][hacsBadge]][hacsMiniGraphUrl] to +install [Mini graph card][miniGraphUrl]. - [![Open in HACS at your Home Assistant instance.][hacsBadge]][hacsMushroomUrl] +## Mushroom Strategy -- [Mini graph card][miniGraphUrl] - - [![Open in HACS at your Home Assistant instance.][hacsBadge]][hacsMiniGraphUrl] - -## HACS - -Click the badge below. +If you meet all the prerequisites, click the badge below to install the strategy. [![Open in HACS at your Home Assistant instance.][hacsBadge]][hacsStrategyUrl] -or ... - -1. Open HACS in Home Assistant. -2. Go to the "Frontend" section. -3. Click the button with the `+` icon. -4. Search for "Mushroom dashboard" and install. - ## Manual -1. Download `mushroom-strategy.js` file from - the [`dist`](https://github.com/AalianKhan/mushroom-strategy/tree/main/dist) directory. -2. Save this file into your `config/www` folder. +Please install the strategy with HACS as described above. +If you require testing a custom build for debug purposes, follow these steps: -3. Add a reference to `mushroom-strategy.js` in Dashboard. - There are two ways to do that: +1. Build the strategy with `npm build` or `npm build-dev`. +2. Copy the build file(s) to folder `.../homeassistant/www/community/mushroom-strategy`. +3. If file `mushroom-strategy.js.gz` exists in that folder, rename or delete it. ->[!NOTE] ->If you do not see the Resources menu, you will need to enable _Advanced Mode_ in your _User Profile_. - - 1. **Using UI:**: Click the badge... - - [![Open your Home Assistant instance and show your dashboard resources.][resourcesBadge]][resourcesUrl ] - - or... - - - Go to _Settings_ → _Dashboards_ → _More Options icon_ → _Resources_ → _Add Resource_ → Set _Url_ - to `/local/mushroom-strategy.js` → Set _Resource type_ to `JavaScript Module`. - - 2. **Using YAML:** Add the following code to the `lovelace` section. - ```yaml - resources: - - url: /local/mushroom-strategy.js - type: module - ``` +> [!NOTE] +> Refresh the cache of the client you use to access Home Assistant. # Basic Setup -To add Mushroom Strategy to a dashboard: +To apply the Mushroom Strategy to a dashboard: 1. In the UI of the dashboard, click the pencil in the top right corner. -2. Click 3 dots again. -3. Click `Raw configuration editor`. -4. Add the following lines: +2. If not taken to a Raw Configuration editor, click the three-dot menu in the top right corner. +3. Select `Raw configuration editor`. +4. Empty the configuration and add the following lines: + ```yaml strategy: type: custom:mushroom-strategy views: [] ``` ->[!NOTE] ->You may see the following error: +> [!NOTE] +> You may see the following error: ``` Error loading the dashboard strategy: @@ -83,21 +66,17 @@ To add Mushroom Strategy to a dashboard: be registered ``` -This is mainly because of cache or HACS didn't create a reference. -Try clearing the cache on your browser and re-downloading from HACS. +This is mainly because of cache issues or HACS didn't create a reference. +Try clearing the cache of your client and/or re-downloading the strategy from HACS. If it still doesn't work, please consult guide -[How to solve: Error loading the dashboard strategy](https://github.com/AalianKhan/mushroom-strategy/discussions/90). +[How to solve: Error loading the dashboard strategy](https://github.com/DigiLive/mushroom-strategy/discussions/90). [hacsUrl]: https://hacs.xyz -[hacsBadge]: https://my.home-assistant.io/badges/hacs_repository.svg - -[resourcesBadge]: https://my.home-assistant.io/badges/lovelace_resources.svg - -[resourcesUrl]: https://my.home-assistant.io/redirect/lovelace_resources +[hacsBadge]: https://img.shields.io/badge/Open%20my%20HACS%20Repository-%2318BCF2?logo=homeassistant&logoColor=%23FFFFFF&labelColor=%2318BCF2 [mushroomUrl]: https://github.com/piitaya/lovelace-mushroom @@ -107,4 +86,4 @@ If it still doesn't work, please consult guide [hacsMiniGraphUrl]: https://my.home-assistant.io/redirect/hacs_repository/?owner=kalkih&repository=mini-graph-card&category=frontend -[hacsStrategyUrl]: https://my.home-assistant.io/redirect/hacs_repository/?owner=AalianKhan&repository=mushroom-strategy&category=frontend +[hacsStrategyUrl]: https://my.home-assistant.io/redirect/hacs_repository/?owner=DigiLive&repository=mushroom-strategy&category=frontend diff --git a/Strategy-Options.md b/Strategy-Options.md index 743101d..da70848 100644 --- a/Strategy-Options.md +++ b/Strategy-Options.md @@ -1,23 +1,26 @@ # All Options You can set strategy options to further customize the dashboard. -By default, all views are enabled which include lights, fans, covers, switches, climates and cameras. All chips are also -enabled which count the number of devices on for the platform light, fan, cover and climate. It also auto-selects a -weather entity for the weather chip. +By default: -The options available are: +- All views and domains are enabled. +- All chips are also enabled and count the number of active entities. +- For the weather chip, the entity is selected automatically unless you specify one. +- All entities without an area are added to the `undisclosed` area. -| Name | Type | Default | Description | -|:---------------------|:--------------------------|:--------------------------------------------------------|:--------------------------------------------------------------------| -| `areas` | object (optional) | unset | One or more areas in a list, see [Areas](#areas). | -| `card_options` | object (optional) | unset | Card options for cards, see [Card Options](#card-options). | -| `views` | object (optional) | All default views | See available [Views](#views). | -| `chips` | object | All count chips enabled with auto selected weather card | See [Chips](#chips). | -| `quick_access_cards` | array of cards (optional) | unset | List of cards to show between the Welcome card and the Rooms cards. See [Additional Cards](#additional-cards) | -| `extra_cards` | array of cards (optional | unset | List of cards to show below the Room cards. See [Additional Cards](#additional-cards) | -| `extra_views` | array of views (optional) | unset | List of user defined views to add to the dashboard. See [Additional Views](#additional-views) | -| `domains` | object (optional) | All supported domains | See [Domains](#domains). | -| `home_view` | object (optional) | unset | Options for the home view, see [Home View](#home-view) | +The options are divided into groups as described below. + +| Name | Type | Default | Description | +|:-------------------|:---------------|:----------------------|:------------------------------------------------------------------------------------------------------------------| +| domains | object | All supported domains | See [Domain Options](#domain-options). | +| views | object | All supported views | See [View Options](#view-options). | +| card_options | object | empty | See [Card Options](#card-options). | +| extra_views | array of views | empty | List of user defined views to add to the dashboard. See [Extra Views](#extra-views) | +| home_view | object | unset | See [Home View Options](#home-view-options) | +| chips | object | All supported chips | See [Chip Options](#chip-options). | +| quick_access_cards | array of cards | empty | List of cards to show between the Welcome card and the Rooms cards. See [Quick Access Cards](#quick-access-cards) | +| areas | object | undisclosed | See [Area Options](#area-options). | +| extra_cards | array of cards | empty | List of cards to show below the Room cards. See [extra Cards](#extra-cards) | ## Example @@ -33,21 +36,371 @@ strategy: views: [] ``` -# Areas +# Domain Options -| Name | Type | Default | Description | -|:----------------------|:------------------|:---------------|:---------------------------------------------------------------------------| -| `name` | string | N.A. | The name of the area. | -| `hidden` | boolean | false | Set to `true` to exclude the area from the dashboard and views. | -| `order` | number | Infinity | Ordering position of the area in the list of available areas. | -| `extra_cards` | array of cards | unset or empty | A list of cards to show on the top of the area sub-view. | -| `type` | string | `default` | Set to a type of area card. (Currently supported: `default` & `HaAreaCard` | +The `domains` group enables you to specify the configuration of the domain in a view. +Each configuration is identified by a domain and can have the following options: + +| Option | type | Default | Description | +|:-------------------------|:--------|:------------------|:--------------------------------------------------------------------------| +| hidden | boolean | `false` | Set to `true` to exclude the domain from the dashboard. | +| hide_config_entities | boolean | `true` | Set to `false` to include config-entities to the dashboard. | +| hide_diagnostic_entities | boolean | `true` | Set to `false` to include diagnostic-entities to the dashboard. | +| order | number | `unset` | Ordering position of the domain entities in a view. | +| showControls | boolean | `true` | Weather to show controls in a view, to switch all entities of the domain. | +| title | string | `domain specific` | Title of the domain in a view. | + +> [!NOTICE] +> - Domain `default` represents any domain not supported by this strategy. +> - The `showControls` option will default to false for domain which can't be controlled. +> - The `hide_config_entities` and `hide_diagnostic_entities` options are only available as an "All domains" option. + +## Setting options for all domains + +Use `_` as the identifier to set options for all domains. + +## Example + +```YAML +strategy: + type: custom:mushroom-strategy + options: + domains: + _: + hide_config_entities: false + light: + title: "My cool lights" + order: 1 + switch: + showControls: false + default: + hidden: true +views: [] +``` + +The following domains are supported and enabled by default: + +- _ (All domains) +- area +- binary_sensor +- camera +- climate +- cover +- default (Miscellaneous) +- fan +- input_select +- light +- lock +- media_player +- number +- person +- scene +- select +- sensor +- switch +- vacuum +- valve + +# View Options + +Mushroom strategy includes views to control/view specific domains. +Hidden/Disabled entities or linked to a hidden area are excluded from the view. + +The following views are supported and enabled by default: + +| View | Type | Description | +|:--------|:-------|:-------------------------------------------| +| camera | object | View to control cameras. | +| climate | object | View to control climates. | +| cover | object | View to control covers. | +| fan | object | View to control fans. | +| home | object | An overview of several entities and areas. | +| light | object | View to control lights. | +| lock | object | View to control locks. | +| scene | object | View to control scenes. | +| switch | object | View to control switches. | +| vacuum | object | View to control vacuums. | + +The `views` group enables you to specify the configuration of a view. +Each configuration is identified by a view name and can have the following options: + +| name | type | Default | description | +|:-------|:--------|:----------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------| +| title | string | `domain specific` | Title of the view in the navigation bar. (Shown when no icon is defined or hovering above it.) | +| icon | string | `unset` | Icon of the view in the navigation bar. | +| order | string | home, light, fan, cover, switch, climate, camera, vacuum, scene, lock | Ordering position of the view in the navigation bar. | +| hidden | boolean | `false` | Set to `true` to exclude the view from the dashboard | + +## Example + +```yaml +strategy: + type: custom:mushroom-strategy + options: + views: + light: + order: 0 + title: illumination + switch: + order: 1 + hidden: true + icon: mdi:toggle-switch +views: [] +``` + +# Card Options + +The `card_options` group enables you to specify the configuration of entity cards. +Each configuration is identified by an entity id or a device id and can have the following options: + +| name | type | default | description | +|:-------|:--------|:------------------|:------------------------------------------------------| +| type | string | `domain specific` | The type for card to apply. | +| hidden | boolean | `false` | Set to `true` to exclude the card from the dashboard. | +| ... | ... | `type specific` | An option belonging to the given card type. | + +Depending on the type of card, you can also specify options belonging to that type. + +Providing a device id will enable you to hide all the entities associated with that device. +Follow these steps in a browser to get the id of a device: + +1. Select `Settings` at the bottom of the sidebar. +2. Select `Devices & services`. +3. Select `Devices` at the top. +4. Select the device you want to get the id of. +5. The device id is shown as the **last** part of the url in the address bar. + E.g.: `https://.../config/devices/device/h55b6k54j76g56` + +> [!TIP] +> You can build your card at another dashboard and copy the `cards` group from the YAML of that dashboard into +> group `card_options` of the strategy configuration. +> The YAML can be found in the Raw configuration editor. + +## Example + +```yaml +strategy: + type: custom:mushroom-strategy + options: + card_options: + fan.master_bedroom_fan: + type: custom:mushroom-fan-card + icon: mdi:fan + remote.harmony_hub_wk: + hidden: true + 077ba0492c9bb3b3134f1f3a626a: + hidden: true + +views: [] +``` + +# Extra Views + +The `extra_views` group enables you to specify the configuration of additional views. +Each view can have the options as described in the Home +Assistant [documentation][viewDocUrl]. + +> [!TIP] +> You can build your view in a temporary dashboard and copy the `views` group from the YAML of that dashboard into +> group `extra_views` of the strategy configuration. +> The YAML can be found in the Raw configuration editor. + +## Example + +```yaml +strategy: + type: custom:mushroom-strategy + options: + extra_views: + - theme: Backend-selected + title: cool view + path: cool-view + icon: mdi:emoticon-cool + badges: [] + cards: + - type: markdown + content: I am cool +views: [] +``` + +# Home View Options + +The `home_view` group enables you to specify the configuration of the Home view. + +| Option | type | default | Description | +|:---------|:------|:--------|:----------------------------------------------| +| `hidden` | array | `[]` | Array of sections to hide from the home view. | + +The following sections can be hidden from the Home view: + +* areas +* areasTitle +* chips +* greeting +* persons + +## Example + +```YAML +strategy: + type: custom:mushroom-strategy + options: + home_view: + hidden: + - greeting + - areasTitle +views: [] +``` + +## Chip Options + +The mushroom strategy has chips that indicate the number of entities which are in a state similar to `on` for a specific +domain. +Hidden/Disabled entities are excluded from this count. + +Tapping a chip will set corresponding entities to a state similar to `off`. +Tap and hold a chip, will navigate to the corresponding view. + +The `chips` group enables you to specify the configuration of chips. + +| Name | type | default | Description | +|:-----------------|:--------|:--------|:--------------------------------------------| +| `light_count` | boolean | `false` | Number of lights on. | +| `fan_count` | boolean | `false` | Number of fans on. | +| `cover_count` | boolean | `false` | Number of covers not closed. No tap action. | +| `switch_count` | boolean | `false` | Number of switches on. | +| `climate_count` | boolean | `false` | Number of climate not off. No tap action. | +| `weather_entity` | string | `auto` | Entity id for the weather chip to use. | +| `extra_chips` | array | `[]` | List of extra chips to show. | + +If `weather_entity` is set to `auto`, the weather chip uses the first entity of the weather domain it finds. +You can define a custom entity to use by setting an entity id. + +> [!NOTE] +> To hide the weather chip, you should hide or disable the entity itself. + +### Extra Chips + +To add custom chips, you can configure them in `extra_chips`. +See [Mushroom Chips][chipDocUrl] for all available +chips. + +> [!TIP] +> You can build your chips in a temporary card in another dashboard and copy the `chips` group from the YAML of that +> card into group `extra_chips` of the strategy configuration. +> The YAML can be found in the Raw configuration editor. + +### Example + +```yaml +strategy: + type: custom:mushroom-strategy + options: + chips: + climate_count: false + cover_count: false + weather_entity: weather.forecast_home + extra_chips: + - type: conditional + conditions: + - entity: lock.front_door + state: unlocked + chip: + type: entity + entity: lock.front_door + icon_color: red + content_info: none + tap_action: + action: toggle +``` + +### Quick Access Cards + +The `quick_access_cards` group enables you to specify the configuration of additional cards in the Home view. +These cards will be shown between the greeting card and areas. + +Each card can have the options as described at [Card Options](#card-options). + +> [!TIP] +> You can build your view in a temporary dashboard and copy the `views` group from the YAML of that dashboard into +> group `extra_views` of the strategy configuration. +> The YAML can be found in the Raw configuration editor. + +#### Example + +```yaml +strategy: + type: custom:mushroom-strategy + options: + quick_access_cards: + - type: custom:mushroom-title-card + title: Security + - type: custom:mushroom-cover-card + entity: cover.garage_door + show_buttons_control: true + - type: horizontal-stack + cards: + - type: custom:mushroom-lock-card + entity: lock.front_door + - type: custom:mushroom-entity-card + entity: sensor.front_door_lock_battery + name: Battery +``` + +### Extra Cards + +The `extra_cards` group enables you to specify the configuration of additional cards in the Home view. +These cards will be shown below the areas. + +Each card can have the options as described at [Card Options](#card-options). + +> [!TIP] +> You can build your view in a temporary dashboard and copy the `views` group from the YAML of that dashboard into +> group `extra_views` of the strategy configuration. +> The YAML can be found in the Raw configuration editor. + +#### Example + +```yaml +strategy: + type: custom:mushroom-strategy + options: + extra_cards: + - type: custom:xiaomi-vacuum-map-card + map_source: + camera: camera.xiaomi_cloud_map_extractor + calibration_source: + camera: true + entity: vacuum.robot_vacuum + vacuum_platform: default +views: [] +``` + +# Area Options + +The `areas` group enables you to specify the configuration of areas. +Each configuration is identified by an area id and can have the following options: + +| Name | Type | Default | Description | +|:--------------|:---------------|:----------------|:---------------------------------------------------------------------------| +| `name` | string | `Area specific` | The name of the area. | +| `hidden` | boolean | `false` | Set to `true` to exclude the area from the dashboard and views. | +| `order` | number | `unset` | Ordering position of the area in the list of available areas. | +| `extra_cards` | array of cards | `[]` | A list of cards to show on the top of the area sub-view. | +| `type` | string | `default` | Set to a type of area card. (Currently supported: `default` & `HaAreaCard` | Also, all options from the Template mushroom card and/or Home Assistant Area card are supported. Please follow the links below to see the additional options per card type. -* [Mushroom Template Card](https://github.com/piitaya/lovelace-mushroom/blob/main/docs/cards/template.md). -* [Home Assistant Area Card](https://www.home-assistant.io/dashboards/area/#configuration-variables). +* [Mushroom Template Card][templateDocUrl]. +* [Home Assistant Area Card][areaDocUrl]. + +## Extra Cards + +The `extra_cards` group enables you to specify the configuration of additional cards an Area view. +These cards will be shown last in the view. + +See Home View Options → [Extra Cards](#extra-cards) for more information. ## Example @@ -78,6 +431,14 @@ strategy: hidden: true hallway_id: type: HaAreaCard + extra_cards: + - type: custom:xiaomi-vacuum-map-card + map_source: + camera: camera.xiaomi_cloud_map_extractor + calibration_source: + camera: true + entity: vacuum.robot_vacuum + vacuum_platform: default views: [] ``` @@ -106,275 +467,12 @@ strategy: views: [] ``` -# Card Options - -| name | type | description | -|:---------|:--------|:------------------------------------------------------| -| `type` | string | The type for card to apply. | -| `hidden` | boolean | Set to `true` to exclude the card from the dashboard. | - -The `card_options` entry enables you to specify the type of card for an entity or to hide the entity. - -You can also provide a device ID and hide all entities linked to that device. -See [Instructions on to find a device ID](https://community.home-assistant.io/t/device-id-entity-id-where-to-find/289230/4). - -## Example - -```yaml -strategy: - type: custom:mushroom-strategy - options: - card_options: - fan.master_bedroom_fan: - type: custom:mushroom-fan-card - remote.harmony_hub_wk: - hidden: true - 077ba0492c9bb3b31ffac34f1f3a626a: - hidden: true - -views: [] -``` - -# Views - -![Light Views](https://github.com/AalianKhan/mushroom-strategy/blob/main/docs/light_view.png) - -Mushroom strategy includes pre-built views to control/view specific domains. - -Devices of a hidden area are excluded from the view. See [Areas](https://github.com/AalianKhan/mushroom-strategy/wiki/Strategy-Options#areas). - -By default, all pre-built views below are shown: - -| Available views | type | Description | -|:----------------|:-------|:-------------------------------------------| -| `camera` | object | View to control cameras. | -| `climate` | object | View to control climates. | -| `cover` | object | View to control covers. | -| `fan` | object | View to control fans. | -| `home` | object | An overview of several entities and areas. | -| `light` | object | View to control lights. | -| `switch` | object | View to control switches. | -| `vacuum` | object | View to control vacuums. | -| `scene` | object | View to activate scenes. | - -## View Options - -For each of the pre-built views, the following options are available: - -| name | type | description | -|:---------|:--------|:-----------------------------------------------------------------------------------------------| -| `title` | string | Title of the view in the navigation bar. (Shown when no icon is defined or hovering above it.) | -| `icon` | string | Icon of the view in the navigation bar. | -| `order` | string | Ordering position of the view in the navigation bar. | -| `hidden` | boolean | Set to `true` to exclude the view from the dashboard | - -### Example - -```yaml -strategy: - type: custom:mushroom-strategy - options: - views: - light: - order: 0 - title: illumination - switch: - order: 1 - hidden: true - icon: mdi:toggle-switch -views: [] -``` - -# Domains - -You can configure how the various domains are shown using the `domains` option. -The following options are supported: - -| Option | type | Description | -|:-----------------------|:--------|:--------------------------------------------------------------------------| -| `title` | string | Title of the domain in a view. | -| `showControls` | boolean | Weather to show controls in a view, to switch all entities of the domain. | -| `hidden` | boolean | Set to `true` to exclude the domain from the dashboard. | -| `hide_config_entities` | boolean | Set to `true` to exclude config-entities from the dashboard.* | -| `order` | number | Ordering position of the domain entities in a view. | - -## Setting options for all domains - -Use `_` as an identifier to set the `hide_config_entities` option for all domains. - -## Example - -```YAML -strategy: - type: custom:mushroom-strategy - options: - domains: - _: - hide_config_entities: true - light: - title: "My cool lights" - order: 1 - switch: - showControls: false - default: - hidden: true -views: [] -``` - -The following domains are supported and enabled by default: - -* binary_sensor -* camera -* climate -* cover -* fan -* light -* lock -* media_player -* number -* sensor -* switch -* vacuum -* scene -* default (Miscellaneous) - -# Home View - -The `home_view` option will let you configure the Home View. - -| Option | type | Description | -|:---------|:------|:----------------------------------------------| -| `hidden` | array | Array of elements to hide from the home view. | - -The following elements are supported: -* chips -* persons -* greeting -* areasTitle -* areas - -## Example - -```YAML -strategy: - type: custom:mushroom-strategy - options: - home_view: - hidden: - - greeting - - areasTitle -views: [] -``` - -# Chips - -![Chips](https://github.com/AalianKhan/mushroom-strategy/blob/main/docs/chips.png) - -The mushroom strategy has chips that indicate the number of devices which are on/active for a specific domain. -Devices of a hidden area are excluded from the count. - -The weather chip automatically uses `weather.forecast` if available or you can manually configure a weather entity-id. - -To add chips, you can define them in `extra_chips`. -See [Mushroom Chips](https://github.com/piitaya/lovelace-mushroom/blob/main/docs/cards/chips.md) for all available chips. - -By default, all chips are enabled. - -> [!NOTE] -> To hide the weather chip, you should hide or disable the entity itself. - -| Available chips | type | Description | -|:-----------------|:------------------|:---------------------------------------------------------------------------------------------------------------| -| `light_count` | boolean | Chip to display the number of lights on, tapping turns off all lights, holding navigates to lights view. | -| `fan_count` | boolean | Chip to display the number of fans on, tapping turns off all fans, holding navigates to fans view. | -| `cover_count` | boolean | Chip to display the number of covers not closed, holding navigates to covers view. | -| `switch_count` | boolean | Chip to display the number of switches on, tapping turns off all switches, holding navigates to switches view. | -| `climate_count` | boolean | Chip to display the number of climate not off, holding navigates to climates view. | -| `weather_entity` | string (optional) | Entity ID for the weather chip to use, accepts `weather.` only. | -| `extra_chips` | array (optional) | List of extra chips to display, see [Mushroom Chips][mushroom-chipsUrl]. | - -## Example - -```yaml -strategy: - type: custom:mushroom-strategy - options: - chips: - climate_count: false - cover_count: false - weather_entity: weather.forecast_home - extra_chips: - - type: conditional - conditions: - - entity: lock.front_door - state: unlocked - chip: - type: entity - entity: lock.front_door - icon_color: red - content_info: none - tap_action: - action: toggle -``` - -# Additional Cards - -Sometimes we want to add static cards in our dashboard. You can add these cards in either `quick_access_cards` or `extra_cards`. `extra_cards` is also available on a per-area basis and shown at the top of the area subview, see [Areas](#areas). - -`quick_access_cards` are shown in between the welcome card and area title and `extra_cards` are shown after the area cards. You can also add extra chips in the chips section, see [Chips](#chips) - -![additonal_cards.png](https://github.com/AalianKhan/mushroom-strategy/blob/main/docs/additonal_cards.png) - -## Example - -```yaml -strategy: - type: custom:mushroom-strategy - options: - quick_access_cards: - - type: custom:mushroom-title-card - title: Security - - type: custom:mushroom-cover-card - entity: cover.garage_door - show_buttons_control: true - - type: horizontal-stack - cards: - - type: custom:mushroom-lock-card - entity: lock.front_door - - type: custom:mushroom-entity-card - entity: sensor.front_door_lock_battery - name: Battery - extra_cards: - - type: custom:xiaomi-vacuum-map-card - map_source: - camera: camera.xiaomi_cloud_map_extractor - calibration_source: - camera: true - entity: vacuum.robot_vacuum - vacuum_platform: default -views: [] -``` - -# Additional Views -You can add an additional static view to the dashboard by using `extra_views`. The best way is to create your view in a different dashboard using the UI, then copy the YAML and paste it under `extra_views`. Make sure the indentation is correct. - -## Example - -```yaml -strategy: - type: custom:mushroom-strategy - options: - extra_views: - - theme: Backend-selected - title: cool view - path: cool-view - icon: mdi:emoticon-cool - badges: [] - cards: - - type: markdown - content: I am cool -views: [] -``` -[mushroom-chipsUrl]: https://github.com/piitaya/lovelace-mushroom/blob/main/docs/cards/chips.md \ No newline at end of file +[viewDocUrl]: https://www.home-assistant.io/dashboards/views/#views + +[chipDocUrl]: https://github.com/piitaya/lovelace-mushroom/blob/main/docs/cards/chips.md + +[templateDocUrl]: https://github.com/piitaya/lovelace-mushroom/blob/main/docs/cards/template.md + +[areaDocUrl]: https://www.home-assistant.io/dashboards/area/#configuration-variables \ No newline at end of file diff --git a/_Sidebar.md b/_Sidebar.md index afba4d7..dd45bf1 100644 --- a/_Sidebar.md +++ b/_Sidebar.md @@ -1,12 +1,12 @@ -* [**Getting Started**](https://github.com/AalianKhan/mushroom-strategy/wiki/) - * [**Installation**](https://github.com/AalianKhan/mushroom-strategy/wiki/#installation) - * [**Basic Setup**](https://github.com/AalianKhan/mushroom-strategy/wiki/#basic-setup) -* [**Adding and Hiding entities and devices**](https://github.com/AalianKhan/mushroom-strategy/wiki/Adding-and-Hiding-entities-and-devices) -* [**Strategy Options**](https://github.com/AalianKhan/mushroom-strategy/wiki/Strategy-Options) - * [**Areas**](https://github.com/AalianKhan/mushroom-strategy/wiki/Strategy-Options#areas) - * [**Card Options**](https://github.com/AalianKhan/mushroom-strategy/wiki/Strategy-Options#card-options) - * [**Views**](https://github.com/AalianKhan/mushroom-strategy/wiki/Strategy-Options#views) - * [**Domains**](https://github.com/AalianKhan/mushroom-strategy/wiki/Strategy-Options#domains) - * [**Home View**](https://github.com/AalianKhan/mushroom-strategy/wiki/Strategy-Options#home-view) - * [**Chips**](https://github.com/AalianKhan/mushroom-strategy/wiki/Strategy-Options#chips) -* [**Full Example**](https://github.com/AalianKhan/mushroom-strategy/wiki/Full-Example) \ No newline at end of file +* [**Getting Started**](https://github.com/DigiLive/mushroom-strategy/wiki/) + * [**Installation**](https://github.com/DigiLive/mushroom-strategy/wiki/#installation) + * [**Basic Setup**](https://github.com/DigiLive/mushroom-strategy/wiki/#basic-setup) +* [**Strategy Options**](https://github.com/DigiLive/mushroom-strategy/wiki/Strategy-Options) + * [**Areas**](https://github.com/DigiLive/mushroom-strategy/wiki/Strategy-Options#areas) + * [**Card Options**](https://github.com/DigiLive/mushroom-strategy/wiki/Strategy-Options#card-options) + * [**Views**](https://github.com/DigiLive/mushroom-strategy/wiki/Strategy-Options#views) + * [**Domains**](https://github.com/DigiLive/mushroom-strategy/wiki/Strategy-Options#domains) + * [**Home View**](https://github.com/DigiLive/mushroom-strategy/wiki/Strategy-Options#home-view) + * [**Chips**](https://github.com/DigiLive/mushroom-strategy/wiki/Strategy-Options#chips) +* [**Full Example**](https://github.com/DigiLive/mushroom-strategy/wiki/Full-Example) +* [**Entities & Devices Notes**](https://github.com/DigiLive/mushroom-strategy/wiki/Entities-and-devices-notes)