Skip to content

Update strategies and registering dashboard strategies blog post#3023

Open
timmo001 wants to merge 16 commits intomasterfrom
register-custom-dashboard-strategies
Open

Update strategies and registering dashboard strategies blog post#3023
timmo001 wants to merge 16 commits intomasterfrom
register-custom-dashboard-strategies

Conversation

@timmo001
Copy link
Copy Markdown
Member

@timmo001 timmo001 commented Mar 31, 2026

Proposed change

Related PR: home-assistant/frontend#51310

Includes a blog post, which we could release at time of beta and/or note in release notes

Type of change

  • Document existing features within Home Assistant
  • Document new or changing features for which there is an existing pull request elsewhere
  • Spelling or grammatical corrections, or rewording for improved clarity
  • Changes to the backend of this documentation
  • Remove stale or deprecated documentation

Checklist

  • I have read and followed the documentation guidelines.
  • I have verified that my changes render correctly in the documentation.

Additional information

Summary by CodeRabbit

  • Documentation
    • Added a guide for registering community dashboard strategies in Home Assistant 2026.4.
    • Reworked custom strategy and custom view docs with clearer structure, updated examples, and improved naming.
    • Clarified resource-loading and refresh steps required for community dashboard discovery.
    • Added redirects for retired documentation paths.

@timmo001 timmo001 changed the title Rename custom views, format code examples Strategies updated docs and registering custom dashboard strategies blog post Mar 31, 2026
@timmo001 timmo001 changed the title Strategies updated docs and registering custom dashboard strategies blog post Update strategies and registering dashboard strategies blog post Mar 31, 2026
@timmo001 timmo001 marked this pull request as ready for review April 1, 2026 08:58
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 1, 2026

📝 Walkthrough

Walkthrough

Documentation additions for Home Assistant 2026.4: new blog post and docs for registering community dashboard/view strategies via window.customStrategies.push(...), updates to custom strategy/view examples and registration notes, and two redirects for legacy community paths.

Changes

Cohort / File(s) Summary
Blog post
blog/2026-04-29-registering-custom-dashboard-strategies.md
New post describing community dashboard registration via window.customStrategies.push(...), required fields (type, strategyType), optional metadata (name, description, documentationURL, images), example registration object and preview image usage, and note that the underlying custom element resource must be loaded.
Custom strategy docs
docs/frontend/custom-ui/custom-strategy.md
Restructures guidance into "Dashboards" and "Views", replaces prior function-based strategy examples with custom element–based strategies and updated examples, documents community picker registration via window.customStrategies with duplicate-safe checks and preview image metadata.
Custom views docs
docs/frontend/custom-ui/custom-view.md
Renamed to "Custom views" and reformatted example code (imports, spacing, trailing commas), adjusted conditional checks and clarified CustomEvent("ll-edit-card") dispatch example.
Resource registration notes
docs/frontend/custom-ui/registering-resources.md
Adds note that community dashboard resources must be loaded before Home Assistant can list them in the new dashboard dialog and instructs users to refresh/reopen the dialog after adding/updating resources; links to custom strategy docs.
Redirects
static/_redirects
Adds two Netlify redirects retiring old paths: /docs/frontend/custom-ui/community-dashboards/docs/frontend/custom-ui/custom-strategy and /docs/frontend/custom-ui/community-views/docs/frontend/custom-ui/custom-view.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Dev page / resource
    participant Browser as Browser (window)
    participant HA as Home Assistant UI
    participant Resource as Hosted resource (JS)

    rect rgba(135,206,250,0.5)
    Dev->>Browser: load resource script
    Browser->>Browser: execute script\nwindow.customStrategies.push({...})
    end

    rect rgba(144,238,144,0.5)
    HA->>Browser: open "New dashboard" dialog\nquery window.customStrategies
    Browser-->>HA: return registered strategies list
    HA->>Resource: request strategy resource (if not loaded)
    Resource-->>HA: load custom element / code
    HA->>HA: render community strategies in dialog
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and accurately describes the main changes: updating strategy documentation and adding a blog post about registering custom dashboard strategies.
Description check ✅ Passed The PR description follows the template structure, includes a related frontend PR link, specifies the type of change (new features), and completes the relevant checklist items.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch register-custom-dashboard-strategies

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (3)
blog/2026-04-29-registering-custom-dashboard-strategies.md (2)

38-38: Rephrase for clarity.

The phrase "users still need the resource loaded" is awkward. Consider active voice or clearer phrasing.

