forked from DigiLive/mushroom-strategy
a85ef9f9fc78b4b263fa3ebe4313dba92824e676
Mushroom dashboard strategy
What is Mushroom dashboard strategy ?
Mushroom dashboard strategy provides a strategy for Home assistant to automatically create a dashboard using Mushroom cards, the area configuration and entity configuration.
My goal is to propose a way to create powerful dashaboards without the need of spending hours manualy creating them.
Features
- 🛠 Automatically create dashboard with 3 lines of yaml
- 😍 Built-in Views for device specific controls
- 🎨 Many options to customize to your needs
Installation
HACS
Mushroom dashboard strategy is available in HACS (Home Assistant Community Store).
- Install HACS if you don't have it already
- Open HACS in Home Assistant
- Go to "Frontend" section
- Click button with "+" icon
- Search for "Mushroom strategy"
Manual
- Download
mushroom-strategy.jsfile from the [latest-release]. - Put
mushroom-strategy.jsfile into yourconfig/wwwfolder. - Add reference to
mushroom-strategy.jsin Dashboard. There's two way to do that:- Using UI: Settings → Dashboards → More Options icon → Resources → Add Resource → Set Url as
/local/mushroom-strategy.js→ Set Resource type asJavaScript Module. Note: If you do not see the Resources menu, you will need to enable Advanced Mode in your User Profile - Using YAML: Add following code to
lovelacesection.resources: - url: /local/mushroom-strategy.js type: module
- Using UI: Settings → Dashboards → More Options icon → Resources → Add Resource → Set Url as
Preresquisites
You need to install these cards first before using this strategy
Usage
All the Rounded cards can be configured using Dashboard UI editor.
- In Dashboard UI, click 3 dots in top right corner.
- Click Edit Dashboard.
- Click 3 dots again
- Click
Raw configuration editor - Add these lines
strategy:
type: custom:mushroom-strategy
views: []
Strategy options
| Name | Type | Default | Description |
|---|---|---|---|
areas |
list | Optional | One or more areas in a list, see areas object |
entity_config |
list | Optional | Custom card defination for an entity, see entity_config object |
views |
object | All views enabled | Setting which pre-built views to show, see available views |
chips |
object | All count chips enabled | Setting which pre-built chips to show, see available chips |
quick_access_cards |
list of cards | Optional | List of cards to show below welcome card and above rooms cards |
extra_cards |
list of cards | Optional | List of cards to show below room cards |
extra_chips |
list of mushroom chips | Optional | List of chips to show on home view |
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 |
|---|---|---|---|
icon |
string | Optional | Icon to render. May contain templates. |
icon_color |
string | Optional | Icon color to render. May contain templates. |
primary |
string | Optional | Primary info to render. May contain templates. |
secondary |
string | Optional | Secondary info to render. May contain templates. |
badge_icon |
string | Optional | Badge icon to render. May contain templates. |
badge_color |
string | Optional | Badge icon color to render. May contain templates. |
picture |
string | Optional | Picture to render. May contain templates. |
multiline_secondary |
boolean | false |
Enables support for multiline text for the secondary info. |
layout |
string | Optional | 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 list |
Optional | 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 |
extra_cards |
list of cards | Optional | A list of cards to show on the top of the area subview |
Example
areas:
- name: Family Room
icon: mdi:television
icon_color: green
extra_cards:
- type: custom:mushroom-chips-card
chips:
- type: entity
entity: sensor.family_room_temperature
icon: mdi:thermometer
icon_color: pink
alignment: center
- name: Kitchen
icon: mdi:silverware-fork-knife
icon_color: red
Credits
- The cards used are from Mushroom, Mini graph card and Web RTC
- Took inspiration from Balloob battery strategy
Languages
TypeScript
100%


