diff --git a/Strategy-Options.md b/Strategy-Options.md new file mode 100644 index 0000000..087a7a9 --- /dev/null +++ b/Strategy-Options.md @@ -0,0 +1,307 @@ +# Strategy 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. + +The options available are: + +| Name | Type | Default | Description | +|:---------------------|:--------------------------|:--------------------------------------------------------|:-----------------------------------------------------------------------| +| `areas` | object (optional) | unset | One or more areas in a list, see [areas object](#area-object). | +| `card_options` | object (optional) | unset | Card options for cards, see [Card Options](#card-options). | +| `views` | object (optional) | All default views | See available [Pre-built views](#pre-built-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 [Supported domains](#supported-domains). | +| `homeView` | object (optional) | unset | Options for the home view, see [Home View Options](#home-view-options) | + +### Example + +```yaml +strategy: + type: custom:mushroom-strategy + options: + areas: + family_room_id: + name: Family Room + icon: mdi:sofa + icon_color: green +views: [] +``` +## Area Object + +The area object includes all options from the template mushroom card and `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. | +| `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` | + +*) `more-info` `toggle` `call-service` `navigate` `url` `none` +### 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 Home Assistant's area card: + +```yaml +strategy: + type: custom:mushroom-strategy + options: + areas: + _: + type: HaAreaCard +views: [] +``` + +#### Example + +```yaml +strategy: + type: custom:mushroom-strategy + options: + areas: + family_room_id: + name: Family Room + icon: mdi:television + icon_color: green + order: 1 + extra_cards: + - type: custom:mushroom-chips-card + chips: + - type: entity + entity: sensor.family_room_temperature + icon: mdi:thermometer + icon_color: pink + alignment: center + kitchen_id: + name: Kitchen + icon: mdi:silverware-fork-knife + icon_color: red + order: 2 + garage_id: + hidden: true + hallway_id: + 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). + +#### 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: [] +``` + +## Pre-built 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. +All devices that are in an area where `hidden` is set to false/undefined are shown*. + +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 using WebRTC cards. Seperated by each area. | + +### 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. | +| `order` | number | Ordering position of the domain entities in a view. | + +#### Example + +```YAML +strategy: + type: custom:mushroom-strategy + options: + domains: + lights: + title: "My cool lights" + order: 1 + switch: + showControls: false + default: + hidden: true +views: [] +``` + +The following domains are supported and enabled by default: + +* light +* fan +* cover +* switch +* camera +* lock +* climate +* media_player +* sensor +* binary_sensor +* number +* default (Miscellaneous) + +## Home View Options + +The `homeView` options 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: + homeView: + hidden: + - greeting + - areasTitle +views: [] +``` + +## Chips + +![Chips](https://github.com/AalianKhan/mushroom-strategy/blob/main/docs/chips.png) + +Mushroom strategy has chips that indicate the number of devices which are active for a specific domain. +All devices that are in an area where `hidden` is set to false/undefined are counted. +By default, all chips are enabled. + +You can manually configure a weather entity-id to use, and there's also an option to add +more [Mushroom Chips][mushroom-chipsUrl] using `extra_chips`. + +**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, tapping 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. | +| `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 +``` \ No newline at end of file