✍️ Suggested revision
-This metadata is separate from the custom element itself. Your strategy still needs to be registered with a tag like `ll-strategy-dashboard-my-demo`, and users still need the resource loaded before Home Assistant can discover it. You can use HACS for this as other resource can be added, like custom cards.
+This metadata is separate from the custom element itself. Your strategy still needs to be registered with a tag like `ll-strategy-dashboard-my-demo`, and users still need to load the resource before Home Assistant can discover it. You can use HACS for this as other resources can be added, like custom cards.

Note: Also fixes "resource can be" → "resources can be" (subject-verb agreement).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@blog/2026-04-29-registering-custom-dashboard-strategies.md` at line 38, The
sentence "users still need the resource loaded" is awkward and passive—reword it
in active voice and fix subject-verb agreement earlier in the paragraph; for
example, explicitly state that users must load the resource (or install it via
HACS) before Home Assistant can discover the strategy and change "resource can
be added" to "resources can be added"; keep the example tag
ll-strategy-dashboard-my-demo and mention HACS as the installation mechanism so
readers know they must load the resource before discovery.

9-9: Clarify the opening sentence.

The phrase "Before you could do this, but had to send users to" is unclear. Consider revising to explain what users had to do before this feature was introduced.

✍️ Suggested revision
-Before you could do this, but had to send users to create a blank dashboard, edit in YAML mode, and paste in your custom strategy. Now you can register a friendly name, description, documentation, and preview image.
+Previously, users had to create a blank dashboard, edit in YAML mode, and paste in your custom strategy. Now you can register a friendly name, description, documentation, and preview image.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@blog/2026-04-29-registering-custom-dashboard-strategies.md` at line 9, The
opening sentence "Before you could do this, but had to send users to" is
unclear—locate that exact sentence in the post and replace it with a clear,
active description of the previous workflow; for example: "Previously, to use a
custom strategy you had to direct users to create a blank dashboard, switch to
YAML mode, and paste in your strategy." Ensure the new sentence names the action
(create a blank dashboard), the mode (YAML), and the required paste step, and
keep the rest of the paragraph flow unchanged.
docs/frontend/custom-ui/registering-resources.md (1)

31-31: Bold the UI string "new dashboard dialog".

UI strings should be bolded for consistency. As per coding guidelines, use bold to mark UI strings.

📝 Proposed fix
-If you are building a community dashboard, the resource must be loaded before Home Assistant can show it in the new dashboard dialog. After adding or updating the resource, refresh Home Assistant and reopen the dialog.
+If you are building a community dashboard, the resource must be loaded before Home Assistant can show it in the **new dashboard** dialog. After adding or updating the resource, refresh Home Assistant and reopen the dialog.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/frontend/custom-ui/registering-resources.md` at line 31, The sentence
should bold the UI string "new dashboard dialog" for consistency; locate the
sentence containing that exact phrase and wrap it with Markdown bold markers
(replace new dashboard dialog with **new dashboard dialog**) so the docs reflect
the UI-string formatting convention.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@blog/2026-04-29-registering-custom-dashboard-strategies.md`:
- Line 17: The doc string for the `documentationURL` field uses British English
("may in future"); update that sentence in
blog/2026-04-29-registering-custom-dashboard-strategies.md so it reads "may in
the future" or "may be shown in the future" (replace the phrase "may in future"
with "may in the future") to conform to American English per the Microsoft Style
Guide.

In `@docs/frontend/custom-ui/custom-strategy.md`:
- Line 17: Update the sentence to hyphenate the adjective and replace the
non-descriptive link text: change "Built in dashboards are built with dashboard
strategies." to "Built-in dashboards are built with dashboard strategies." and
replace the link text "here" with a descriptive phrase such as "built-in
dashboard strategies source code" (keeping the existing URL) so the link is
meaningful and the adjective is correctly hyphenated.

---

Nitpick comments:
In `@blog/2026-04-29-registering-custom-dashboard-strategies.md`:
- Line 38: The sentence "users still need the resource loaded" is awkward and
passive—reword it in active voice and fix subject-verb agreement earlier in the
paragraph; for example, explicitly state that users must load the resource (or
install it via HACS) before Home Assistant can discover the strategy and change
"resource can be added" to "resources can be added"; keep the example tag
ll-strategy-dashboard-my-demo and mention HACS as the installation mechanism so
readers know they must load the resource before discovery.
- Line 9: The opening sentence "Before you could do this, but had to send users
to" is unclear—locate that exact sentence in the post and replace it with a
clear, active description of the previous workflow; for example: "Previously, to
use a custom strategy you had to direct users to create a blank dashboard,
switch to YAML mode, and paste in your strategy." Ensure the new sentence names
the action (create a blank dashboard), the mode (YAML), and the required paste
step, and keep the rest of the paragraph flow unchanged.

