From 2454ab10dc5b33262e11c2ef8bbc5ace45bfd5b1 Mon Sep 17 00:00:00 2001 From: Ferry Cools Date: Mon, 20 Nov 2023 13:48:47 +0100 Subject: [PATCH] Merge README of PR #81 into Wiki --- Strategy-Options.md | 199 ++++++++++++++++++++++---------------------- 1 file changed, 98 insertions(+), 101 deletions(-) diff --git a/Strategy-Options.md b/Strategy-Options.md index d2f927b..005439d 100644 --- a/Strategy-Options.md +++ b/Strategy-Options.md @@ -1,25 +1,25 @@ # All Options -You can set strategy options to further customize the dashboard. +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. The options available are: -| 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 welcome card and rooms cards. | -| `extra_cards` | array of cards (optional | unset | List of cards to show below room cards. | -| `extra_views` | array of views (optional) | unset | List of views to add to the dashboard. | -| `domains` | object (optional) | All supported domains | See [Domains](#domains). | -| `homeView` | object (optional) | unset | Options for the home view, see [Home View](#home-view) | +| 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. | +| `extra_cards` | array of cards (optional | unset | List of cards to show below the Room cards. | +| `extra_views` | array of views (optional) | unset | List of user defined views to add to the dashboard. | +| `domains` | object (optional) | All supported domains | See [Domains](#domains). | +| `home_view` | object (optional) | unset | Options for the home view, see [Home View](#home-view) | -#### Example +## Example ```yaml strategy: @@ -32,59 +32,24 @@ strategy: icon_color: green views: [] ``` + # Areas -The areas option includes all options from the template mushroom card plus `extra_cards` which is a list of cards to show -at the top of the area subview. +| 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` | -| Name | Type | Default | Description | -|:----------------------|:------------------|:---------------|:------------------------------------------------------------------------------------------------------------------------------------| -| `name` | string | N.A. | The name of the area. | -| `icon` | string (optional) | unset or empty | Icon to render. May contain [templates](https://www.home-assistant.io/docs/configuration/templating/). | -| `icon_color` | string (optional) | unset or empty | Icon color to render. May contain [templates](https://www.home-assistant.io/docs/configuration/templating/). | -| `primary` | string (optional) | unset or empty | Primary info to render. May contain [templates](https://www.home-assistant.io/docs/configuration/templating/). | -| `secondary` | string (optional) | unset or empty | Secondary info to render. May contain [templates](https://www.home-assistant.io/docs/configuration/templating/). | -| `badge_icon` | string (optional) | unset or empty | Badge icon to render. May contain [templates](https://www.home-assistant.io/docs/configuration/templating/). | -| `badge_color` | string (optional) | unset or empty | Badge icon color to render. May contain [templates](https://www.home-assistant.io/docs/configuration/templating/). | -| `picture` | string (optional) | unset or empty | Picture to render. May contain [templates](https://www.home-assistant.io/docs/configuration/templating/). | -| `multiline_secondary` | boolean | `false` | Enables support for multiline text for the secondary info. | -| `layout` | string (optional) | unset or empty | Layout of the card. Vertical, horizontal and default layout are supported. | -| `fill_container` | boolean | `false` | Fill container or not. Useful when card is in a grid, vertical or horizontal layout. | -| `tap_action` | action* | `none` | Home assistant action to perform on tap. | -| `hold_action` | action* | `none` | Home assistant action to perform on hold. | -| `entity_id` | `string` `array` | unset or empty | Only reacts to the state changes of these entities. This can be used if the automatic analysis fails to find all relevant entities. | -| `double_tap_action` | action* | `more-info` | Home assistant action to perform on double_tap. | -| `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 subview. | -| `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. -*) `more-info` `toggle` `call-service` `navigate` `url` `none` -## Undisclosed Area +* [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). -The strategy has a special area, named `undisclosed`. -This area is enabled by default and includes the entities that aren't linked to any Home Assistant area. - -The area can be configured like any other area as described above. -To exclude this area from the dashboard and views, set its property `hidden` to `true`. - -## Setting options for all areas - -Use `_` as an identifier to set the options for all areas. - -The following example sets the type of all area-cards to Home Assistant's area card: - -```yaml -strategy: - type: custom:mushroom-strategy - options: - areas: - _: - type: HaAreaCard -views: [] -``` - -#### Example +## Example ```yaml strategy: @@ -116,13 +81,44 @@ strategy: views: [] ``` +## Undisclosed Area + +The strategy has a special area, named `undisclosed`. +This area is enabled by default and includes the entities that aren't linked to any Home Assistant area. + +The area can be configured like any other area as described above. +To exclude this area from the dashboard and views, set its property `hidden` to `true`. + +## Setting options for all areas + +Use `_` as an identifier to set the options for all areas. +The following example sets the type of all area-cards to the one of Home Assistant: + +### Example + +```yaml +strategy: + type: custom:mushroom-strategy + options: + areas: + _: + type: HaAreaCard +views: [] +``` + # Card Options -The `card_options` entry enables you to specify a card type for an entity or to hide the card from the dashboard. -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?u=aaliankhan). +| name | type | description | +|:---------|:--------|:------------------------------------------------------| +| `type` | string | The type for card to apply. | +| `hidden` | boolean | Set to `true` to exclude the card from the dashboard. | -#### Example +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: @@ -149,27 +145,29 @@ Devices of a hidden area are excluded from the view. See [Areas](https://github. By default, all pre-built views below are shown: -| Available views | type | Description | -|:----------------|:--------|:-----------------------------------------------------------------------------| -| `light` | object* | View to control all lights and lights of each area. | -| `fan` | object* | View to control all fans and fans of each area. | -| `cover` | object* | View to control all covers and covers of each area. | -| `switch` | object* | View to control all switches and switches of each area. | -| `climate` | object* | View to control climate devices such as thermostats. Seperated by each area. | -| `camera` | object* | View to show all cameras. Seperated by each area. | +| 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. | ## 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 | +| 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 +### Example ```yaml strategy: @@ -188,9 +186,7 @@ views: [] # Domains -You can configure how the various domains are shown using the `domains` option - - +You can configure how the various domains are shown using the `domains` option. The following options are supported: | Option | type | Description | @@ -200,7 +196,7 @@ The following options are supported: | `hidden` | boolean | Set to `true` to exclude the domain from the dashboard. | | `order` | number | Ordering position of the domain entities in a view. | -#### Example +## Example ```YAML strategy: @@ -219,22 +215,23 @@ views: [] The following domains are supported and enabled by default: -* light -* fan -* cover -* switch -* camera -* lock -* climate -* media_player -* sensor * binary_sensor +* camera +* climate +* cover +* fan +* light +* lock +* media_player * number +* sensor +* switch +* vacuum * default (Miscellaneous) # Home View -The `homeView` option will let you configure the Home View. +The `home_view` option will let you configure the Home View. | Option | type | Description | |:---------|:------|:----------------------------------------------| @@ -247,7 +244,7 @@ The following elements are supported: * areasTitle * areas -#### Example +## Example ```YAML strategy: @@ -267,10 +264,10 @@ views: [] 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. -You can manually configure a weather entity-id to use +The weather chip automatically uses `weather.forecast` if available or you can manually configure a weather entity-id. -To add more 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. +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. @@ -281,13 +278,13 @@ By default, all chips are enabled. |:-----------------|:------------------|:---------------------------------------------------------------------------------------------------------------| | `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, tapping navigates to covers 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, tapping navigates to climates 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 +## Example ```yaml strategy: