docs(best-practices): fix stale dashboard guidance, add sizing/responsive mechanics#61
Conversation
…sive mechanics Corrections (verified against HA 2026.5 frontend source + docs): - section 'title' is deprecated -> heading cards (frontend marks it @deprecated); examples updated - 'call-service' -> 'perform-action' (renamed 2024.8) + missing 'assist' - view background example was malformed (url() wrapper + fractional opacity); object form takes plain path + 0-100 integer - features table updated to 2026.5 (swing modes, color favorites, media source/sound-mode, trend-graph/bar-gauge as features); removed unverifiable 'datetime-picker' (current feature is 'date-set') - ':root' CSS theme overrides -> actual HA theme YAML with modes - layout-card noted as superseded by sections for new builds - 2026.4 section background key is 'background' {color, opacity}, not 'background_color' Additions (official behavior, no conventions): - Card Sizing and Responsive Layout section: 12-col section grid, grid_options vs deprecated layout_options, column reflow behavior, column_span widening the section grid (24 columns at span 2, render-verified), screen visibility conditions with standard breakpoints, badges_wrap - full visibility condition list + perform-action example - pitfalls: map label_mode is per-entity (render-verified), lat/long attribute requirement, spanned-section sizing - visual iteration: per-breakpoint testing + async chart hydration caveat for screenshot-based workflows Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request comprehensively updates the Home Assistant Lovelace dashboard guide to reflect modern best practices up to version 2026.5. Key updates include detailing the sections view layout with its 12-column grid and responsive behavior, replacing deprecated section titles with heading cards, updating the available card features and action types (such as perform-action), and transitioning from raw CSS overrides to YAML-based themes. It also expands on visibility conditions, HACS card recommendations, troubleshooting steps, and adds testing caveats for screenshots. There are no review comments, so I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
Heads up: this overlaps #59/#60 in |
What this PR fixes
dashboard-guide.mdpredates several frontend changes and contained guidance that produces broken or deprecated config. Everything below was verified against the HA 2026.5 frontend source (src/data/lovelace/config/*.ts), official docs, and release notes; two items were additionally caught by rendering real dashboards and are marked render-verified.Corrections
{"title": ..., "cards": [...]}section.tsmarkstitle@deprecated Use heading card insteadcall-serviceperform-action(+ missingassist)"background": {"image": "url(/local/bg.jpg)", "opacity": 0.3}view.tsbackground schema;url()belongs to the legacy string form onlydatetime-pickerdate-setdatetime-pickerdoes not appear there:root { --primary-color: ... }CSS as "theme overrides"modes: {light, dark}layout-cardlisted without contextbackground_colorbackground: {color, opacity}(ortrue)LovelaceSectionBackgroundConfiginsection.tsAdditions (official behavior only, per CONTRIBUTING's "no opinionated conventions")
grid_options(and deprecatedlayout_options), how section columns reflow with viewport width, standard breakpoints forscreenvisibility conditions,badges_wrap.column_span: Nsections have N×12 grid columns on wide screens but 12 when collapsed (render-verified: three 6-column tiles fit one row in acolumn_span: 2section on desktop, two-up on phones) — with guidance for values that degrade well.label_modeis a per-entity option (render-verified: card-level silently no-ops and markers show name initials), map cards only plot entities withlatitude/longitudeattributes, spanned-section sizing.state,numeric_state,screen,user,time,location,and/or/not) and aperform-actionexample withconfirmation.Validation
uvx --from skills-ref agentskills validate skills/home-assistant-best-practices→Valid skill"columns": 6tiles in acolumn_span: 2section — they fit one row on desktop, two-up on phones; (2) setlabel_mode: stateat map-card level vs. per-entity and compare markers.Scope note
Corrections and additions land as one commit because they touch the same sections of the same file; happy to split into a corrections-only PR plus a follow-up if you prefer smaller reviews.