Get Dashboard
ha_config_get_dashboardList Home Assistant Lovelace dashboards, read dashboard or view configs, and search cards by query, entity, type, or heading.
Instructions
Get Lovelace dashboards: list them, read one config, or search their cards.
Not for a render alone: ha_get_dashboard_screenshot (screenshot beta feature) returns images without the config. Not for entity discovery: use ha_search.
The parameters pick the mode:
list_only=True: storage and YAML dashboards alike.
Any of query / entity_id / card_type / heading searches cards and header cards, AND-ing the criteria, in url_path or, when it is omitted, every storage dashboard. View badges answer entity_id and query, and heading excludes them. Cards nested at any depth count, including custom cards' own keys such as groups[].cards[].card. Each match has a jq_path and a python_path to append to
configin ha_config_set_dashboard(python_transform=...), e.g. f'config{m["python_path"]}["icon"] = "mdi:x"'. Each match carries its dashboard's url_path and config_hash; a one-dashboard search also returns the config_hash at the top level.Otherwise the full config of url_path (the default dashboard when omitted) is returned; with view_path only that view, while config_hash still covers the full config.
Caveats: config_hash stays the same across reads of an unchanged config.
Searches stop at 200 matches (truncated). A search across dashboards
skips YAML dashboards (HA resolves !secret in them) and, without a
current ha_mcp_tools component, the default dashboard (with a warning);
name either by url_path.
Strategy dashboards have no stored cards to search. An unknown view_path
errors and lists the available ones.
EXAMPLES:
List all dashboards: ha_config_get_dashboard(list_only=True)
Get one view only: ha_config_get_dashboard(url_path="lovelace-mobile", view_path="office")
Find cards by entity (wildcards allowed): ha_config_get_dashboard(url_path="my-dash", entity_id="sensor.temperature_*")
Find heading: ha_config_get_dashboard(url_path="my-dash", heading="Climate", card_type="heading")
Which dashboards use an entity: ha_config_get_dashboard(query="light.bedroom")
Fields of a card type before writing one (omit card_type to list types): ha_config_get_dashboard(card_type="tile", describe=True)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Search: text or entity ID contained in any value a card holds (case-insensitive); the matching values are listed under `matched`. | |
| heading | No | Search: cards whose heading/title contains this text (case-insensitive). | |
| describe | No | Return card_type's fields from HA's card editor | |
| url_path | No | Dashboard URL path (e.g. 'lovelace-home'); 'default' for the default dashboard. | |
| card_type | No | Search: cards of this type, e.g. 'tile'; 'badge' selects view badges instead (alone, it lists them all). With describe=True: the type to describe. | |
| entity_id | No | Search: cards whose entity/entities field holds this entity ID; '*' matches any run of characters (including none) and the whole ID must match (e.g. 'sensor.temperature_*'). | |
| list_only | No | List every dashboard's metadata instead of reading one; ignored when a search parameter is given. | |
| view_path | No | Get mode: return ONLY the view whose Lovelace views[].path matches (response carries 'view' + 'view_index' instead of the full 'config'). With include_screenshot, also selects the view to render. | |
| force_reload | No | Get only: bypass the config cache (searches always read fresh config). | |
| include_config | No | Search: include each matched card's own config. A container's body includes its nested cards, which are also matches, so nested stacks multiply the payload. Withheld, with a warning, for a dashboard not provably storage-mode (a YAML config may carry resolved !secret values). | |
| include_screenshot | No | Get mode only: also return rendered image(s) of the dashboard for visual verification. Requires the 'dashboard screenshot' beta feature + engine app (add-on)/sidecar. If the feature is disabled the config is returned with a warning; if the engine is configured but the render fails, the call errors. |