Skip to content

feat(ui): register dashboard strategy with HA 2026.5+ picker#1124

Merged
raman325 merged 1 commit intomainfrom
feat/dashboard-strategy-registration
May 4, 2026
Merged

feat(ui): register dashboard strategy with HA 2026.5+ picker#1124
raman325 merged 1 commit intomainfrom
feat/dashboard-strategy-registration

Conversation

@raman325
Copy link
Copy Markdown
Owner

@raman325 raman325 commented May 4, 2026

Proposed change

Registers the LCM dashboard strategy via the new window.customStrategies API
introduced in Home Assistant 2026.5. On HA 2026.5+, Lock Code Manager
now appears directly in Settings → Dashboards → Add Dashboard, so users
don't have to manually create a blank dashboard, open the Raw configuration
editor, and paste YAML. The YAML path still works for older HA and for
customizing strategy options.

The registration is additive metadata — on HA < 2026.5 it's harmless (nothing
reads window.customStrategies), so no version gating is needed in code.

Only the dashboard strategy registers. The view and section strategies are
referenced from within YAML the user is already editing, so the new picker API
doesn't apply.

Wiki updates landed alongside this PR (separate repo): the install quick-start
now leads with the new flow, and the UI Strategies reference notes the picker
behavior.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (which adds functionality)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:

🤖 Generated with Claude Code

Auto-discoverable in Settings > Dashboards > Add Dashboard via the new
window.customStrategies API. Falls back gracefully on older HA versions.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: a27025df6868
Copilot AI review requested due to automatic review settings May 4, 2026 19:31
@github-actions github-actions Bot added javascript Pull requests that update javascript code documentation Documentation changes enhancement New feature or request labels May 4, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.69%. Comparing base (ddda221) to head (65bc9bb).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1124   +/-   ##
=======================================
  Coverage   96.69%   96.69%           
=======================================
  Files          47       47           
  Lines        5515     5515           
  Branches      475      475           
=======================================
  Hits         5333     5333           
  Misses        182      182           
Flag Coverage Δ
typescript 95.07% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Home Assistant 2026.5+ dashboard-picker integration by registering Lock Code Manager’s dashboard strategy via the new window.customStrategies API, so users can create the dashboard directly from Settings → Dashboards → Add Dashboard while keeping YAML strategy support for older HA versions.

Changes:

  • Register the LCM dashboard strategy in window.customStrategies (name/type/description/docs URL metadata).
  • Add TypeScript global typing for window.customStrategies.
  • Update README copy to describe the new one-click dashboard flow for HA 2026.5+.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
ts/main.ts Defines strategy custom elements and registers the dashboard strategy metadata via window.customStrategies.
README.md Updates UI & Dashboards section to mention HA 2026.5+ dashboard picker flow.
custom_components/lock_code_manager/www/generated/lock-code-manager.js Regenerated frontend bundle containing the window.customStrategies registration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@raman325 raman325 merged commit deeb8a2 into main May 4, 2026
20 checks passed
@raman325 raman325 deleted the feat/dashboard-strategy-registration branch May 4, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Documentation changes enhancement New feature or request javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants