-
Notifications
You must be signed in to change notification settings - Fork 44
Home
You need to install these cards before using this strategy:
Mushroom dashboard strategy is available in [HACS][hacsUrl] (Home Assistant Community Store).
- Install HACS if you don't have it already.
- Open HACS in Home Assistant.
- Go to the "Frontend" section.
- Click the button with the "+" icon
- Search for "Mushroom dashboard" and install.
- Download
mushroom-strategy.js
file from thedist
directory. - Put
mushroom-strategy.js
file into yourconfig/www
folder. - Add a reference to
mushroom-strategy.js
in Dashboard. There are two ways 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 the following code to the
lovelace
section.resources: - url: /local/mushroom-strategy.js type: module
-
Using UI: Settings → Dashboards → More Options icon → Resources → Add Resource → Set Url
as
To add Mushroom Strategy to a dashboard:
- In the UI of the dashboard, click the three dots in the top right corner.
- Click Edit Dashboard.
- Click 3 dots again
- Click
Raw configuration editor
- Add the following lines:
strategy:
type: custom:mushroom-strategy
views: []
You may see the following error
Error loading the dashboard strategy:
Error: Timeout waiting for strategy
element ||-strategy-mushroom-strategy to
be registered
This is mainly because of cache or HACs didn't create a reference. Try clearing the cache on your browser and add a reference to mushroom-strategy.js in the Dashboard. There are two ways to do that:
-
Using UI: Settings → Dashboards → More Options icon (3 dots) → Resources → Add Resource → Set Url to
/hacsfiles/mushroom-strategy/mushroom-strategy.js
Set Resourcetype toJavaScript-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 lovelace section.
resources:
- url: /hacsfiles/mushroom-strategy/mushroom-strategy.js
type: module
Use /local/mushroom-strategy.js
as url if you followed the manual installation instructions.