In `@docs/frontend/custom-ui/registering-resources.md`:
- Line 31: The sentence should bold the UI string "new dashboard dialog" for
consistency; locate the sentence containing that exact phrase and wrap it with
Markdown bold markers (replace new dashboard dialog with **new dashboard
dialog**) so the docs reflect the UI-string formatting convention.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7245b61e-2048-4d35-a04c-c08243ff1d64

📥 Commits

Reviewing files that changed from the base of the PR and between 0f4bc0e and 770de2a.

📒 Files selected for processing (5)
  • blog/2026-04-29-registering-custom-dashboard-strategies.md
  • docs/frontend/custom-ui/custom-strategy.md
  • docs/frontend/custom-ui/custom-view.md
  • docs/frontend/custom-ui/registering-resources.md
  • static/_redirects

## Dashboards

A dashboard strategy is responsible for generating a full dashboard configuration. This can either be from scratch, or based on an existing dashboard configuration that is passed in.
A dashboard strategy generates a full dashboard configuration. In most cases, it starts from a small strategy config and returns the full dashboard structure. Think of this like a json/yaml config which is then rendered into a dashboard. Built in dashboards are built with dashboard strategies. You can read the source code for the built in dashboards [here](https://github.com/home-assistant/frontend/tree/dev/src/panels/lovelace/strategies).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Fix hyphenation and link text.

Two issues in this sentence:

  1. "Built in dashboards" should be hyphenated as "built-in dashboards" when used as an adjective before a noun.
  2. The link text "here" is non-descriptive. As per coding guidelines, apply the Microsoft Style Guide which recommends descriptive link text.
📝 Proposed fix
-A dashboard strategy generates a full dashboard configuration. In most cases, it starts from a small strategy config and returns the full dashboard structure. Think of this like a json/yaml config which is then rendered into a dashboard. Built in dashboards are built with dashboard strategies. You can read the source code for the built in dashboards [here](https://github.com/home-assistant/frontend/tree/dev/src/panels/lovelace/strategies).
+A dashboard strategy generates a full dashboard configuration. In most cases, it starts from a small strategy config and returns the full dashboard structure. Think of this like a json/yaml config which is then rendered into a dashboard. Built-in dashboards are built with dashboard strategies. You can read the [source code for the built-in dashboards](https://github.com/home-assistant/frontend/tree/dev/src/panels/lovelace/strategies).
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
A dashboard strategy generates a full dashboard configuration. In most cases, it starts from a small strategy config and returns the full dashboard structure. Think of this like a json/yaml config which is then rendered into a dashboard. Built in dashboards are built with dashboard strategies. You can read the source code for the built in dashboards [here](https://github.com/home-assistant/frontend/tree/dev/src/panels/lovelace/strategies).
A dashboard strategy generates a full dashboard configuration. In most cases, it starts from a small strategy config and returns the full dashboard structure. Think of this like a json/yaml config which is then rendered into a dashboard. Built-in dashboards are built with dashboard strategies. You can read the [source code for the built-in dashboards](https://github.com/home-assistant/frontend/tree/dev/src/panels/lovelace/strategies).
🧰 Tools
🪛 LanguageTool

[grammar] ~17-~17: Use a hyphen to join words.
Context: ...is then rendered into a dashboard. Built in dashboards are built with dashboard s...

(QB_NEW_EN_HYPHEN)


[grammar] ~17-~17: Use a hyphen to join words.
Context: ...u can read the source code for the built in dashboards [here](https://github.com/...

(QB_NEW_EN_HYPHEN)

🪛 markdownlint-cli2 (0.22.0)

[warning] 17-17: Link text should be descriptive

(MD059, descriptive-link-text)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/frontend/custom-ui/custom-strategy.md` at line 17, Update the sentence
to hyphenate the adjective and replace the non-descriptive link text: change
"Built in dashboards are built with dashboard strategies." to "Built-in
dashboards are built with dashboard strategies." and replace the link text
"here" with a descriptive phrase such as "built-in dashboard strategies source
code" (keeping the existing URL) so the link is meaningful and the adjective is
correctly hyphenated.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
blog/2026-04-29-registering-custom-dashboard-strategies.md (1)

25-35: Use a duplicate-safe registration pattern in the example.

At Line 25, the sample unconditionally pushes metadata. If this script is evaluated more than once, it can add duplicate picker entries. Please show the guarded pattern in the blog example to match current docs.

💡 Proposed doc snippet update
 window.customStrategies = window.customStrategies || [];
-
-window.customStrategies.push({
-  type: "my-demo",
-  strategyType: "dashboard",
-  name: "My demo dashboard",
-  description: "A starter dashboard generated from JavaScript.",
-  documentationURL: "https://example.com/my-demo-dashboard",
-  images: {
-    light: "/local/my-demo/preview-light.svg",
-    dark: "/local/my-demo/preview-dark.svg",
-  },
-});
+if (!window.customStrategies.some((strategy) => strategy.type === "my-demo" && strategy.strategyType === "dashboard")) {
+  window.customStrategies.push({
+    type: "my-demo",
+    strategyType: "dashboard",
+    name: "My demo dashboard",
+    description: "A starter dashboard generated from JavaScript.",
+    documentationURL: "https://example.com/my-demo-dashboard",
+    images: {
+      light: "/local/my-demo/preview-light.svg",
+      dark: "/local/my-demo/preview-dark.svg",
+    },
+  });
+}

As per coding guidelines, “Include an explicit window.customStrategies = window.customStrategies || []; init and use a duplicate-safe pattern if listing can be added multiple times.”

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@blog/2026-04-29-registering-custom-dashboard-strategies.md` around lines 25 -
35, Initialize window.customStrategies if missing and avoid duplicate
registrations by checking existing entries before pushing; specifically ensure
you call something like initializing window.customStrategies =
window.customStrategies || [] and then only add the object with type "my-demo"
(or matching name/strategyType) if no existing entry with that
type/name/strategyType exists, updating the example that pushes the object so it
first searches window.customStrategies for an existing match and only pushes
when none is found.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@blog/2026-04-29-registering-custom-dashboard-strategies.md`:
- Line 38: Change the ungrammatical phrase "other resource can be added" to
plural agreement—e.g., "other resources can be added"—in the sentence describing
HACS usage so that line referencing adding custom resources reads correctly
("You can use HACS for this as other resources can be added, like custom
cards.").

---

Nitpick comments:
In `@blog/2026-04-29-registering-custom-dashboard-strategies.md`:
- Around line 25-35: Initialize window.customStrategies if missing and avoid
duplicate registrations by checking existing entries before pushing;
specifically ensure you call something like initializing window.customStrategies
= window.customStrategies || [] and then only add the object with type "my-demo"
(or matching name/strategyType) if no existing entry with that
type/name/strategyType exists, updating the example that pushes the object so it
first searches window.customStrategies for an existing match and only pushes
when none is found.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 767559c3-4b72-4eb8-beae-62ac09a162cc

📥 Commits

Reviewing files that changed from the base of the PR and between 770de2a and f3d8c3d.

📒 Files selected for processing (1)
  • blog/2026-04-29-registering-custom-dashboard-strategies.md

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (1)
docs/frontend/custom-ui/custom-strategy.md (1)

17-17: ⚠️ Potential issue | 🟡 Minor

Fix hyphenation and use descriptive link text.

This issue was flagged in a previous review but not addressed. Two problems remain:

  1. "Built in dashboards" should be hyphenated as "built-in dashboards" when used as a compound adjective.
  2. The link text "here" is non-descriptive. The Microsoft Style Guide recommends descriptive link text. As per coding guidelines, apply the Microsoft Style Guide.
📝 Proposed fix
-A dashboard strategy generates a full dashboard configuration. In most cases, it starts from a small strategy config and returns the full dashboard structure. Think of this like a json/yaml config which is then rendered into a dashboard. Built in dashboards are built with dashboard strategies. You can read the source code for the built in dashboards [here](https://github.com/home-assistant/frontend/tree/dev/src/panels/lovelace/strategies).
+A dashboard strategy generates a full dashboard configuration. In most cases, it starts from a small strategy config and returns the full dashboard structure. Think of this like a json/yaml config which is then rendered into a dashboard. Built-in dashboards are built with dashboard strategies. You can read the [source code for built-in dashboards](https://github.com/home-assistant/frontend/tree/dev/src/panels/lovelace/strategies).
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/frontend/custom-ui/custom-strategy.md` at line 17, Change the phrase
"Built in dashboards" to the hyphenated compound adjective "built-in dashboards"
and replace the non-descriptive link text "here" with a descriptive phrase such
as "built-in dashboard strategies source code" (keeping the same URL). Update
the sentence that references the repo to read something like: "...Built-in
dashboards are built with dashboard strategies; you can read the built-in
dashboard strategies source code." Ensure you edit the sentence containing the
link and the phrase "Built in dashboards" in the custom-strategy.md content.
🧹 Nitpick comments (3)
blog/2026-04-29-registering-custom-dashboard-strategies.md (2)

40-40: Use more direct phrasing for instructional content.

The phrase "Take a look at" is informal. For documentation, use more direct language such as "Refer to" or "See." As per coding guidelines, use a direct and authoritative tone for instructional content.

📝 Suggested refinement
-Take a look at the updated [custom strategies](/docs/frontend/custom-ui/custom-strategy) documentation with example code and further details.
+Refer to the updated [custom strategies](/docs/frontend/custom-ui/custom-strategy) documentation for example code and further details.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@blog/2026-04-29-registering-custom-dashboard-strategies.md` at line 40,
Replace the informal phrase "Take a look at the updated [custom
strategies](/docs/frontend/custom-ui/custom-strategy) documentation..." with a
direct instructional phrasing such as "Refer to the updated [custom
strategies](/docs/frontend/custom-ui/custom-strategy) documentation..." or "See
the updated [custom strategies](/docs/frontend/custom-ui/custom-strategy)
documentation..." so the sentence uses an authoritative, instructional tone;
update the sentence containing the "[custom strategies]" link accordingly.

16-16: Consider using "brief" instead of "short".

The Microsoft Style Guide recommends "brief" over "short" for describing concise descriptions. As per coding guidelines, apply the Microsoft Style Guide.

📝 Suggested refinement
-- `description` (`optional`): A short description of the strategy.
+- `description` (`optional`): A brief description of the strategy.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@blog/2026-04-29-registering-custom-dashboard-strategies.md` at line 16,
Update the field documentation for the `description` property to use Microsoft
Style Guide wording: replace "A short description of the strategy." with "A
brief description of the strategy." so the `description` (`optional`) entry uses
"brief" instead of "short".
docs/frontend/custom-ui/custom-strategy.md (1)

134-134: Simplify awkward word order.

The phrase "as can custom cards be used" has inverted word order that makes the sentence harder to read. Use standard word order for clarity.

📝 Suggested refinement
-A view strategy generates the configuration of a specific dashboard view. These can be reused in dashboard strategies if needed, as can custom cards be used in view strategies.
+A view strategy generates the configuration of a specific dashboard view. These can be reused in dashboard strategies if needed, as custom cards can be used in view strategies.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/frontend/custom-ui/custom-strategy.md` at line 134, The sentence "These
can be reused in dashboard strategies if needed, as can custom cards be used in
view strategies." uses inverted word order; change it to standard order for
clarity by rewriting the clause to "and custom cards can be used in view
strategies" (so the full sentence reads: "These can be reused in dashboard
strategies if needed, and custom cards can be used in view strategies."). Locate
this text in the custom-strategy.md content and replace the inverted clause
accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/frontend/custom-ui/custom-strategy.md`:
- Line 7: Update the sentence in custom-strategy.md that currently reads "You
can create new strategies in the frontend repository, or create custom
strategies. Both of which have access to the Home Assistant API similar to
[custom cards](./custom-card.md)." to use simpler phrasing: replace "Both of
which have access" with "Both have access" so the sentence reads "...or create
custom strategies. Both have access to the Home Assistant API similar to [custom
cards](./custom-card.md)." This change is in the paragraph that defines
"Strategies" in the custom-strategy.md document.
- Line 61: Update the sentence referencing the "map dashboard strategy" example:
change "for less complex example" to "for a less complex example" and change
"This in term uses" to "This in turn uses" so the sentence reads correctly and
fixes the article and typo in the phrase describing the map view strategy and
panel view type.

---

Duplicate comments:
In `@docs/frontend/custom-ui/custom-strategy.md`:
- Line 17: Change the phrase "Built in dashboards" to the hyphenated compound
adjective "built-in dashboards" and replace the non-descriptive link text "here"
with a descriptive phrase such as "built-in dashboard strategies source code"
(keeping the same URL). Update the sentence that references the repo to read
something like: "...Built-in dashboards are built with dashboard strategies; you
can read the built-in dashboard strategies source code." Ensure you edit the
sentence containing the link and the phrase "Built in dashboards" in the
custom-strategy.md content.

---

Nitpick comments:
In `@blog/2026-04-29-registering-custom-dashboard-strategies.md`:
- Line 40: Replace the informal phrase "Take a look at the updated [custom
strategies](/docs/frontend/custom-ui/custom-strategy) documentation..." with a
direct instructional phrasing such as "Refer to the updated [custom
strategies](/docs/frontend/custom-ui/custom-strategy) documentation..." or "See
the updated [custom strategies](/docs/frontend/custom-ui/custom-strategy)
documentation..." so the sentence uses an authoritative, instructional tone;
update the sentence containing the "[custom strategies]" link accordingly.
- Line 16: Update the field documentation for the `description` property to use
Microsoft Style Guide wording: replace "A short description of the strategy."
with "A brief description of the strategy." so the `description` (`optional`)
entry uses "brief" instead of "short".

In `@docs/frontend/custom-ui/custom-strategy.md`:
- Line 134: The sentence "These can be reused in dashboard strategies if needed,
as can custom cards be used in view strategies." uses inverted word order;
change it to standard order for clarity by rewriting the clause to "and custom
cards can be used in view strategies" (so the full sentence reads: "These can be
reused in dashboard strategies if needed, and custom cards can be used in view
strategies."). Locate this text in the custom-strategy.md content and replace
the inverted clause accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e168275c-ef07-4138-a192-7530df276828

📥 Commits

Reviewing files that changed from the base of the PR and between f3d8c3d and 343591a.

📒 Files selected for processing (2)
  • blog/2026-04-29-registering-custom-dashboard-strategies.md
  • docs/frontend/custom-ui/custom-strategy.md

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
docs/frontend/custom-ui/custom-strategy.md (1)

21-25: Consider consistent bold formatting.

Line 21 uses __text__ (underscores) for bold, while line 25 uses **text** (asterisks). While both are valid Markdown, consistent styling improves maintainability.

📝 Proposed fix for consistency
-Once the resource is loaded, Home Assistant can show your dashboard in the **new dashboard** dialog under the **Community dashboards** section.
+Once the resource is loaded, Home Assistant can show your dashboard in the __new dashboard__ dialog under the __Community dashboards__ section.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/frontend/custom-ui/custom-strategy.md` around lines 21 - 25, The
markdown uses mixed bold syntax: "__Introduced in Home Assistant 2026.4.__"
(underscores) and "**new dashboard**" (asterisks); pick one style and make them
consistent across the file (e.g., convert "__Introduced in Home Assistant
2026.4.__" to "**Introduced in Home Assistant 2026.4.**" or vice versa) and
apply the same change to any other bold occurrences such as "**Community
dashboards**" and "`window.customStrategies`" surrounding text to keep uniform
formatting.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/frontend/custom-ui/custom-strategy.md`:
- Line 99: The example registers the element unguarded which throws if loaded
twice; update the registration for the custom element
"ll-strategy-dashboard-my-demo" to first check
customElements.get("ll-strategy-dashboard-my-demo") and only call
customElements.define("ll-strategy-dashboard-my-demo", MyDemoDashboardStrategy)
when the check returns undefined, using the MyDemoDashboardStrategy class name
to locate the definition.
- Line 35: The description for the documentationURL field is ambiguous; update
the docs to state its present behavior and intent by editing the
documentationURL entry: either remove "yet" and say "This is not displayed in
the strategy UI" if there is no plan to display it, or replace the sentence with
a clear note where/when it will be used (e.g., "Displayed in X view" or "Used by
Y backend") if an implementation is planned; ensure the change references the
documentationURL field so readers know which property the note applies to.

---

Nitpick comments:
In `@docs/frontend/custom-ui/custom-strategy.md`:
- Around line 21-25: The markdown uses mixed bold syntax: "__Introduced in Home
Assistant 2026.4.__" (underscores) and "**new dashboard**" (asterisks); pick one
style and make them consistent across the file (e.g., convert "__Introduced in
Home Assistant 2026.4.__" to "**Introduced in Home Assistant 2026.4.**" or vice
versa) and apply the same change to any other bold occurrences such as
"**Community dashboards**" and "`window.customStrategies`" surrounding text to
keep uniform formatting.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f7d2fecf-7bfe-4dc9-bd58-2ed3c76954fa

📥 Commits

Reviewing files that changed from the base of the PR and between 343591a and a4da0ee.

📒 Files selected for processing (1)
  • docs/frontend/custom-ui/custom-strategy.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants