Skip to content

Dashboards

Claude edits dashboards through a fetch-modify-save flow instead of touching .storage files: read the config with the get_dashboard MCP tool (list_dashboards enumerates them), change the JSON, and save the complete object back with update_dashboard.

Every update automatically backs up the previous configuration first (the last 20 per dashboard are kept), and restore_dashboard undoes a bad edit with one call.

A YAML-mode dashboard is edited, just not through here

These services edit the registry, so a dashboard defined in YAML isn’t something they can reach — they decline with an error naming the file. brAIn then does the obvious thing: it opens that file in the terminal, edits it, validates it and reloads Lovelace. Both routes end with your dashboard changed, and both are covered by brain undo.

Create dashboard

brain.create_dashboard

Create a new storage-mode dashboard. The URL path must contain a hyphen (e.g. lovelace-lights). Returns the new dashboard’s url_path and id as response data.

Field Type Required Description
url_path text yes URL path for the dashboard; must contain a hyphen.
title text yes Sidebar title.
icon icon no Sidebar icon.
show_in_sidebar boolean no Show the dashboard in the sidebar (default on).
require_admin boolean no Only admins can see this dashboard.
service: brain.create_dashboard
data:
url_path: lovelace-guest
title: Guest
icon: mdi:account-heart

🗣️ “Make a simple Guest dashboard with just the lights and the thermostat.”

Update dashboard

brain.update_dashboard

Replace a storage-mode dashboard’s configuration — or, with view_index, a single view. The previous configuration is automatically backed up first (last 20 kept per dashboard) and the backup name is returned as response data, so any edit can be undone with restore_dashboard. A YAML-mode dashboard is declined here and edited as a file instead. Saving onto a never-saved (auto-generated) dashboard requires take_control: true, because that takes permanent manual control of it — reset_dashboard_config reverts it.

Field Type Required Description
config object yes The full dashboard configuration object including the complete views list — or, when view_index is set, a single view object.
url_path text yes The dashboard’s URL path (e.g. lovelace-lights), or the literal default for the default dashboard. Required on purpose: the default dashboard can only be targeted deliberately, never by accidental omission.
take_control boolean no Confirm saving onto a never-saved (auto-generated) dashboard.
view_index number no Replace only this view (0-based); config must then be a single view object.
dry_run boolean no Only report the resolved target and a change summary — nothing is written.
service: brain.update_dashboard
data:
url_path: lovelace-lights
config:
views:
- title: Lights
cards:
- type: light
entity: light.kitchen_ceiling

🗣️ “Add a card for the new kitchen light to my Lights dashboard.”

Restore dashboard

brain.restore_dashboard

Restore a storage-mode dashboard from a backup made by update_dashboard. Restores the most recent backup unless a specific backup name is given.

Field Type Required Description
url_path text no The dashboard’s URL path. Omit for the default dashboard.
backup text no A specific backup file name from a previous update_dashboard response. Omit for the most recent.
# Undo the last edit
service: brain.restore_dashboard
data:
url_path: lovelace-lights

🗣️ “That dashboard change was worse — put it back how it was.”

Reset dashboard config

brain.reset_dashboard_config

Delete a dashboard’s stored configuration — after backing it up — reverting it to auto-generated. The dashboard itself stays registered and in the sidebar; only its saved config goes (delete_dashboard is what removes the registration). This is the sanctioned way to clear a dashboard config — the gap that used to push callers toward raw lovelace/config websocket commands, which are off-limits — and restore_dashboard brings the config back from the backup if you regret it.

Field Type Required Description
url_path text yes The dashboard’s URL path, or the literal default for the default dashboard.
dry_run boolean no Only report what would be reset (the stored config’s view count) — nothing is changed. Default off.
service: brain.reset_dashboard_config
data:
url_path: lovelace-guest

🗣️ “Wipe the guest dashboard back to the auto-generated one.”

Delete dashboard

brain.delete_dashboard

Delete a storage-mode dashboard. Its configuration is backed up first (same backup store as update_dashboard) and the backup name is returned as response data, so a deletion can be recovered by recreating the dashboard and restoring.

Field Type Required Description
url_path text yes The dashboard’s URL path.
service: brain.delete_dashboard
data:
url_path: lovelace-old-tablet

🗣️ “Delete the old tablet dashboard — we don’t use it anymore.”

Add dashboard resource

brain.add_dashboard_resource

Register a dashboard resource — the JavaScript module or stylesheet of a custom card (e.g. /hacsfiles/… or /local/…). Returns the resource id as response data. Duplicate URLs are refused.

Field Type Required Description
url text yes Resource URL.
res_type select no Resource type (default module).
service: brain.add_dashboard_resource
data:
url: /local/community/mushroom/mushroom.js
res_type: module

🗣️ “Install the Mushroom cards and redo my overview with them.”

Remove dashboard resource

brain.remove_dashboard_resource

Remove a registered dashboard resource by its URL.

Field Type Required Description
url text yes The URL of the resource to remove.
service: brain.remove_dashboard_resource
data:
url: /local/old-card.js

🗣️ “Remove that custom card module I stopped using.”