Compare commits

...

17 Commits

Author SHA1 Message Date
Aidan Timson 39231fd8c4 Casing
Co-authored-by: Norbert Rittel <norbert@rittel.de>
2026-07-02 12:31:01 +01:00
Aidan Timson 717acb0a9e Redirect old developer tools URLs on initial load and add tools e2e tests 2026-07-02 12:31:01 +01:00
Aidan Timson df79a9b546 Update bug report description 2026-07-02 12:31:00 +01:00
Aidan Timson 4502aaa629 Load config fragment for statistics repairs 2026-07-02 12:31:00 +01:00
Aidan Timson 4dc2357a94 Rename developer tools translation keys to tools 2026-07-02 12:31:00 +01:00
Aidan Timson c3a1fc4bde Update developer tools link in issue template 2026-07-02 12:28:56 +01:00
Aidan Timson b72b233a3e Update e2e tests for the tools panel 2026-07-02 12:28:56 +01:00
Aidan Timson 3637923541 Rename developer tools panel to Tools 2026-07-02 12:28:56 +01:00
Aidan Timson f870441d41 Add tools my-link redirects 2026-07-02 12:28:56 +01:00
Aidan Timson da8dcba5b6 Redirect old developer tools URLs to /config/tools 2026-07-02 12:28:56 +01:00
Aidan Timson 69d48c8dd3 Point config panel routing at /config/tools 2026-07-02 12:28:56 +01:00
Aidan Timson 1d2e5e95de Rename developer tools element tags and imports 2026-07-02 12:28:56 +01:00
Aidan Timson 91fa275460 Rename 2026-07-02 12:28:06 +01:00
Franck Nijhof f84664909f Link the config pane help icon to the dedicated docs page (#52940)
For built-in triggers, conditions, and actions, the help icon in the editor
config pane (and Developer Tools) linked to the integration page. Point it at
the dedicated page for that specific trigger/condition/action instead, e.g.
/triggers/air_quality.co2_changed. Custom integrations keep their own
documentation URL.
2026-07-02 14:26:57 +03:00
Franck Nijhof 4fd631f229 Refresh the template tool documentation panel (#52941)
The About templates panel still pointed at the upstream Jinja2 docs and a
single extensions page. Rewrite the intro and link to the current templating
documentation instead: the learning guide (introduction, working with states,
debugging) and the searchable template functions reference.
2026-07-02 14:18:07 +03:00
renovate[bot] 18cf41b793 Update dependency @rsdoctor/rspack-plugin to v1.5.17 (#52943)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-07-02 14:14:44 +03:00
renovate[bot] e28788cb95 Update dependency idb-keyval to v6.2.6 (#52944)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-07-02 14:14:24 +03:00
40 changed files with 548 additions and 428 deletions
+1 -1
View File
@@ -67,7 +67,7 @@ DO NOT DELETE ANY TEXT from this template! Otherwise, your issue may be closed w
<!--
If your issue is about how an entity is shown in the UI, please add the state
and attributes for all situations with a screenshot of the UI.
You can find this information at `/config/developer-tools/state`
You can find this information at `/config/tools/state`
-->
```yaml
+2 -2
View File
@@ -94,8 +94,8 @@ body:
label: State of relevant entities
description: >
If your issue is about how an entity is shown in the UI, please add the
state and attributes for all situations. You can find this information
at Developer Tools -> States.
state and attributes for all situations. You can find this
information in the Details view of the More info dialog.
render: txt
- type: textarea
attributes:
+2 -2
View File
@@ -102,7 +102,7 @@
"gulp-zopfli-green": "7.0.0",
"hls.js": "1.6.16",
"home-assistant-js-websocket": "9.6.0",
"idb-keyval": "6.2.5",
"idb-keyval": "6.2.6",
"intl-messageformat": "11.2.9",
"js-yaml": "5.2.0",
"leaflet": "1.9.4",
@@ -147,7 +147,7 @@
"@octokit/plugin-retry": "8.1.0",
"@octokit/rest": "22.0.1",
"@playwright/test": "1.61.1",
"@rsdoctor/rspack-plugin": "1.5.16",
"@rsdoctor/rspack-plugin": "1.5.17",
"@rspack/core": "2.1.1",
"@rspack/dev-server": "2.1.0",
"@types/babel__plugin-transform-runtime": "7.9.5",
+2 -2
View File
@@ -525,10 +525,10 @@ export class HaServiceControl extends LitElement {
this._manifest
? html` <a
href=${
this._manifest.is_built_in
this._manifest.is_built_in && this._value?.action
? documentationUrl(
this.hass,
`/integrations/${this._manifest.domain}`
`/actions/${this._value.action}`
)
: this._manifest.documentation
}
+2 -2
View File
@@ -57,8 +57,8 @@ export const CONFIG_SUB_ROUTES: Record<
translationKey: "ui.components.navigation-picker.route.scripts",
iconPath: mdiScriptText,
},
"developer-tools": {
translationKey: "ui.components.navigation-picker.route.developer_tools",
tools: {
translationKey: "ui.components.navigation-picker.route.tools",
iconPath: mdiHammer,
},
integrations: {
+17 -5
View File
@@ -28,6 +28,21 @@ const useHash = __DEMO__;
const curPath = () =>
useHash ? location.hash.substring(1) : location.pathname;
// Developer tools was renamed to Tools (/config/tools) in 2026.8; it had moved
// from /developer-tools to /config in 2026.2. Redirect both old locations to
// the new one. Applied on the initial route and on every navigation so
// bookmarks and external links to the old URLs resolve too, not just in-app
// navigation.
const redirectLegacyToolsPath = (path: string): string => {
if (path.startsWith("/config/developer-tools")) {
return path.replace("/config/developer-tools", "/config/tools");
}
if (path.startsWith("/developer-tools")) {
return path.replace("/developer-tools", "/config/tools");
}
return path;
};
const panelUrl = (path: string) => {
const dividerPos = path.indexOf("/", 1);
return dividerPos === -1 ? path.substring(1) : path.substring(1, dividerPos);
@@ -50,7 +65,7 @@ export class HomeAssistantAppEl extends QuickBarMixin(HassElement) {
constructor() {
super();
const path = curPath();
const path = redirectLegacyToolsPath(curPath());
this._route = {
prefix: "",
@@ -106,10 +121,7 @@ export class HomeAssistantAppEl extends QuickBarMixin(HassElement) {
// Navigation
const updateRoute = (path = curPath()) => {
// Developer tools panel was moved to config in 2026.2
if (path.startsWith("/developer-tools")) {
path = path.replace("/developer-tools", "/config/developer-tools");
}
path = redirectLegacyToolsPath(path);
if (this._route && path === this._route.path) {
return;
}
@@ -195,7 +195,7 @@ export class HaPlatformCondition extends LitElement {
this._manifest.is_built_in
? documentationUrl(
this.hass,
`/integrations/${this._manifest.domain}`
`/conditions/${this.condition.condition}`
)
: this._manifest.documentation
}
@@ -190,7 +190,7 @@ export class HaPlatformTrigger extends LitElement {
this._manifest.is_built_in
? documentationUrl(
this.hass,
`/integrations/${this._manifest.domain}`
`/triggers/${this.trigger.trigger}`
)
: this._manifest.documentation
}
+5 -5
View File
@@ -211,8 +211,8 @@ export const configSections: Record<string, PageNavigation[]> = {
adminOnly: true,
},
{
path: "/config/developer-tools",
translationKey: "developer_tools",
path: "/config/tools",
translationKey: "tools",
iconPath: mdiHammer,
iconColor: "#7A5AA6",
core: true,
@@ -328,10 +328,10 @@ export const configSections: Record<string, PageNavigation[]> = {
adminOnly: true,
},
],
developer_tools: [
tools: [
{
path: "/config/developer-tools",
translationKey: "ui.panel.config.dashboard.developer_tools.main",
path: "/config/tools",
translationKey: "ui.panel.config.dashboard.tools.main",
iconPath: mdiHammer,
iconColor: "#7A5AA6",
core: true,
+3 -3
View File
@@ -70,9 +70,9 @@ class HaPanelConfig extends HassRouterPage {
tag: "ha-config-system-navigation",
load: () => import("./core/ha-config-system-navigation"),
},
"developer-tools": {
tag: "ha-panel-developer-tools",
load: () => import("./developer-tools/ha-panel-developer-tools"),
tools: {
tag: "ha-panel-tools",
load: () => import("./tools/ha-panel-tools"),
cache: true,
},
logs: {
@@ -18,7 +18,7 @@ import {
import { showConfigFlowDialog } from "../../../dialogs/config-flow/show-dialog-config-flow";
import type { HomeAssistant } from "../../../types";
import { brandsUrl } from "../../../util/brands-url";
import { fixStatisticsIssue } from "../developer-tools/statistics/fix-statistics";
import { fixStatisticsIssue } from "../tools/statistics/fix-statistics";
import { showVacuumSegmentMappingDialog } from "../entities/dialogs/show-dialog-vacuum-segment-mapping";
import { showRepairsFlowDialog } from "./show-dialog-repair-flow";
import { showRepairsIssueDialog } from "./show-repair-issue-dialog";
@@ -171,7 +171,7 @@ class HaConfigRepairs extends LitElement {
issue.translation_key &&
STATISTIC_TYPES.includes(issue.translation_key as any)
) {
this.hass.loadFragmentTranslation("developer-tools");
this.hass.loadFragmentTranslation("config");
const data = await fetchRepairsIssueData(
this.hass.connection,
issue.domain,
@@ -48,7 +48,7 @@ import { resolveMediaSource } from "../../../../data/media_source";
import { MatchMinHeightMixin } from "../../../../mixins/match-min-height-mixin";
import { withViewTransition } from "../../../../common/util/view-transition";
@customElement("developer-tools-action")
@customElement("tools-action")
class HaPanelDevAction extends MatchMinHeightMixin(LitElement) {
@property({ attribute: false }) public hass!: HomeAssistant;
@@ -130,14 +130,12 @@ class HaPanelDevAction extends MatchMinHeightMixin(LitElement) {
const modeButtons: ToggleButton[] = [
{
label: this.hass.localize(
"ui.panel.config.developer-tools.tabs.actions.ui_mode"
),
label: this.hass.localize("ui.panel.config.tools.tabs.actions.ui_mode"),
value: "ui",
},
{
label: this.hass.localize(
"ui.panel.config.developer-tools.tabs.actions.yaml_mode"
"ui.panel.config.tools.tabs.actions.yaml_mode"
),
value: "yaml",
},
@@ -163,7 +161,7 @@ class HaPanelDevAction extends MatchMinHeightMixin(LitElement) {
<div class="header-row">
<div class="header-title">
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.actions.title"
"ui.panel.config.tools.tabs.actions.title"
)}
</div>
<ha-button-toggle-group
@@ -177,7 +175,7 @@ class HaPanelDevAction extends MatchMinHeightMixin(LitElement) {
</div>
<p class="secondary">
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.actions.description"
"ui.panel.config.tools.tabs.actions.description"
)}
</p>
</div>
@@ -220,14 +218,14 @@ class HaPanelDevAction extends MatchMinHeightMixin(LitElement) {
!this._uiAvailable
? html`<span class="error"
>${this.hass.localize(
"ui.panel.config.developer-tools.tabs.actions.no_template_ui_support"
"ui.panel.config.tools.tabs.actions.no_template_ui_support"
)}</span
>`
: nothing
}
<ha-progress-button raised @click=${this._callService}>
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.actions.call_service"
"ui.panel.config.tools.tabs.actions.call_service"
)}
</ha-progress-button>
</div>
@@ -238,7 +236,7 @@ class HaPanelDevAction extends MatchMinHeightMixin(LitElement) {
? html`<div class="content response">
<ha-card
.header=${this.hass.localize(
"ui.panel.config.developer-tools.tabs.actions.response"
"ui.panel.config.tools.tabs.actions.response"
)}
>
<div class="card-content">
@@ -253,7 +251,7 @@ class HaPanelDevAction extends MatchMinHeightMixin(LitElement) {
slot="extra-actions"
@click=${this._copyTemplate}
>${this.hass.localize(
"ui.panel.config.developer-tools.tabs.actions.copy_clipboard_template"
"ui.panel.config.tools.tabs.actions.copy_clipboard_template"
)}</ha-button
>
</ha-yaml-editor>
@@ -270,10 +268,10 @@ class HaPanelDevAction extends MatchMinHeightMixin(LitElement) {
.header=${
this._yamlMode
? this.hass.localize(
"ui.panel.config.developer-tools.tabs.actions.all_parameters"
"ui.panel.config.tools.tabs.actions.all_parameters"
)
: this.hass.localize(
"ui.panel.config.developer-tools.tabs.actions.yaml_parameters"
"ui.panel.config.tools.tabs.actions.yaml_parameters"
)
}
outlined
@@ -287,7 +285,7 @@ class HaPanelDevAction extends MatchMinHeightMixin(LitElement) {
target
? html`
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.actions.accepts_target"
"ui.panel.config.tools.tabs.actions.accepts_target"
)}
`
: ""
@@ -322,17 +320,17 @@ class HaPanelDevAction extends MatchMinHeightMixin(LitElement) {
<tr>
<th>
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.actions.column_parameter"
"ui.panel.config.tools.tabs.actions.column_parameter"
)}
</th>
<th>
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.actions.column_description"
"ui.panel.config.tools.tabs.actions.column_description"
)}
</th>
<th>
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.actions.column_example"
"ui.panel.config.tools.tabs.actions.column_example"
)}
</th>
</tr>
@@ -371,7 +369,7 @@ class HaPanelDevAction extends MatchMinHeightMixin(LitElement) {
appearance="plain"
@click=${this._fillExampleData}
>${this.hass.localize(
"ui.panel.config.developer-tools.tabs.actions.fill_example_data"
"ui.panel.config.tools.tabs.actions.fill_example_data"
)}</ha-button
>`
: ""
@@ -406,14 +404,14 @@ class HaPanelDevAction extends MatchMinHeightMixin(LitElement) {
const errorCategory = yamlMode ? "yaml" : "ui";
if (!serviceData?.action) {
return localize(
`ui.panel.config.developer-tools.tabs.actions.errors.${errorCategory}.no_action`
`ui.panel.config.tools.tabs.actions.errors.${errorCategory}.no_action`
);
}
const domain = computeDomain(serviceData.action);
const service = computeObjectId(serviceData.action);
if (!domain || !service) {
return localize(
`ui.panel.config.developer-tools.tabs.actions.errors.${errorCategory}.invalid_action`
`ui.panel.config.tools.tabs.actions.errors.${errorCategory}.invalid_action`
);
}
const dataIsTemplate =
@@ -427,7 +425,7 @@ class HaPanelDevAction extends MatchMinHeightMixin(LitElement) {
!serviceData.data?.area_id
) {
return localize(
`ui.panel.config.developer-tools.tabs.actions.errors.${errorCategory}.no_target`
`ui.panel.config.tools.tabs.actions.errors.${errorCategory}.no_target`
);
}
for (const field of fields) {
@@ -437,7 +435,7 @@ class HaPanelDevAction extends MatchMinHeightMixin(LitElement) {
(!serviceData.data || serviceData.data[field.key] === undefined)
) {
return localize(
`ui.panel.config.developer-tools.tabs.actions.errors.${errorCategory}.missing_required_field`,
`ui.panel.config.tools.tabs.actions.errors.${errorCategory}.missing_required_field`,
{ key: field.key }
);
}
@@ -496,7 +494,7 @@ class HaPanelDevAction extends MatchMinHeightMixin(LitElement) {
forwardHaptic(this, "failure");
button.actionError();
this._error = this.hass.localize(
"ui.panel.config.developer-tools.tabs.actions.errors.yaml.invalid_yaml"
"ui.panel.config.tools.tabs.actions.errors.yaml.invalid_yaml"
);
return;
}
@@ -569,7 +567,7 @@ class HaPanelDevAction extends MatchMinHeightMixin(LitElement) {
rel="noreferrer"
><ha-button>
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.actions.open_media"
"ui.panel.config.tools.tabs.actions.open_media"
)}
</ha-button></a
>
@@ -829,6 +827,6 @@ class HaPanelDevAction extends MatchMinHeightMixin(LitElement) {
declare global {
interface HTMLElementTagNameMap {
"developer-tools-action": HaPanelDevAction;
"tools-action": HaPanelDevAction;
}
}
@@ -25,7 +25,7 @@ interface SentenceParsingResult {
result: AssistDebugResult | null;
}
@customElement("developer-tools-assist")
@customElement("tools-assist")
class HaPanelDevAssist extends SubscribeMixin(LitElement) {
@property({ attribute: false }) public hass!: HomeAssistant;
@@ -118,14 +118,14 @@ class HaPanelDevAssist extends SubscribeMixin(LitElement) {
<div class="content">
<ha-card
.header=${this.hass.localize(
"ui.panel.config.developer-tools.tabs.assist.title"
"ui.panel.config.tools.tabs.assist.title"
)}
class="form"
>
<div class="card-content">
<p class="description">
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.assist.description"
"ui.panel.config.tools.tabs.assist.description"
)}
</p>
${
@@ -143,7 +143,7 @@ class HaPanelDevAssist extends SubscribeMixin(LitElement) {
<ha-textarea
resize="auto"
.label=${this.hass.localize(
"ui.panel.config.developer-tools.tabs.assist.sentences"
"ui.panel.config.tools.tabs.assist.sentences"
)}
id="sentences-input"
@input=${this._textAreaInput}
@@ -157,7 +157,7 @@ class HaPanelDevAssist extends SubscribeMixin(LitElement) {
.disabled=${!this._language || !this._validInput}
>
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.assist.parse_sentences"
"ui.panel.config.tools.tabs.assist.parse_sentences"
)}
</ha-button>
</div>
@@ -184,7 +184,7 @@ class HaPanelDevAssist extends SubscribeMixin(LitElement) {
.path=${mdiDownload}
></ha-svg-icon>
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.assist.download_results"
"ui.panel.config.tools.tabs.assist.download_results"
)}
</ha-button>
</div>
@@ -204,7 +204,7 @@ class HaPanelDevAssist extends SubscribeMixin(LitElement) {
</div>
<div class="info">
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.assist.language"
"ui.panel.config.tools.tabs.assist.language"
)}:
${formatLanguageCode(language, this.hass.locale)}
(${language})
@@ -221,7 +221,7 @@ class HaPanelDevAssist extends SubscribeMixin(LitElement) {
`
: html`<ha-alert alert-type="error">
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.assist.no_match"
"ui.panel.config.tools.tabs.assist.no_match"
)}
</ha-alert>`
}
@@ -304,6 +304,6 @@ class HaPanelDevAssist extends SubscribeMixin(LitElement) {
declare global {
interface HTMLElementTagNameMap {
"developer-tools-assist": HaPanelDevAssist;
"tools-assist": HaPanelDevAssist;
}
}
@@ -17,12 +17,12 @@ class HaDebugConnectionRow extends LitElement {
<ha-list-item-base>
<span slot="headline"
>${this.hass.localize(
"ui.panel.config.developer-tools.tabs.debug.debug_connection.title"
"ui.panel.config.tools.tabs.debug.debug_connection.title"
)}</span
>
<span slot="supporting-text"
>${this.hass.localize(
"ui.panel.config.developer-tools.tabs.debug.debug_connection.description"
"ui.panel.config.tools.tabs.debug.debug_connection.description"
)}</span
>
<ha-switch
@@ -20,12 +20,12 @@ class HaDebugDisableViewTransitionRow extends LitElement {
<ha-list-item-base>
<span slot="headline"
>${this.hass.localize(
"ui.panel.config.developer-tools.tabs.debug.disable_view_transition.title"
"ui.panel.config.tools.tabs.debug.disable_view_transition.title"
)}</span
>
<span slot="supporting-text"
>${this.hass.localize(
"ui.panel.config.developer-tools.tabs.debug.disable_view_transition.description"
"ui.panel.config.tools.tabs.debug.disable_view_transition.description"
)}</span
>
<ha-switch
@@ -230,13 +230,13 @@ export class HaDebugViewportEnvironmentCard extends LitElement {
return html`
<ha-card
.header=${this.hass.localize(
"ui.panel.config.developer-tools.tabs.debug.viewport_environment.title"
"ui.panel.config.tools.tabs.debug.viewport_environment.title"
)}
>
<div class="card-content">
<p class="explanation">
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.debug.viewport_environment.description"
"ui.panel.config.tools.tabs.debug.viewport_environment.description"
)}
</p>
<ha-code-editor
@@ -20,7 +20,7 @@ import "./ha-debug-connection-row";
import "./ha-debug-disable-view-transition-row";
import "./ha-debug-viewport-environment-card";
@customElement("developer-tools-debug")
@customElement("tools-debug")
class HaPanelDevDebug extends SubscribeMixin(LitElement) {
@property({ attribute: false }) public hass!: HomeAssistant;
@@ -31,7 +31,7 @@ class HaPanelDevDebug extends SubscribeMixin(LitElement) {
<div class="content">
<ha-card
.header=${this.hass.localize(
"ui.panel.config.developer-tools.tabs.debug.title"
"ui.panel.config.tools.tabs.debug.title"
)}
>
<ha-list-base>
@@ -45,13 +45,13 @@ class HaPanelDevDebug extends SubscribeMixin(LitElement) {
</ha-card>
<ha-card
.header=${this.hass.localize(
"ui.panel.config.developer-tools.tabs.debug.entity_diagnostic.title"
"ui.panel.config.tools.tabs.debug.entity_diagnostic.title"
)}
>
<div class="card-content">
<ha-entity-picker
.helper=${this.hass.localize(
"ui.panel.config.developer-tools.tabs.debug.entity_diagnostic.description"
"ui.panel.config.tools.tabs.debug.entity_diagnostic.description"
)}
@value-changed=${this._entityPicked}
></ha-entity-picker>
@@ -62,7 +62,7 @@ class HaPanelDevDebug extends SubscribeMixin(LitElement) {
appearance="filled"
.disabled=${!this._entityId}
>${this.hass.localize(
"ui.panel.config.developer-tools.tabs.debug.entity_diagnostic.copy_to_clipboard"
"ui.panel.config.tools.tabs.debug.entity_diagnostic.copy_to_clipboard"
)}</ha-button
>
</div>
@@ -136,6 +136,6 @@ class HaPanelDevDebug extends SubscribeMixin(LitElement) {
declare global {
interface HTMLElementTagNameMap {
"developer-tools-debug": HaPanelDevDebug;
"tools-debug": HaPanelDevDebug;
}
}
@@ -76,7 +76,7 @@ class EventSubscribeCard extends LitElement {
return html`
<ha-card
header=${this.hass!.localize(
"ui.panel.config.developer-tools.tabs.events.listen_to_events"
"ui.panel.config.tools.tabs.events.listen_to_events"
)}
>
<div class="card-content">
@@ -84,10 +84,10 @@ class EventSubscribeCard extends LitElement {
.label=${
this._subscribed
? this.hass!.localize(
"ui.panel.config.developer-tools.tabs.events.listening_to"
"ui.panel.config.tools.tabs.events.listening_to"
)
: this.hass!.localize(
"ui.panel.config.developer-tools.tabs.events.subscribe_to"
"ui.panel.config.tools.tabs.events.subscribe_to"
)
}
.disabled=${this._subscribed !== undefined}
@@ -96,11 +96,11 @@ class EventSubscribeCard extends LitElement {
></ha-input>
<ha-input
.label=${this.hass!.localize(
"ui.panel.config.developer-tools.tabs.events.filter_events"
"ui.panel.config.tools.tabs.events.filter_events"
)}
.value=${this._eventFilter}
.disabled=${this._subscribed !== undefined}
.hint=${`${this.hass!.localize("ui.panel.config.developer-tools.tabs.events.filter_helper")}${this._ignoredEventsCount ? ` ${this.hass!.localize("ui.panel.config.developer-tools.tabs.events.filter_ignored", { count: this._ignoredEventsCount })}` : ""}`}
.hint=${`${this.hass!.localize("ui.panel.config.tools.tabs.events.filter_helper")}${this._ignoredEventsCount ? ` ${this.hass!.localize("ui.panel.config.tools.tabs.events.filter_ignored", { count: this._ignoredEventsCount })}` : ""}`}
@input=${this._filterChanged}
></ha-input>
${
@@ -118,10 +118,10 @@ class EventSubscribeCard extends LitElement {
${
this._subscribed
? this.hass!.localize(
"ui.panel.config.developer-tools.tabs.events.stop_listening"
"ui.panel.config.tools.tabs.events.stop_listening"
)
: this.hass!.localize(
"ui.panel.config.developer-tools.tabs.events.start_listening"
"ui.panel.config.tools.tabs.events.start_listening"
)
}
</ha-button>
@@ -131,7 +131,7 @@ class EventSubscribeCard extends LitElement {
@click=${this._clearEvents}
>
${this.hass!.localize(
"ui.panel.config.developer-tools.tabs.events.clear_events"
"ui.panel.config.tools.tabs.events.clear_events"
)}
</ha-button>
</div>
@@ -144,10 +144,10 @@ class EventSubscribeCard extends LitElement {
if (!this._events.length) {
const message = this._subscribed
? this.hass!.localize(
"ui.panel.config.developer-tools.tabs.events.waiting_for_events"
"ui.panel.config.tools.tabs.events.waiting_for_events"
)
: this.hass!.localize(
"ui.panel.config.developer-tools.tabs.events.subscribe_prompt"
"ui.panel.config.tools.tabs.events.subscribe_prompt"
);
return html`
<ha-card class="events-card">
@@ -172,7 +172,7 @@ class EventSubscribeCard extends LitElement {
.path=${mdiChevronDoubleLeft}
.disabled=${index >= bufferTotal - 1}
.label=${this.hass!.localize(
"ui.panel.config.developer-tools.tabs.events.oldest_event"
"ui.panel.config.tools.tabs.events.oldest_event"
)}
@click=${this._showOldest}
></ha-icon-button>
@@ -180,13 +180,13 @@ class EventSubscribeCard extends LitElement {
.path=${mdiChevronLeft}
.disabled=${index >= bufferTotal - 1}
.label=${this.hass!.localize(
"ui.panel.config.developer-tools.tabs.events.older_event"
"ui.panel.config.tools.tabs.events.older_event"
)}
@click=${this._showOlder}
></ha-icon-button>
<div class="event-info">
${this.hass!.localize(
"ui.panel.config.developer-tools.tabs.events.event_fired",
"ui.panel.config.tools.tabs.events.event_fired",
{
name: position,
time: formatTimeWithSeconds(
@@ -208,7 +208,7 @@ class EventSubscribeCard extends LitElement {
<ha-tooltip for="buffer-info" placement="bottom">
<span class="buffer-tooltip">
${this.hass!.localize(
"ui.panel.config.developer-tools.tabs.events.buffer_disclaimer",
"ui.panel.config.tools.tabs.events.buffer_disclaimer",
{ count: MAX_BUFFERED_EVENTS }
)}
</span>
@@ -221,7 +221,7 @@ class EventSubscribeCard extends LitElement {
.path=${mdiChevronRight}
.disabled=${atNewest}
.label=${this.hass!.localize(
"ui.panel.config.developer-tools.tabs.events.newer_event"
"ui.panel.config.tools.tabs.events.newer_event"
)}
@click=${this._showNewer}
></ha-icon-button>
@@ -229,7 +229,7 @@ class EventSubscribeCard extends LitElement {
.path=${mdiChevronDoubleRight}
.disabled=${atNewest}
.label=${this.hass!.localize(
"ui.panel.config.developer-tools.tabs.events.newest_event"
"ui.panel.config.tools.tabs.events.newest_event"
)}
@click=${this._showNewest}
></ha-icon-button>
@@ -362,13 +362,13 @@ class EventSubscribeCard extends LitElement {
}, this._eventType);
} catch (error) {
this._error = this.hass!.localize(
"ui.panel.config.developer-tools.tabs.events.subscribe_failed",
"ui.panel.config.tools.tabs.events.subscribe_failed",
{
error:
error instanceof Error
? error.message
: this.hass!.localize(
"ui.panel.config.developer-tools.tabs.events.unknown_error"
"ui.panel.config.tools.tabs.events.unknown_error"
),
}
);
@@ -27,7 +27,7 @@ class EventsList extends LitElement {
>
<span>
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.events.count_listeners",
"ui.panel.config.tools.tabs.events.count_listeners",
{
count: event.listener_count,
}
@@ -14,7 +14,7 @@ import { documentationUrl } from "../../../../util/documentation-url";
import "./event-subscribe-card";
import "./events-list";
@customElement("developer-tools-event")
@customElement("tools-event")
class HaPanelDevEvent extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@@ -40,7 +40,7 @@ class HaPanelDevEvent extends LitElement {
<div class="card-content">
<p>
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.events.description"
"ui.panel.config.tools.tabs.events.description"
)}
<a
href=${documentationUrl(
@@ -51,14 +51,14 @@ class HaPanelDevEvent extends LitElement {
rel="noreferrer"
>
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.events.documentation"
"ui.panel.config.tools.tabs.events.documentation"
)}
</a>
</p>
<div class="inputs">
<ha-input
.label=${this.hass.localize(
"ui.panel.config.developer-tools.tabs.events.type"
"ui.panel.config.tools.tabs.events.type"
)}
autofocus
required
@@ -67,7 +67,7 @@ class HaPanelDevEvent extends LitElement {
></ha-input>
<p>
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.events.data"
"ui.panel.config.tools.tabs.events.data"
)}
</p>
</div>
@@ -85,7 +85,7 @@ class HaPanelDevEvent extends LitElement {
appearance="filled"
.disabled=${!this._isValid}
>${this.hass.localize(
"ui.panel.config.developer-tools.tabs.events.fire_event"
"ui.panel.config.tools.tabs.events.fire_event"
)}</ha-button
>
</div>
@@ -101,7 +101,7 @@ class HaPanelDevEvent extends LitElement {
<div>
<h2>
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.events.active_listeners"
"ui.panel.config.tools.tabs.events.active_listeners"
)}
</h2>
<events-list
@@ -131,7 +131,7 @@ class HaPanelDevEvent extends LitElement {
if (!this._eventType) {
showAlertDialog(this, {
text: this.hass.localize(
"ui.panel.config.developer-tools.tabs.events.alert_event_type"
"ui.panel.config.tools.tabs.events.alert_event_type"
),
});
return;
@@ -143,7 +143,7 @@ class HaPanelDevEvent extends LitElement {
);
fireEvent(this, "hass-notification", {
message: this.hass.localize(
"ui.panel.config.developer-tools.tabs.events.notification_event_fired",
"ui.panel.config.tools.tabs.events.notification_event_fired",
{ type: this._eventType }
),
});
@@ -221,6 +221,6 @@ class HaPanelDevEvent extends LitElement {
declare global {
interface HTMLElementTagNameMap {
"developer-tools-event": HaPanelDevEvent;
"tools-event": HaPanelDevEvent;
}
}
@@ -12,42 +12,42 @@ import "../../../components/ha-tab-group";
import "../../../components/ha-tab-group-tab";
import "../../../components/ha-top-app-bar-fixed";
import type { HomeAssistant, Route } from "../../../types";
import "./developer-tools-router";
import "./tools-router";
import type { HaDropdownSelectEvent } from "../../../components/ha-dropdown";
const DEVELOPER_TOOLS_TABS = [
const TOOLS_TABS = [
{
panel: "yaml",
translationKey: "ui.panel.config.developer-tools.tabs.yaml.title",
translationKey: "ui.panel.config.tools.tabs.yaml.title",
},
{
panel: "state",
translationKey: "ui.panel.config.developer-tools.tabs.states.title",
translationKey: "ui.panel.config.tools.tabs.states.title",
},
{
panel: "action",
translationKey: "ui.panel.config.developer-tools.tabs.actions.title",
translationKey: "ui.panel.config.tools.tabs.actions.title",
},
{
panel: "template",
translationKey: "ui.panel.config.developer-tools.tabs.templates.title",
translationKey: "ui.panel.config.tools.tabs.templates.title",
},
{
panel: "event",
translationKey: "ui.panel.config.developer-tools.tabs.events.title",
translationKey: "ui.panel.config.tools.tabs.events.title",
},
{
panel: "statistics",
translationKey: "ui.panel.config.developer-tools.tabs.statistics.title",
translationKey: "ui.panel.config.tools.tabs.statistics.title",
},
{
panel: "assist",
translationKey: "ui.panel.config.developer-tools.tabs.assist.tab",
translationKey: "ui.panel.config.tools.tabs.assist.tab",
},
] as const;
@customElement("ha-panel-developer-tools")
class PanelDeveloperTools extends LitElement {
@customElement("ha-panel-tools")
class PanelTools extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@property({ attribute: false }) public route!: Route;
@@ -68,9 +68,7 @@ class PanelDeveloperTools extends LitElement {
@click=${this._handleBack}
></ha-icon-button-arrow-prev>
<div slot="title">
${this.hass.localize(
"ui.panel.config.dashboard.developer_tools.main"
)}
${this.hass.localize("ui.panel.config.dashboard.tools.main")}
</div>
<ha-dropdown slot="actionItems" @wa-select=${this._handleMenuAction}>
<ha-icon-button
@@ -79,13 +77,11 @@ class PanelDeveloperTools extends LitElement {
.path=${mdiDotsVertical}
></ha-icon-button>
<ha-dropdown-item value="debug">
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.debug.title"
)}
${this.hass.localize("ui.panel.config.tools.tabs.debug.title")}
</ha-dropdown-item>
</ha-dropdown>
<ha-tab-group @wa-tab-show=${this._handlePageSelected} slot="subRow">
${DEVELOPER_TOOLS_TABS.map(
${TOOLS_TABS.map(
(tab) => html`
<ha-tab-group-tab
slot="nav"
@@ -93,7 +89,7 @@ class PanelDeveloperTools extends LitElement {
.active=${page === tab.panel}
>
<a
href="/config/developer-tools/${tab.panel}"
href="/config/tools/${tab.panel}"
@click=${this._handleTabAnchorClick}
>${this.hass.localize(tab.translationKey)}</a
>
@@ -101,11 +97,11 @@ class PanelDeveloperTools extends LitElement {
`
)}
</ha-tab-group>
<developer-tools-router
<tools-router
.route=${this.route}
.narrow=${this.narrow}
.hass=${this.hass}
></developer-tools-router>
></tools-router>
</ha-top-app-bar-fixed>
`;
}
@@ -124,7 +120,7 @@ class PanelDeveloperTools extends LitElement {
return;
}
if (newPage !== this._page) {
navigate(`/config/developer-tools/${newPage}`);
navigate(`/config/tools/${newPage}`);
} else {
scrollTo({ behavior: "smooth", top: 0 });
}
@@ -133,7 +129,7 @@ class PanelDeveloperTools extends LitElement {
private async _handleMenuAction(ev: HaDropdownSelectEvent) {
const action = ev.detail.item.value;
if (action === "debug") {
navigate(`/config/developer-tools/debug`);
navigate(`/config/tools/debug`);
}
}
@@ -146,7 +142,7 @@ class PanelDeveloperTools extends LitElement {
}
static readonly styles: CSSResultGroup = css`
developer-tools-router {
tools-router {
display: block;
height: 100%;
}
@@ -170,6 +166,6 @@ class PanelDeveloperTools extends LitElement {
declare global {
interface HTMLElementTagNameMap {
"ha-panel-developer-tools": PanelDeveloperTools;
"ha-panel-tools": PanelTools;
}
}
@@ -24,7 +24,7 @@ import { haStyle } from "../../../../resources/styles";
import { loadVirtualizer } from "../../../../resources/virtualizer";
import { showToast } from "../../../../util/toast";
@customElement("developer-tools-state-renderer")
@customElement("tools-state-renderer")
class HaPanelDevStateRenderer extends LitElement {
@property({ attribute: false }) public entities: HassEntity[] = [];
@@ -79,16 +79,12 @@ class HaPanelDevStateRenderer extends LitElement {
<div class="row" role="row" aria-rowindex="1">
<div class="header" role="columnheader">
<span class="padded">
${this._i18n.localize(
"ui.panel.config.developer-tools.tabs.states.entity"
)}
${this._i18n.localize("ui.panel.config.tools.tabs.states.entity")}
</span>
</div>
<div class="header" role="columnheader">
<span class="padded">
${this._i18n.localize(
"ui.panel.config.developer-tools.tabs.states.state"
)}
${this._i18n.localize("ui.panel.config.tools.tabs.states.state")}
</span>
</div>
<div class="header" role="columnheader" ?hidden=${!showDevice}>
@@ -106,7 +102,7 @@ class HaPanelDevStateRenderer extends LitElement {
<div class="header" role="columnheader">
<span class="padded">
${this._i18n.localize(
"ui.panel.config.developer-tools.tabs.states.attributes"
"ui.panel.config.tools.tabs.states.attributes"
)}
</span>
</div>
@@ -134,7 +130,7 @@ class HaPanelDevStateRenderer extends LitElement {
<div class="cell" role="cell" aria-colspan="5">
<span class="padded">
${this._i18n.localize(
"ui.panel.config.developer-tools.tabs.states.no_entities"
"ui.panel.config.tools.tabs.states.no_entities"
)}
</span>
</div>
@@ -195,10 +191,10 @@ class HaPanelDevStateRenderer extends LitElement {
@click=${this._copyEntity}
.entity=${item}
alt=${this._i18n.localize(
"ui.panel.config.developer-tools.tabs.states.copy_id"
"ui.panel.config.tools.tabs.states.copy_id"
)}
title=${this._i18n.localize(
"ui.panel.config.developer-tools.tabs.states.copy_id"
"ui.panel.config.tools.tabs.states.copy_id"
)}
.path=${mdiClipboardTextMultipleOutline}
></ha-svg-icon>
@@ -211,10 +207,10 @@ class HaPanelDevStateRenderer extends LitElement {
@click=${this._entityMoreInfo}
.entity=${item}
alt=${this._i18n.localize(
"ui.panel.config.developer-tools.tabs.states.more_info"
"ui.panel.config.tools.tabs.states.more_info"
)}
title=${this._i18n.localize(
"ui.panel.config.developer-tools.tabs.states.more_info"
"ui.panel.config.tools.tabs.states.more_info"
)}
.path=${mdiInformationOutline}
></ha-svg-icon>
@@ -438,7 +434,7 @@ class HaPanelDevStateRenderer extends LitElement {
declare global {
interface HTMLElementTagNameMap {
"developer-tools-state-renderer": HaPanelDevStateRenderer;
"tools-state-renderer": HaPanelDevStateRenderer;
}
interface HASSDomEvents {
@@ -42,7 +42,7 @@ import { showAlertDialog } from "../../../../dialogs/generic/show-dialog-box";
import { haStyle } from "../../../../resources/styles";
import type { HomeAssistant, HomeAssistantRegistries } from "../../../../types";
import { showToast } from "../../../../util/toast";
import "./developer-tools-state-renderer";
import "./tools-state-renderer";
// Use virtualizer after threshold to avoid performance issues
// NOTE: If virtualizer is used when filtered entiity state
@@ -51,7 +51,7 @@ import "./developer-tools-state-renderer";
// virtualized list, an undesirable effect.
const VIRTUALIZE_THRESHOLD = 100;
@customElement("developer-tools-state")
@customElement("tools-state")
class HaPanelDevState extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@@ -165,7 +165,7 @@ class HaPanelDevState extends LitElement {
<div class="heading">
<h1>
${this._i18n.localize(
"ui.panel.config.developer-tools.tabs.states.current_entities"
"ui.panel.config.tools.tabs.states.current_entities"
)}
</h1>
${
@@ -192,7 +192,7 @@ class HaPanelDevState extends LitElement {
@change=${this._saveAttributeCheckboxState}
>
${this._i18n.localize(
"ui.panel.config.developer-tools.tabs.states.attributes"
"ui.panel.config.tools.tabs.states.attributes"
)}
</ha-checkbox>
`
@@ -201,7 +201,7 @@ class HaPanelDevState extends LitElement {
</div>
<ha-expansion-panel
.header=${this._i18n.localize(
"ui.panel.config.developer-tools.tabs.states.set_state"
"ui.panel.config.tools.tabs.states.set_state"
)}
outlined
.expanded=${this._expanded}
@@ -209,10 +209,10 @@ class HaPanelDevState extends LitElement {
>
<p>
${this._i18n.localize(
"ui.panel.config.developer-tools.tabs.states.description1"
"ui.panel.config.tools.tabs.states.description1"
)}<br />
${this._i18n.localize(
"ui.panel.config.developer-tools.tabs.states.description2"
"ui.panel.config.tools.tabs.states.description2"
)}
</p>
${
@@ -237,7 +237,7 @@ class HaPanelDevState extends LitElement {
.path=${mdiContentCopy}
@click=${this._copyStateEntity}
title=${this._i18n.localize(
"ui.panel.config.developer-tools.tabs.states.copy_id"
"ui.panel.config.tools.tabs.states.copy_id"
)}
></ha-icon-button>
</div>
@@ -246,7 +246,7 @@ class HaPanelDevState extends LitElement {
}
<ha-input
.label=${this._i18n.localize(
"ui.panel.config.developer-tools.tabs.states.state"
"ui.panel.config.tools.tabs.states.state"
)}
required
autocapitalize="none"
@@ -259,7 +259,7 @@ class HaPanelDevState extends LitElement {
></ha-input>
<p>
${this._i18n.localize(
"ui.panel.config.developer-tools.tabs.states.state_attributes"
"ui.panel.config.tools.tabs.states.state_attributes"
)}
</p>
<ha-yaml-editor
@@ -274,7 +274,7 @@ class HaPanelDevState extends LitElement {
.disabled=${!this._validJSON}
raised
>${this._i18n.localize(
"ui.panel.config.developer-tools.tabs.states.set_state"
"ui.panel.config.tools.tabs.states.set_state"
)}</ha-button
>
<ha-icon-button
@@ -290,7 +290,7 @@ class HaPanelDevState extends LitElement {
? html`<p>
<b
>${this._i18n.localize(
"ui.panel.config.developer-tools.tabs.states.last_changed"
"ui.panel.config.tools.tabs.states.last_changed"
)}:</b
><br />
<a href=${this._historyFromLastChanged(this._entity)}
@@ -300,7 +300,7 @@ class HaPanelDevState extends LitElement {
<p>
<b
>${this._i18n.localize(
"ui.panel.config.developer-tools.tabs.states.last_updated"
"ui.panel.config.tools.tabs.states.last_updated"
)}:</b
><br />
<a href=${this._historyFromLastUpdated(this._entity)}
@@ -312,7 +312,7 @@ class HaPanelDevState extends LitElement {
</div>
</div>
</ha-expansion-panel>
<developer-tools-state-renderer
<tools-state-renderer
.narrow=${this.narrow}
.entities=${entities}
.virtualize=${entities.length > VIRTUALIZE_THRESHOLD}
@@ -324,7 +324,7 @@ class HaPanelDevState extends LitElement {
<ha-input-search
slot="filter-entities"
.label=${this._i18n.localize(
"ui.panel.config.developer-tools.tabs.states.filter_entities"
"ui.panel.config.tools.tabs.states.filter_entities"
)}
.value=${this._entityFilter}
@input=${this._entityFilterChanged}
@@ -332,7 +332,7 @@ class HaPanelDevState extends LitElement {
<ha-input-search
slot="filter-states"
.label=${this._i18n.localize(
"ui.panel.config.developer-tools.tabs.states.filter_states"
"ui.panel.config.tools.tabs.states.filter_states"
)}
type="search"
.value=${this._stateFilter}
@@ -357,13 +357,13 @@ class HaPanelDevState extends LitElement {
<ha-input-search
slot="filter-attributes"
.label=${this._i18n.localize(
"ui.panel.config.developer-tools.tabs.states.filter_attributes"
"ui.panel.config.tools.tabs.states.filter_attributes"
)}
type="search"
.value=${this._attributeFilter}
@input=${this._attributeFilterChanged}
></ha-input-search>
</developer-tools-state-renderer>
</tools-state-renderer>
`;
}
@@ -469,7 +469,7 @@ class HaPanelDevState extends LitElement {
if (!this._entityId) {
showAlertDialog(this, {
text: this._i18n.localize(
"ui.panel.config.developer-tools.tabs.states.alert_entity_field"
"ui.panel.config.tools.tabs.states.alert_entity_field"
),
});
return;
@@ -758,6 +758,6 @@ class HaPanelDevState extends LitElement {
declare global {
interface HTMLElementTagNameMap {
"developer-tools-state": HaPanelDevState;
"tools-state": HaPanelDevState;
}
}
@@ -132,7 +132,7 @@ export class DialogStatisticsFixUnsupportedUnitMetadata extends DirtyStateProvid
@click=${this._fetchOutliers}
>
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.adjust_sum.outliers"
"ui.panel.config.tools.tabs.statistics.fix_issue.adjust_sum.outliers"
)}
</ha-button>
<ha-button slot="primaryAction" data-dialog="close">
@@ -156,7 +156,7 @@ export class DialogStatisticsFixUnsupportedUnitMetadata extends DirtyStateProvid
@click=${this._fixIssue}
>
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.adjust_sum.adjust"
"ui.panel.config.tools.tabs.statistics.fix_issue.adjust_sum.adjust"
)}</ha-button
>
`;
@@ -166,7 +166,7 @@ export class DialogStatisticsFixUnsupportedUnitMetadata extends DirtyStateProvid
<ha-dialog
.open=${this._open}
header-title=${this.hass.localize(
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.adjust_sum.title"
"ui.panel.config.tools.tabs.statistics.fix_issue.adjust_sum.title"
)}
.preventScrimClose=${this.isDirtyState}
@closed=${this._dialogClosed}
@@ -194,7 +194,7 @@ export class DialogStatisticsFixUnsupportedUnitMetadata extends DirtyStateProvid
} else if (this._statsHour.length < 1 && this._stats5min.length < 1) {
stats = html`<p>
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.adjust_sum.no_statistics_found"
"ui.panel.config.tools.tabs.statistics.fix_issue.adjust_sum.no_statistics_found"
)}
</p>`;
} else {
@@ -234,20 +234,20 @@ export class DialogStatisticsFixUnsupportedUnitMetadata extends DirtyStateProvid
return html`
<div class="text-content">
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.adjust_sum.info_text_1"
"ui.panel.config.tools.tabs.statistics.fix_issue.adjust_sum.info_text_1"
)}
</div>
<div class="text-content">
<b
>${this.hass.localize(
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.adjust_sum.statistic"
"ui.panel.config.tools.tabs.statistics.fix_issue.adjust_sum.statistic"
)}</b
>
${this._params!.statistic.statistic_id}
</div>
<ha-selector-datetime
.label=${this.hass.localize(
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.adjust_sum.pick_a_time"
"ui.panel.config.tools.tabs.statistics.fix_issue.adjust_sum.pick_a_time"
)}
.hass=${this.hass}
.selector=${this._dateTimeSelector}
@@ -289,7 +289,7 @@ export class DialogStatisticsFixUnsupportedUnitMetadata extends DirtyStateProvid
<div class="text-content">
<b
>${this.hass.localize(
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.adjust_sum.statistic"
"ui.panel.config.tools.tabs.statistics.fix_issue.adjust_sum.statistic"
)}</b
>
${this._params!.statistic.statistic_id}
@@ -298,7 +298,7 @@ export class DialogStatisticsFixUnsupportedUnitMetadata extends DirtyStateProvid
<div class="table-row">
<span
>${this.hass.localize(
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.adjust_sum.start"
"ui.panel.config.tools.tabs.statistics.fix_issue.adjust_sum.start"
)}</span
>
<span
@@ -313,7 +313,7 @@ export class DialogStatisticsFixUnsupportedUnitMetadata extends DirtyStateProvid
<div class="table-row">
<span
>${this.hass.localize(
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.adjust_sum.end"
"ui.panel.config.tools.tabs.statistics.fix_issue.adjust_sum.end"
)}</span
>
<span
@@ -327,7 +327,7 @@ export class DialogStatisticsFixUnsupportedUnitMetadata extends DirtyStateProvid
<ha-selector-number
.label=${this.hass.localize(
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.adjust_sum.new_value"
"ui.panel.config.tools.tabs.statistics.fix_issue.adjust_sum.new_value"
)}
.hass=${this.hass}
.selector=${this._amountSelector(unit || undefined, this._precision)}
@@ -506,7 +506,7 @@ export class DialogStatisticsFixUnsupportedUnitMetadata extends DirtyStateProvid
this._busy = false;
showAlertDialog(this, {
text: this.hass.localize(
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.adjust_sum.error_sum_adjusted",
"ui.panel.config.tools.tabs.statistics.fix_issue.adjust_sum.error_sum_adjusted",
{ message: err.message || err }
),
});
@@ -514,7 +514,7 @@ export class DialogStatisticsFixUnsupportedUnitMetadata extends DirtyStateProvid
}
showToast(this, {
message: this.hass.localize(
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.adjust_sum.sum_adjusted"
"ui.panel.config.tools.tabs.statistics.fix_issue.adjust_sum.sum_adjusted"
),
});
this._markDirtyStateClean();
@@ -53,13 +53,13 @@ export class DialogStatisticsFixUnitsChanged extends LitElement {
<ha-dialog
.open=${this._open}
header-title=${this.hass.localize(
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.units_changed.title"
"ui.panel.config.tools.tabs.statistics.fix_issue.units_changed.title"
)}
@closed=${this._dialogClosed}
>
<p>
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.units_changed.info_text_1",
"ui.panel.config.tools.tabs.statistics.fix_issue.units_changed.info_text_1",
{
name: getStatisticLabel(
this.hass,
@@ -72,16 +72,16 @@ export class DialogStatisticsFixUnitsChanged extends LitElement {
}
)}<br />
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.units_changed.info_text_2"
"ui.panel.config.tools.tabs.statistics.fix_issue.units_changed.info_text_2"
)}<br />
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.units_changed.info_text_3"
"ui.panel.config.tools.tabs.statistics.fix_issue.units_changed.info_text_3"
)}
</p>
<ha-radio-group
.label=${this.hass.localize(
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.units_changed.how_to_fix"
"ui.panel.config.tools.tabs.statistics.fix_issue.units_changed.how_to_fix"
)}
.value=${this._action}
name="action"
@@ -89,13 +89,13 @@ export class DialogStatisticsFixUnitsChanged extends LitElement {
>
<ha-radio-option value="update" autofocus>
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.units_changed.update",
"ui.panel.config.tools.tabs.statistics.fix_issue.units_changed.update",
this._params.issue.data
)}
</ha-radio-option>
<ha-radio-option value="clear">
${this.hass.localize(
`ui.panel.config.developer-tools.tabs.statistics.fix_issue.units_changed.clear`
`ui.panel.config.tools.tabs.statistics.fix_issue.units_changed.clear`
)}
</ha-radio-option>
</ha-radio-group>
@@ -110,7 +110,7 @@ export class DialogStatisticsFixUnitsChanged extends LitElement {
</ha-button>
<ha-button slot="primaryAction" @click=${this._fixIssue}>
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.fix"
"ui.panel.config.tools.tabs.statistics.fix_issue.fix"
)}
</ha-button>
</ha-dialog-footer>
@@ -50,13 +50,13 @@ export class DialogStatisticsFix extends LitElement {
<ha-dialog
.open=${this._open}
header-title=${this.hass.localize(
`ui.panel.config.developer-tools.tabs.statistics.fix_issue.${issue.type}.title`
`ui.panel.config.tools.tabs.statistics.fix_issue.${issue.type}.title`
)}
@closed=${this._dialogClosed}
>
<p>
${this.hass.localize(
`ui.panel.config.developer-tools.tabs.statistics.fix_issue.${issue.type}.info_text_1`,
`ui.panel.config.tools.tabs.statistics.fix_issue.${issue.type}.info_text_1`,
{
name: getStatisticLabel(
this.hass,
@@ -67,24 +67,24 @@ export class DialogStatisticsFix extends LitElement {
...(issue.type === "mean_type_changed"
? {
metadata_mean_type: this.hass.localize(
`ui.panel.config.developer-tools.tabs.statistics.mean_type.${issue.data.metadata_mean_type}`
`ui.panel.config.tools.tabs.statistics.mean_type.${issue.data.metadata_mean_type}`
),
state_mean_type: this.hass.localize(
`ui.panel.config.developer-tools.tabs.statistics.mean_type.${issue.data.state_mean_type}`
`ui.panel.config.tools.tabs.statistics.mean_type.${issue.data.state_mean_type}`
),
}
: {}),
}
)}<br /><br />
${this.hass.localize(
`ui.panel.config.developer-tools.tabs.statistics.fix_issue.${issue.type}.info_text_2`,
`ui.panel.config.tools.tabs.statistics.fix_issue.${issue.type}.info_text_2`,
{ statistic_id: issue.data.statistic_id }
)}
${
issue.type === "mean_type_changed"
? html`<br /><br />
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.mean_type_changed.info_text_3",
"ui.panel.config.tools.tabs.statistics.fix_issue.mean_type_changed.info_text_3",
{ statistic_id: issue.data.statistic_id }
)}`
: issue.type === "entity_not_recorded"
@@ -98,7 +98,7 @@ export class DialogStatisticsFix extends LitElement {
rel="noreferrer noopener"
>
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.entity_not_recorded.info_text_3_link"
"ui.panel.config.tools.tabs.statistics.fix_issue.entity_not_recorded.info_text_3_link"
)}</a
>`
: issue.type === "entity_no_longer_recorded"
@@ -111,22 +111,22 @@ export class DialogStatisticsFix extends LitElement {
rel="noreferrer noopener"
>
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.entity_no_longer_recorded.info_text_3_link"
"ui.panel.config.tools.tabs.statistics.fix_issue.entity_no_longer_recorded.info_text_3_link"
)}</a
><br /><br />
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.entity_no_longer_recorded.info_text_4"
"ui.panel.config.tools.tabs.statistics.fix_issue.entity_no_longer_recorded.info_text_4"
)}`
: issue.type === "state_class_removed"
? html`<ul>
<li>
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.state_class_removed.info_text_3"
"ui.panel.config.tools.tabs.statistics.fix_issue.state_class_removed.info_text_3"
)}
</li>
<li>
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.state_class_removed.info_text_4"
"ui.panel.config.tools.tabs.statistics.fix_issue.state_class_removed.info_text_4"
)}
<a
href="https://developers.home-assistant.io/docs/core/entity/sensor/#long-term-statistics"
@@ -134,18 +134,18 @@ export class DialogStatisticsFix extends LitElement {
rel="noreferrer noopener"
>
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.state_class_removed.info_text_4_link"
"ui.panel.config.tools.tabs.statistics.fix_issue.state_class_removed.info_text_4_link"
)}</a
>
</li>
<li>
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.state_class_removed.info_text_5"
"ui.panel.config.tools.tabs.statistics.fix_issue.state_class_removed.info_text_5"
)}
</li>
</ul>
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.state_class_removed.info_text_6",
"ui.panel.config.tools.tabs.statistics.fix_issue.state_class_removed.info_text_6",
{ statistic_id: issue.data.statistic_id }
)}`
: nothing
@@ -195,15 +195,15 @@ export class DialogStatisticsFix extends LitElement {
title:
err.code === "timeout"
? this.hass.localize(
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.clearing_timeout_title"
"ui.panel.config.tools.tabs.statistics.fix_issue.clearing_timeout_title"
)
: this.hass.localize(
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.clearing_failed"
"ui.panel.config.tools.tabs.statistics.fix_issue.clearing_failed"
),
text:
err.code === "timeout"
? this.hass.localize(
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.clearing_timeout_text"
"ui.panel.config.tools.tabs.statistics.fix_issue.clearing_timeout_text"
)
: err.message,
});
@@ -98,7 +98,7 @@ type DisplayedStatisticData = StatisticData & {
issues_string?: string;
};
@customElement("developer-tools-statistics")
@customElement("tools-statistics")
class HaPanelDevStatistics extends KeyboardShortcutMixin(LitElement) {
@property({ type: Boolean, reflect: true }) public narrow = false;
@@ -188,7 +188,7 @@ class HaPanelDevStatistics extends KeyboardShortcutMixin(LitElement) {
?.map(
(issue) =>
localize(
`ui.panel.config.developer-tools.tabs.statistics.issues.${issue.type}`,
`ui.panel.config.tools.tabs.statistics.issues.${issue.type}`,
issue.data
) || issue.type
)
@@ -204,7 +204,7 @@ class HaPanelDevStatistics extends KeyboardShortcutMixin(LitElement) {
): DataTableColumnContainer<DisplayedStatisticData> => ({
displayName: {
title: localize(
"ui.panel.config.developer-tools.tabs.statistics.data_table.name"
"ui.panel.config.tools.tabs.statistics.data_table.name"
),
main: true,
sortable: true,
@@ -225,7 +225,7 @@ class HaPanelDevStatistics extends KeyboardShortcutMixin(LitElement) {
area: getAreaTableColumn(localize),
statistic_id: {
title: localize(
"ui.panel.config.developer-tools.tabs.statistics.data_table.statistic_id"
"ui.panel.config.tools.tabs.statistics.data_table.statistic_id"
),
sortable: true,
filterable: true,
@@ -233,7 +233,7 @@ class HaPanelDevStatistics extends KeyboardShortcutMixin(LitElement) {
},
statistics_unit_of_measurement: {
title: localize(
"ui.panel.config.developer-tools.tabs.statistics.data_table.statistics_unit"
"ui.panel.config.tools.tabs.statistics.data_table.statistics_unit"
),
sortable: true,
filterable: true,
@@ -241,7 +241,7 @@ class HaPanelDevStatistics extends KeyboardShortcutMixin(LitElement) {
},
source: {
title: localize(
"ui.panel.config.developer-tools.tabs.statistics.data_table.source"
"ui.panel.config.tools.tabs.statistics.data_table.source"
),
sortable: true,
filterable: true,
@@ -249,7 +249,7 @@ class HaPanelDevStatistics extends KeyboardShortcutMixin(LitElement) {
},
issues_string: {
title: localize(
"ui.panel.config.developer-tools.tabs.statistics.data_table.issue"
"ui.panel.config.tools.tabs.statistics.data_table.issue"
),
sortable: true,
filterable: true,
@@ -259,14 +259,12 @@ class HaPanelDevStatistics extends KeyboardShortcutMixin(LitElement) {
template: (statistic) =>
html`${
statistic.issues_string ??
localize("ui.panel.config.developer-tools.tabs.statistics.no_issue")
localize("ui.panel.config.tools.tabs.statistics.no_issue")
}`,
},
fix: {
title: "",
label: localize(
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.fix"
),
label: localize("ui.panel.config.tools.tabs.statistics.fix_issue.fix"),
type: "icon",
template: (statistic) =>
html`${
@@ -281,8 +279,8 @@ class HaPanelDevStatistics extends KeyboardShortcutMixin(LitElement) {
statistic.issues.some((issue) =>
FIXABLE_ISSUES.includes(issue.type)
)
? "ui.panel.config.developer-tools.tabs.statistics.fix_issue.fix"
: "ui.panel.config.developer-tools.tabs.statistics.fix_issue.info"
? "ui.panel.config.tools.tabs.statistics.fix_issue.fix"
: "ui.panel.config.tools.tabs.statistics.fix_issue.info"
)}
</ha-button>`
: "—"
@@ -293,9 +291,7 @@ class HaPanelDevStatistics extends KeyboardShortcutMixin(LitElement) {
},
actions: {
title: "",
label: localize(
"ui.panel.config.developer-tools.tabs.statistics.adjust_sum"
),
label: localize("ui.panel.config.tools.tabs.statistics.adjust_sum"),
type: "icon-button",
showNarrow: true,
template: (statistic) =>
@@ -303,7 +299,7 @@ class HaPanelDevStatistics extends KeyboardShortcutMixin(LitElement) {
? html`
<ha-icon-button
.label=${localize(
"ui.panel.config.developer-tools.tabs.statistics.adjust_sum"
"ui.panel.config.tools.tabs.statistics.adjust_sum"
)}
.path=${mdiSlopeUphill}
.statistic=${statistic}
@@ -500,7 +496,7 @@ class HaPanelDevStatistics extends KeyboardShortcutMixin(LitElement) {
</ha-dropdown-item>
<ha-dropdown-item @click=${this._selectAllIssues}>
${this._i18n.localize(
"ui.panel.config.developer-tools.tabs.statistics.data_table.select_all_issues"
"ui.panel.config.tools.tabs.statistics.data_table.select_all_issues"
)}
</ha-dropdown-item>
<ha-dropdown-item @click=${this._selectNone}>
@@ -529,7 +525,7 @@ class HaPanelDevStatistics extends KeyboardShortcutMixin(LitElement) {
</div>
<ha-assist-chip
.label=${this._i18n.localize(
"ui.panel.config.developer-tools.tabs.statistics.delete_selected"
"ui.panel.config.tools.tabs.statistics.delete_selected"
)}
.disabled=${!this._selected.length}
@click=${this._clearSelected}
@@ -563,7 +559,7 @@ class HaPanelDevStatistics extends KeyboardShortcutMixin(LitElement) {
this._registries.areas
)}
.noDataText=${this._i18n.localize(
"ui.panel.config.developer-tools.tabs.statistics.data_table.no_statistics"
"ui.panel.config.tools.tabs.statistics.data_table.no_statistics"
)}
.filter=${this.filter}
.selectable=${this._selectMode}
@@ -770,10 +766,10 @@ class HaPanelDevStatistics extends KeyboardShortcutMixin(LitElement) {
await showConfirmationDialog(this, {
title: this._i18n.localize(
"ui.panel.config.developer-tools.tabs.statistics.multi_delete.title"
"ui.panel.config.tools.tabs.statistics.multi_delete.title"
),
text: html`${this._i18n.localize(
"ui.panel.config.developer-tools.tabs.statistics.multi_delete.info_text",
"ui.panel.config.tools.tabs.statistics.multi_delete.info_text",
{ statistic_count: deletableIds.length }
)}`,
confirmText: this._i18n.localize("ui.common.delete"),
@@ -925,6 +921,6 @@ class HaPanelDevStatistics extends KeyboardShortcutMixin(LitElement) {
declare global {
interface HTMLElementTagNameMap {
"developer-tools-statistics": HaPanelDevStatistics;
"tools-statistics": HaPanelDevStatistics;
}
}
@@ -4,6 +4,7 @@ import { css, html, LitElement, nothing } from "lit";
import { customElement, property, query, state } from "lit/decorators";
import { classMap } from "lit/directives/class-map";
import type { HASSDomEvent } from "../../../../common/dom/fire_event";
import type { LocalizeKeys } from "../../../../common/translations/localize";
import { debounce } from "../../../../common/util/debounce";
import "../../../../components/ha-alert";
import "../../../../components/ha-button";
@@ -40,7 +41,16 @@ For loop example getting entity values in the weather domain:
{{ state.name | lower }} is {{state.state_with_unit}}
{%- endfor %}.`;
@customElement("developer-tools-template")
// key resolves the label/description translation keys; path is passed through
// documentationUrl().
const TEMPLATE_DOCS_LINKS: { key: string; path: string }[] = [
{ key: "docs_introduction", path: "/docs/templating/introduction/" },
{ key: "docs_states", path: "/docs/templating/states/" },
{ key: "docs_debugging", path: "/docs/templating/debugging/" },
{ key: "docs_functions", path: "/template-functions/" },
];
@customElement("tools-template")
class HaPanelDevTemplate extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@@ -108,7 +118,7 @@ class HaPanelDevTemplate extends LitElement {
<div class="content">
<ha-expansion-panel
.header=${this.hass.localize(
"ui.panel.config.developer-tools.tabs.templates.about"
"ui.panel.config.tools.tabs.templates.about"
)}
outlined
.expanded=${this._descriptionExpanded}
@@ -117,34 +127,39 @@ class HaPanelDevTemplate extends LitElement {
<div class="description">
<p>
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.templates.description"
"ui.panel.config.tools.tabs.templates.description"
)}
</p>
<p>
${this.hass.localize(
"ui.panel.config.tools.tabs.templates.engine_info"
)}
</p>
<h3>
${this.hass.localize(
"ui.panel.config.tools.tabs.templates.learn_more"
)}
</h3>
<ul>
<li>
<a
href="https://jinja.palletsprojects.com/en/latest/templates/"
target="_blank"
rel="noreferrer"
>${this.hass.localize(
"ui.panel.config.developer-tools.tabs.templates.jinja_documentation"
)}
</a>
</li>
<li>
<a
href=${documentationUrl(
this.hass,
"/docs/configuration/templating/"
)}
target="_blank"
rel="noreferrer"
>
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.templates.template_extensions"
)}</a
>
</li>
${TEMPLATE_DOCS_LINKS.map(
(link) => html`
<li>
<a
href=${documentationUrl(this.hass, link.path)}
target="_blank"
rel="noreferrer"
>${this.hass.localize(
`ui.panel.config.tools.tabs.templates.${link.key}` as LocalizeKeys
)}</a
>
<span class="link-description"
>${this.hass.localize(
`ui.panel.config.tools.tabs.templates.${link.key}_description` as LocalizeKeys
)}</span
>
</li>
`
)}
</ul>
</div>
</ha-expansion-panel>
@@ -159,7 +174,7 @@ class HaPanelDevTemplate extends LitElement {
<ha-card
class="edit-pane"
header=${this.hass.localize(
"ui.panel.config.developer-tools.tabs.templates.editor"
"ui.panel.config.tools.tabs.templates.editor"
)}
>
<div class="card-content">
@@ -177,7 +192,7 @@ class HaPanelDevTemplate extends LitElement {
<div class="card-actions">
<ha-button appearance="plain" @click=${this._restoreDemo}>
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.templates.reset"
"ui.panel.config.tools.tabs.templates.reset"
)}
</ha-button>
<ha-button appearance="plain" @click=${this._clear}>
@@ -186,7 +201,7 @@ class HaPanelDevTemplate extends LitElement {
</div>
<ha-tip>
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.templates.keyboard_tip",
"ui.panel.config.tools.tabs.templates.keyboard_tip",
{
autocomplete: html`<kbd>Ctrl</kbd>+<kbd>Space</kbd>`,
}
@@ -197,7 +212,7 @@ class HaPanelDevTemplate extends LitElement {
<ha-card
class="render-pane"
header=${this.hass.localize(
"ui.panel.config.developer-tools.tabs.templates.result"
"ui.panel.config.tools.tabs.templates.result"
)}
>
<div class="card-content ha-scrollbar">
@@ -231,7 +246,7 @@ ${
}</pre>
<p>
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.templates.result_type"
"ui.panel.config.tools.tabs.templates.result_type"
)}:
${resultType}
</p>
@@ -240,7 +255,7 @@ ${
? html`
<p>
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.templates.time"
"ui.panel.config.tools.tabs.templates.time"
)}
</p>
`
@@ -253,7 +268,7 @@ ${
? html`
<p class="all_listeners">
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.templates.all_listeners"
"ui.panel.config.tools.tabs.templates.all_listeners"
)}
</p>
`
@@ -262,7 +277,7 @@ ${
? html`
<p>
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.templates.listeners"
"ui.panel.config.tools.tabs.templates.listeners"
)}
</p>
<ul>
@@ -273,7 +288,7 @@ ${
<li>
<b
>${this.hass.localize(
"ui.panel.config.developer-tools.tabs.templates.domain"
"ui.panel.config.tools.tabs.templates.domain"
)}</b
>: ${domain}
</li>
@@ -286,7 +301,7 @@ ${
<li>
<b
>${this.hass.localize(
"ui.panel.config.developer-tools.tabs.templates.entity"
"ui.panel.config.tools.tabs.templates.entity"
)}</b
>: ${entity_id}
</li>
@@ -297,7 +312,7 @@ ${
: !this._templateResult.listeners.time
? html`<span class="all_listeners">
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.templates.no_listeners"
"ui.panel.config.tools.tabs.templates.no_listeners"
)}
</span>`
: nothing
@@ -441,6 +456,17 @@ ${
margin-block-start: var(--ha-space-1);
margin-block-end: var(--ha-space-1);
}
.description > h3 {
font-size: var(--ha-font-size-m);
font-weight: var(--ha-font-weight-medium);
margin-block-end: var(--ha-space-1);
}
.description li {
margin-block-end: var(--ha-space-1);
}
.description .link-description {
color: var(--secondary-text-color);
}
.render-pane .card-content {
user-select: text;
@@ -596,7 +622,7 @@ ${
if (
!(await showConfirmationDialog(this, {
text: this.hass.localize(
"ui.panel.config.developer-tools.tabs.templates.confirm_reset"
"ui.panel.config.tools.tabs.templates.confirm_reset"
),
warning: true,
}))
@@ -612,7 +638,7 @@ ${
if (
!(await showConfirmationDialog(this, {
text: this.hass.localize(
"ui.panel.config.developer-tools.tabs.templates.confirm_clear"
"ui.panel.config.tools.tabs.templates.confirm_clear"
),
warning: true,
}))
@@ -632,6 +658,6 @@ ${
declare global {
interface HTMLElementTagNameMap {
"developer-tools-template": HaPanelDevTemplate;
"tools-template": HaPanelDevTemplate;
}
}
@@ -3,8 +3,8 @@ import type { RouterOptions } from "../../../layouts/hass-router-page";
import { HassRouterPage } from "../../../layouts/hass-router-page";
import type { HomeAssistant } from "../../../types";
@customElement("developer-tools-router")
class DeveloperToolsRouter extends HassRouterPage {
@customElement("tools-router")
class ToolsRouter extends HassRouterPage {
@property({ attribute: false }) public hass!: HomeAssistant;
@property({ type: Boolean }) public narrow = false;
@@ -22,37 +22,37 @@ class DeveloperToolsRouter extends HassRouterPage {
showLoading: true,
routes: {
event: {
tag: "developer-tools-event",
load: () => import("./event/developer-tools-event"),
tag: "tools-event",
load: () => import("./event/tools-event"),
},
service: "action",
action: {
tag: "developer-tools-action",
load: () => import("./action/developer-tools-action"),
tag: "tools-action",
load: () => import("./action/tools-action"),
},
state: {
tag: "developer-tools-state",
load: () => import("./state/developer-tools-state"),
tag: "tools-state",
load: () => import("./state/tools-state"),
},
template: {
tag: "developer-tools-template",
load: () => import("./template/developer-tools-template"),
tag: "tools-template",
load: () => import("./template/tools-template"),
},
statistics: {
tag: "developer-tools-statistics",
load: () => import("./statistics/developer-tools-statistics"),
tag: "tools-statistics",
load: () => import("./statistics/tools-statistics"),
},
yaml: {
tag: "developer-yaml-config",
load: () => import("./yaml_configuration/developer-yaml-config"),
tag: "tools-yaml-config",
load: () => import("./yaml_configuration/tools-yaml-config"),
},
assist: {
tag: "developer-tools-assist",
load: () => import("./assist/developer-tools-assist"),
tag: "tools-assist",
load: () => import("./assist/tools-assist"),
},
debug: {
tag: "developer-tools-debug",
load: () => import("./debug/developer-tools-debug"),
tag: "tools-debug",
load: () => import("./debug/tools-debug"),
},
},
};
@@ -77,6 +77,6 @@ class DeveloperToolsRouter extends HassRouterPage {
declare global {
interface HTMLElementTagNameMap {
"developer-tools-router": DeveloperToolsRouter;
"tools-router": ToolsRouter;
}
}
@@ -16,7 +16,7 @@ import { haStyle } from "../../../../resources/styles";
import type { HomeAssistant, Route, TranslationDict } from "../../../../types";
type ReloadableDomain = Exclude<
keyof TranslationDict["ui"]["panel"]["config"]["developer-tools"]["tabs"]["yaml"]["section"]["reloading"],
keyof TranslationDict["ui"]["panel"]["config"]["tools"]["tabs"]["yaml"]["section"]["reloading"],
"heading" | "introduction" | "reload"
>;
@@ -25,8 +25,8 @@ interface TranslatedReloadableDomain {
name: string;
}
@customElement("developer-yaml-config")
export class DeveloperYamlConfig extends LitElement {
@customElement("tools-yaml-config")
export class ToolsYamlConfig extends LitElement {
@property({ attribute: false }) public hass!: HomeAssistant;
@property({ attribute: "is-wide", type: Boolean }) public isWide = false;
@@ -61,10 +61,10 @@ export class DeveloperYamlConfig extends LitElement {
domain,
name:
this.hass.localize(
`ui.panel.config.developer-tools.tabs.yaml.section.reloading.${domain}`
`ui.panel.config.tools.tabs.yaml.section.reloading.${domain}`
) ||
this.hass.localize(
"ui.panel.config.developer-tools.tabs.yaml.section.reloading.reload",
"ui.panel.config.tools.tabs.yaml.section.reloading.reload",
{ domain: domainToName(this.hass.localize, domain) }
),
}))
@@ -80,12 +80,12 @@ export class DeveloperYamlConfig extends LitElement {
<ha-card
outlined
header=${this.hass.localize(
"ui.panel.config.developer-tools.tabs.yaml.section.validation.heading"
"ui.panel.config.tools.tabs.yaml.section.validation.heading"
)}
>
<div class="card-content">
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.yaml.section.validation.introduction"
"ui.panel.config.tools.tabs.yaml.section.validation.introduction"
)}
${
!this._validateResult
@@ -103,10 +103,10 @@ export class DeveloperYamlConfig extends LitElement {
${
this._validateResult.result === "valid"
? this.hass.localize(
"ui.panel.config.developer-tools.tabs.yaml.section.validation.valid"
"ui.panel.config.tools.tabs.yaml.section.validation.valid"
)
: this.hass.localize(
"ui.panel.config.developer-tools.tabs.yaml.section.validation.invalid"
"ui.panel.config.tools.tabs.yaml.section.validation.invalid"
)
}
</div>
@@ -116,7 +116,7 @@ export class DeveloperYamlConfig extends LitElement {
? html`<ha-alert
alert-type="error"
.title=${this.hass.localize(
"ui.panel.config.developer-tools.tabs.yaml.section.validation.errors"
"ui.panel.config.tools.tabs.yaml.section.validation.errors"
)}
>
<!-- prettier-ignore -->
@@ -131,7 +131,7 @@ export class DeveloperYamlConfig extends LitElement {
? html`<ha-alert
alert-type="warning"
.title=${this.hass.localize(
"ui.panel.config.developer-tools.tabs.yaml.section.validation.warnings"
"ui.panel.config.tools.tabs.yaml.section.validation.warnings"
)}
>
<!-- prettier-ignore -->
@@ -148,7 +148,7 @@ export class DeveloperYamlConfig extends LitElement {
<div class="card-actions">
<ha-button appearance="plain" @click=${this._validateConfig}>
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.yaml.section.validation.check_config"
"ui.panel.config.tools.tabs.yaml.section.validation.check_config"
)}
</ha-button>
<ha-button
@@ -158,7 +158,7 @@ export class DeveloperYamlConfig extends LitElement {
.disabled=${this._validateResult?.result === "invalid"}
>
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.yaml.section.server_management.restart"
"ui.panel.config.tools.tabs.yaml.section.server_management.restart"
)}
</ha-button>
</div>
@@ -166,18 +166,18 @@ export class DeveloperYamlConfig extends LitElement {
<ha-card
outlined
header=${this.hass.localize(
"ui.panel.config.developer-tools.tabs.yaml.section.reloading.heading"
"ui.panel.config.tools.tabs.yaml.section.reloading.heading"
)}
>
<div class="card-content">
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.yaml.section.reloading.introduction"
"ui.panel.config.tools.tabs.yaml.section.reloading.introduction"
)}
</div>
<div class="card-actions">
<ha-call-service-button domain="homeassistant" service="reload_all"
>${this.hass.localize(
"ui.panel.config.developer-tools.tabs.yaml.section.reloading.all"
"ui.panel.config.tools.tabs.yaml.section.reloading.all"
)}
</ha-call-service-button>
</div>
@@ -186,7 +186,7 @@ export class DeveloperYamlConfig extends LitElement {
domain="homeassistant"
service="reload_core_config"
>${this.hass.localize(
"ui.panel.config.developer-tools.tabs.yaml.section.reloading.core"
"ui.panel.config.tools.tabs.yaml.section.reloading.core"
)}
</ha-call-service-button>
</div>
@@ -269,6 +269,6 @@ export class DeveloperYamlConfig extends LitElement {
declare global {
interface HTMLElementTagNameMap {
"developer-yaml-config": DeveloperYamlConfig;
"tools-yaml-config": ToolsYamlConfig;
}
}
+39 -9
View File
@@ -25,35 +25,65 @@ export const getMyRedirects = (): Redirects => ({
application_credentials: {
redirect: "/config/application_credentials",
},
tools_assist: {
redirect: "/config/tools/assist",
},
tools_debug: {
redirect: "/config/tools/debug",
},
tools_states: {
redirect: "/config/tools/state",
},
tools_actions: {
redirect: "/config/tools/action",
},
tools_perform_action: {
redirect: "/config/tools/action",
params: {
service: "string",
},
},
tools_template: {
redirect: "/config/tools/template",
},
tools_events: {
redirect: "/config/tools/event",
},
tools_statistics: {
redirect: "/config/tools/statistics",
},
tools_yaml: {
redirect: "/config/tools/yaml",
},
developer_assist: {
redirect: "/config/developer-tools/assist",
redirect: "/config/tools/assist",
},
developer_debug: {
redirect: "/config/developer-tools/debug",
redirect: "/config/tools/debug",
},
developer_states: {
redirect: "/config/developer-tools/state",
redirect: "/config/tools/state",
},
developer_services: {
redirect: "/config/developer-tools/action",
redirect: "/config/tools/action",
},
developer_call_service: {
redirect: "/config/developer-tools/action",
redirect: "/config/tools/action",
params: {
service: "string",
},
},
developer_template: {
redirect: "/config/developer-tools/template",
redirect: "/config/tools/template",
},
developer_events: {
redirect: "/config/developer-tools/event",
redirect: "/config/tools/event",
},
developer_statistics: {
redirect: "/config/developer-tools/statistics",
redirect: "/config/tools/statistics",
},
server_controls: {
redirect: "/config/developer-tools/yaml",
redirect: "/config/tools/yaml",
},
calendar: {
component: "calendar",
+62 -54
View File
@@ -1459,7 +1459,7 @@
"automations": "[%key:ui::panel::config::automation::caption%]",
"scenes": "[%key:ui::panel::config::scene::caption%]",
"scripts": "[%key:ui::panel::config::script::caption%]",
"developer_tools": "[%key:ui::panel::config::dashboard::developer_tools::main%]",
"tools": "[%key:ui::panel::config::dashboard::tools::main%]",
"integrations": "[%key:ui::panel::config::integrations::caption%]",
"devices": "[%key:ui::panel::config::devices::caption%]",
"entities": "[%key:ui::panel::config::entities::caption%]"
@@ -1485,45 +1485,45 @@
"navigate_title": "Navigate",
"commands": {
"reload": {
"all": "[%key:ui::panel::config::developer-tools::tabs::yaml::section::reloading::all%]",
"reload": "[%key:ui::panel::config::developer-tools::tabs::yaml::section::reloading::reload%]",
"core": "[%key:ui::panel::config::developer-tools::tabs::yaml::section::reloading::core%]",
"group": "[%key:ui::panel::config::developer-tools::tabs::yaml::section::reloading::group%]",
"automation": "[%key:ui::panel::config::developer-tools::tabs::yaml::section::reloading::automation%]",
"script": "[%key:ui::panel::config::developer-tools::tabs::yaml::section::reloading::script%]",
"scene": "[%key:ui::panel::config::developer-tools::tabs::yaml::section::reloading::scene%]",
"person": "[%key:ui::panel::config::developer-tools::tabs::yaml::section::reloading::person%]",
"zone": "[%key:ui::panel::config::developer-tools::tabs::yaml::section::reloading::zone%]",
"input_boolean": "[%key:ui::panel::config::developer-tools::tabs::yaml::section::reloading::input_boolean%]",
"input_button": "[%key:ui::panel::config::developer-tools::tabs::yaml::section::reloading::input_button%]",
"input_text": "[%key:ui::panel::config::developer-tools::tabs::yaml::section::reloading::input_text%]",
"input_number": "[%key:ui::panel::config::developer-tools::tabs::yaml::section::reloading::input_number%]",
"input_datetime": "[%key:ui::panel::config::developer-tools::tabs::yaml::section::reloading::input_datetime%]",
"input_select": "[%key:ui::panel::config::developer-tools::tabs::yaml::section::reloading::input_select%]",
"template": "[%key:ui::panel::config::developer-tools::tabs::yaml::section::reloading::template%]",
"universal": "[%key:ui::panel::config::developer-tools::tabs::yaml::section::reloading::universal%]",
"rest": "[%key:ui::panel::config::developer-tools::tabs::yaml::section::reloading::rest%]",
"command_line": "[%key:ui::panel::config::developer-tools::tabs::yaml::section::reloading::command_line%]",
"filter": "[%key:ui::panel::config::developer-tools::tabs::yaml::section::reloading::filter%]",
"statistics": "[%key:ui::panel::config::developer-tools::tabs::yaml::section::reloading::statistics%]",
"generic": "[%key:ui::panel::config::developer-tools::tabs::yaml::section::reloading::generic%]",
"generic_thermostat": "[%key:ui::panel::config::developer-tools::tabs::yaml::section::reloading::generic_thermostat%]",
"homekit": "[%key:ui::panel::config::developer-tools::tabs::yaml::section::reloading::homekit%]",
"min_max": "[%key:ui::panel::config::developer-tools::tabs::yaml::section::reloading::min_max%]",
"history_stats": "[%key:ui::panel::config::developer-tools::tabs::yaml::section::reloading::history_stats%]",
"trend": "[%key:ui::panel::config::developer-tools::tabs::yaml::section::reloading::trend%]",
"ping": "[%key:ui::panel::config::developer-tools::tabs::yaml::section::reloading::ping%]",
"filesize": "[%key:ui::panel::config::developer-tools::tabs::yaml::section::reloading::filesize%]",
"telegram": "[%key:ui::panel::config::developer-tools::tabs::yaml::section::reloading::telegram%]",
"smtp": "[%key:ui::panel::config::developer-tools::tabs::yaml::section::reloading::smtp%]",
"mqtt": "[%key:ui::panel::config::developer-tools::tabs::yaml::section::reloading::mqtt%]",
"rpi_gpio": "[%key:ui::panel::config::developer-tools::tabs::yaml::section::reloading::rpi_gpio%]",
"themes": "[%key:ui::panel::config::developer-tools::tabs::yaml::section::reloading::themes%]"
"all": "[%key:ui::panel::config::tools::tabs::yaml::section::reloading::all%]",
"reload": "[%key:ui::panel::config::tools::tabs::yaml::section::reloading::reload%]",
"core": "[%key:ui::panel::config::tools::tabs::yaml::section::reloading::core%]",
"group": "[%key:ui::panel::config::tools::tabs::yaml::section::reloading::group%]",
"automation": "[%key:ui::panel::config::tools::tabs::yaml::section::reloading::automation%]",
"script": "[%key:ui::panel::config::tools::tabs::yaml::section::reloading::script%]",
"scene": "[%key:ui::panel::config::tools::tabs::yaml::section::reloading::scene%]",
"person": "[%key:ui::panel::config::tools::tabs::yaml::section::reloading::person%]",
"zone": "[%key:ui::panel::config::tools::tabs::yaml::section::reloading::zone%]",
"input_boolean": "[%key:ui::panel::config::tools::tabs::yaml::section::reloading::input_boolean%]",
"input_button": "[%key:ui::panel::config::tools::tabs::yaml::section::reloading::input_button%]",
"input_text": "[%key:ui::panel::config::tools::tabs::yaml::section::reloading::input_text%]",
"input_number": "[%key:ui::panel::config::tools::tabs::yaml::section::reloading::input_number%]",
"input_datetime": "[%key:ui::panel::config::tools::tabs::yaml::section::reloading::input_datetime%]",
"input_select": "[%key:ui::panel::config::tools::tabs::yaml::section::reloading::input_select%]",
"template": "[%key:ui::panel::config::tools::tabs::yaml::section::reloading::template%]",
"universal": "[%key:ui::panel::config::tools::tabs::yaml::section::reloading::universal%]",
"rest": "[%key:ui::panel::config::tools::tabs::yaml::section::reloading::rest%]",
"command_line": "[%key:ui::panel::config::tools::tabs::yaml::section::reloading::command_line%]",
"filter": "[%key:ui::panel::config::tools::tabs::yaml::section::reloading::filter%]",
"statistics": "[%key:ui::panel::config::tools::tabs::yaml::section::reloading::statistics%]",
"generic": "[%key:ui::panel::config::tools::tabs::yaml::section::reloading::generic%]",
"generic_thermostat": "[%key:ui::panel::config::tools::tabs::yaml::section::reloading::generic_thermostat%]",
"homekit": "[%key:ui::panel::config::tools::tabs::yaml::section::reloading::homekit%]",
"min_max": "[%key:ui::panel::config::tools::tabs::yaml::section::reloading::min_max%]",
"history_stats": "[%key:ui::panel::config::tools::tabs::yaml::section::reloading::history_stats%]",
"trend": "[%key:ui::panel::config::tools::tabs::yaml::section::reloading::trend%]",
"ping": "[%key:ui::panel::config::tools::tabs::yaml::section::reloading::ping%]",
"filesize": "[%key:ui::panel::config::tools::tabs::yaml::section::reloading::filesize%]",
"telegram": "[%key:ui::panel::config::tools::tabs::yaml::section::reloading::telegram%]",
"smtp": "[%key:ui::panel::config::tools::tabs::yaml::section::reloading::smtp%]",
"mqtt": "[%key:ui::panel::config::tools::tabs::yaml::section::reloading::mqtt%]",
"rpi_gpio": "[%key:ui::panel::config::tools::tabs::yaml::section::reloading::rpi_gpio%]",
"themes": "[%key:ui::panel::config::tools::tabs::yaml::section::reloading::themes%]"
},
"home_assistant_control": {
"perform_action": "{action} Home Assistant",
"restart": "[%key:ui::panel::config::developer-tools::tabs::yaml::section::server_management::restart%]",
"stop": "[%key:ui::panel::config::developer-tools::tabs::yaml::section::server_management::stop%]"
"restart": "[%key:ui::panel::config::tools::tabs::yaml::section::server_management::restart%]",
"stop": "[%key:ui::panel::config::tools::tabs::yaml::section::server_management::stop%]"
},
"types": {
"reload": "Reload",
@@ -1559,14 +1559,14 @@
"analytics": "[%key:ui::panel::config::analytics::caption%]",
"system_health": "[%key:ui::panel::config::system_health::caption%]",
"blueprint": "[%key:ui::panel::config::blueprint::caption%]",
"server_control": "[%key:ui::panel::config::developer-tools::tabs::yaml::title%]",
"server_control": "[%key:ui::panel::config::tools::tabs::yaml::title%]",
"system": "[%key:ui::panel::config::dashboard::system::main%]",
"apps": "Apps",
"app_store": "App store",
"app_info": "{app} info",
"shortcuts": "[%key:ui::panel::config::info::shortcuts%]",
"labs": "[%key:ui::panel::config::labs::caption%]",
"developer-tools": "[%key:ui::panel::config::dashboard::developer_tools::main%]",
"tools": "[%key:ui::panel::config::dashboard::tools::main%]",
"matter": "[%key:ui::panel::config::dashboard::matter::main%]",
"zha": "[%key:ui::panel::config::dashboard::zha::main%]",
"zwave_js": "[%key:ui::panel::config::dashboard::zwave_js::main%]",
@@ -2154,12 +2154,12 @@
"data": "Additional data"
},
"template": {
"time": "[%key:ui::panel::config::developer-tools::tabs::templates::time%]",
"all_listeners": "[%key:ui::panel::config::developer-tools::tabs::templates::all_listeners%]",
"no_listeners": "[%key:ui::panel::config::developer-tools::tabs::templates::no_listeners%]",
"listeners": "[%key:ui::panel::config::developer-tools::tabs::templates::listeners%]",
"entity": "[%key:ui::panel::config::developer-tools::tabs::templates::entity%]",
"domain": "[%key:ui::panel::config::developer-tools::tabs::templates::domain%]"
"time": "[%key:ui::panel::config::tools::tabs::templates::time%]",
"all_listeners": "[%key:ui::panel::config::tools::tabs::templates::all_listeners%]",
"no_listeners": "[%key:ui::panel::config::tools::tabs::templates::no_listeners%]",
"listeners": "[%key:ui::panel::config::tools::tabs::templates::listeners%]",
"entity": "[%key:ui::panel::config::tools::tabs::templates::entity%]",
"domain": "[%key:ui::panel::config::tools::tabs::templates::domain%]"
}
},
"options_flow": {
@@ -2638,9 +2638,9 @@
"main": "System",
"secondary": "Create backups, check logs, or reboot your system"
},
"developer_tools": {
"main": "Developer tools",
"secondary": "Tools to inspect and debug your system"
"tools": {
"main": "Tools",
"secondary": "Inspect and debug your system"
},
"about": {
"main": "About",
@@ -3786,7 +3786,7 @@
"companion_apps": "Companion apps"
}
},
"developer-tools": {
"tools": {
"tabs": {
"assist": {
"tab": "Assist",
@@ -3904,7 +3904,9 @@
},
"templates": {
"title": "Template",
"description": "Templates are rendered using the Jinja2 template engine with some Home Assistant specific extensions.",
"description": "Templates let you generate dynamic content from your Home Assistant data, such as a notification that lists which lights are on, or a sensor whose value is calculated from several other entities.",
"engine_info": "Home Assistant uses the Jinja templating engine, extended with functions for working with your entities, areas, devices, and more. Write a template in the editor below and its result updates live as your states change.",
"learn_more": "Learn more",
"about": "About templates",
"editor": "Template editor",
"result": "Result",
@@ -3912,8 +3914,14 @@
"confirm_reset": "Do you want to reset your current template back to the demo template?",
"confirm_clear": "Do you want to clear your current template?",
"result_type": "Result type",
"jinja_documentation": "Jinja2 template documentation",
"template_extensions": "Home Assistant template extensions",
"docs_introduction": "Introduction to templating",
"docs_introduction_description": "Start here for a step-by-step guide.",
"docs_states": "Working with states",
"docs_states_description": "Read entity states and attributes in templates.",
"docs_debugging": "Debugging templates",
"docs_debugging_description": "Find and fix problems in your templates.",
"docs_functions": "Template functions reference",
"docs_functions_description": "Search every available function, filter, and test.",
"unknown_error_template": "Unknown error rendering template",
"time": "This template updates at the start of each minute.",
"all_listeners": "This template listens for all state changed events.",
@@ -4819,7 +4827,7 @@
"run_text_pipeline": "Run text pipeline",
"run_audio_pipeline": "Run audio pipeline",
"run_audio_with_wake": "Run audio pipeline with wake word detection",
"response": "[%key:ui::panel::config::developer-tools::tabs::actions::response%]",
"response": "[%key:ui::panel::config::tools::tabs::actions::response%]",
"send": "Send",
"continue_listening": "Continue listening for wake word",
"continue_talking": "Continue talking",
@@ -5120,7 +5128,7 @@
"type_script_plural": "[%key:ui::panel::config::blueprint::overview::types_plural::script%]",
"type_scene_plural": "scenes",
"new_automation_setup_failed_title": "New {type} setup timed out",
"new_automation_setup_failed_text": "Your new {type} was saved, but waiting for it to set up has timed out. This could be due to errors parsing your configuration.yaml, please check the configuration in developer tools. Your {type} will not be visible until this is corrected and {types} are reloaded. Changes to area, category, or labels were not saved and must be reapplied.",
"new_automation_setup_failed_text": "Your new {type} was saved, but waiting for it to set up has timed out. This could be due to errors parsing your configuration.yaml, please check the configuration in the Tools panel. Your {type} will not be visible until this is corrected and {types} are reloaded. Changes to area, category, or labels were not saved and must be reapplied.",
"new_automation_setup_keep_waiting": "You may continue to wait for a response from the server, in case it is just taking an unusually long time to process this {type}.",
"new_automation_setup_timedout_success": "The server has responded and this has now set up successfully. You may now close this dialog.",
"item_pasted": "{item} pasted",
+73 -8
View File
@@ -167,14 +167,6 @@ test.describe("Panel navigation", () => {
});
});
test("navigates to developer-tools panel", async ({ page }) => {
// Since 2026.2 developer-tools is part of the config panel
await goToPanel(page, "/config/developer-tools");
await expect(
page.locator("ha-panel-config, developer-tools-main").first()
).toBeAttached({ timeout: PANEL_TIMEOUT });
});
test("navigates to profile panel", async ({ page }) => {
await goToPanel(page, "/profile");
await expect(
@@ -183,6 +175,79 @@ test.describe("Panel navigation", () => {
});
});
// ---------------------------------------------------------------------------
// Tools panel (formerly Developer tools)
// ---------------------------------------------------------------------------
/**
* Every tool sub-page reachable under /config/tools, mapped to the custom
* element tools-router mounts for it (see tools-router.ts). Asserting on the
* specific element proves the route actually rendered its tool, not just the
* shared ha-panel-tools shell.
*/
const TOOLS_SUBPAGES: { route: string; element: string }[] = [
{ route: "yaml", element: "tools-yaml-config" },
{ route: "state", element: "tools-state" },
{ route: "action", element: "tools-action" },
{ route: "template", element: "tools-template" },
{ route: "event", element: "tools-event" },
{ route: "statistics", element: "tools-statistics" },
{ route: "assist", element: "tools-assist" },
{ route: "debug", element: "tools-debug" },
];
test.describe("Tools panel", () => {
test("base path renders the tools panel", async ({ page }) => {
await goToPanel(page, "/config/tools");
await expect(page.locator("ha-panel-tools")).toBeAttached({
timeout: PANEL_TIMEOUT,
});
});
for (const { route, element } of TOOLS_SUBPAGES) {
test(`renders the ${route} sub-page`, async ({ page }) => {
await goToPanel(page, `/config/tools/${route}`);
await expect(page.locator(element)).toBeAttached({
timeout: PANEL_TIMEOUT,
});
});
}
test("service is an alias for the action tool", async ({ page }) => {
await goToPanel(page, "/config/tools/service");
await expect(page.locator("tools-action")).toBeAttached({
timeout: PANEL_TIMEOUT,
});
});
});
// ---------------------------------------------------------------------------
// Tools redirects (old developer-tools URLs)
// ---------------------------------------------------------------------------
test.describe("Tools redirects", () => {
// The panel moved from top-level /developer-tools (pre-2026.2) to
// /config/developer-tools (2026.2), then was renamed to /config/tools
// (2026.8). Both old locations must redirect to the new one, and deep links
// must keep their sub-page. See the updateRoute() redirect in
// src/layouts/home-assistant.ts.
for (const oldBase of ["/developer-tools", "/config/developer-tools"]) {
test(`redirects ${oldBase} to the tools panel`, async ({ page }) => {
await goToPanel(page, oldBase);
await expect(page.locator("ha-panel-tools")).toBeAttached({
timeout: PANEL_TIMEOUT,
});
});
test(`redirects ${oldBase}/state to the state tool`, async ({ page }) => {
await goToPanel(page, `${oldBase}/state`);
await expect(page.locator("tools-state")).toBeAttached({
timeout: PANEL_TIMEOUT,
});
});
}
});
// ---------------------------------------------------------------------------
// Lovelace
// ---------------------------------------------------------------------------
-7
View File
@@ -43,11 +43,4 @@ export const e2eTestPanels: Panels = {
config: null,
url_path: "profile",
},
"developer-tools": {
component_name: "developer-tools",
icon: "mdi:hammer",
title: "developer_tools",
config: null,
url_path: "developer-tools",
},
};
+1 -1
View File
@@ -54,7 +54,7 @@ export class HaTest extends HomeAssistantAppEl {
: scenarios.default;
const initial: Partial<MockHomeAssistant> = {
// Use the full panel map (history + config + developer-tools enabled)
// Use the full panel map (history + config enabled)
panels: e2eTestPanels,
panelUrl: (() => {
const path = window.location.pathname;
+50 -50
View File
@@ -4618,22 +4618,22 @@ __metadata:
languageName: node
linkType: hard
"@rsdoctor/client@npm:1.5.16":
version: 1.5.16
resolution: "@rsdoctor/client@npm:1.5.16"
checksum: 10/dcda4e8034a296090b073102423050764e636f9801f2e5a5904e1f2744b1fe26d5f8202aed7a785c9fc809044e1aef5c4b6a16b63974caec79d1b5996ec35d34
"@rsdoctor/client@npm:1.5.17":
version: 1.5.17
resolution: "@rsdoctor/client@npm:1.5.17"
checksum: 10/0eb788455390a1b41aa31d982d93ceab3dd30671776e40e8a4ea3256b4713f6441066e079ff9a14413825e21d547b9b7d4ba52059f8995644e26724ff07bbf56
languageName: node
linkType: hard
"@rsdoctor/core@npm:1.5.16":
version: 1.5.16
resolution: "@rsdoctor/core@npm:1.5.16"
"@rsdoctor/core@npm:1.5.17":
version: 1.5.17
resolution: "@rsdoctor/core@npm:1.5.17"
dependencies:
"@rsbuild/plugin-check-syntax": "npm:^1.6.1"
"@rsdoctor/graph": "npm:1.5.16"
"@rsdoctor/sdk": "npm:1.5.16"
"@rsdoctor/types": "npm:1.5.16"
"@rsdoctor/utils": "npm:1.5.16"
"@rsdoctor/graph": "npm:1.5.17"
"@rsdoctor/sdk": "npm:1.5.17"
"@rsdoctor/types": "npm:1.5.17"
"@rsdoctor/utils": "npm:1.5.17"
"@rspack/resolver": "npm:^0.2.8"
browserslist-load-config: "npm:^1.0.2"
es-toolkit: "npm:^1.47.0"
@@ -4641,60 +4641,60 @@ __metadata:
fs-extra: "npm:^11.1.1"
semver: "npm:^7.7.4"
source-map: "npm:^0.7.6"
checksum: 10/be7b03b5a5a8a9be47f94159469c35488f98046c99e2ccd7daed325c3dd2a8b21c654c12ac6d40c2775546efade373f429f630e8905cc17a5c9151978a0caaf9
checksum: 10/a797d5243d1d3f758d8b38cea1a3195345525c3158c4061f5e78d875fe2001198c8967587153059eb7c5ff764f27b4685ce13fd55a27dccdcfe7cd8061fb30c9
languageName: node
linkType: hard
"@rsdoctor/graph@npm:1.5.16":
version: 1.5.16
resolution: "@rsdoctor/graph@npm:1.5.16"
"@rsdoctor/graph@npm:1.5.17":
version: 1.5.17
resolution: "@rsdoctor/graph@npm:1.5.17"
dependencies:
"@rsdoctor/types": "npm:1.5.16"
"@rsdoctor/utils": "npm:1.5.16"
"@rsdoctor/types": "npm:1.5.17"
"@rsdoctor/utils": "npm:1.5.17"
es-toolkit: "npm:^1.47.0"
path-browserify: "npm:1.0.1"
source-map: "npm:^0.7.6"
checksum: 10/949e3a2cc48ccbb2d554becb2270c4df4b4fc8a6e10bd55bf9dc4d5f9a5fb2823c3e11a30dce890beaaa1b0ab0039bba1554ad0e7ddc5e2ea47641222d454633
checksum: 10/e58ed532ea8cc743e45dd66b678e1da3d48939fe711ebfade47834ffc581be6089d611d18c97c3e12010e2c609049cb325d07021a5dc51ef651314f8fe9f5741
languageName: node
linkType: hard
"@rsdoctor/rspack-plugin@npm:1.5.16":
version: 1.5.16
resolution: "@rsdoctor/rspack-plugin@npm:1.5.16"
"@rsdoctor/rspack-plugin@npm:1.5.17":
version: 1.5.17
resolution: "@rsdoctor/rspack-plugin@npm:1.5.17"
dependencies:
"@rsdoctor/core": "npm:1.5.16"
"@rsdoctor/graph": "npm:1.5.16"
"@rsdoctor/sdk": "npm:1.5.16"
"@rsdoctor/types": "npm:1.5.16"
"@rsdoctor/utils": "npm:1.5.16"
"@rsdoctor/core": "npm:1.5.17"
"@rsdoctor/graph": "npm:1.5.17"
"@rsdoctor/sdk": "npm:1.5.17"
"@rsdoctor/types": "npm:1.5.17"
"@rsdoctor/utils": "npm:1.5.17"
peerDependencies:
"@rspack/core": "*"
peerDependenciesMeta:
"@rspack/core":
optional: true
checksum: 10/2bebf2b8dfc5ffde77b46b45fedc7d5d9b96f4fe3e5e1b3762bff5de6f278d9288fe6c361fa1df5bb17926a45ae3c6038e165d4f1f5e867724df0a530590b36a
checksum: 10/336bd813010a7c164770033ae5a30644bf165ce0dff250b9160c7c003401c214bfd96e528c5941c09834bb21949a4815c46ecae0ca4d9200b2b946b9c3164f8a
languageName: node
linkType: hard
"@rsdoctor/sdk@npm:1.5.16":
version: 1.5.16
resolution: "@rsdoctor/sdk@npm:1.5.16"
"@rsdoctor/sdk@npm:1.5.17":
version: 1.5.17
resolution: "@rsdoctor/sdk@npm:1.5.17"
dependencies:
"@rsdoctor/client": "npm:1.5.16"
"@rsdoctor/graph": "npm:1.5.16"
"@rsdoctor/types": "npm:1.5.16"
"@rsdoctor/utils": "npm:1.5.16"
"@rsdoctor/client": "npm:1.5.17"
"@rsdoctor/graph": "npm:1.5.17"
"@rsdoctor/types": "npm:1.5.17"
"@rsdoctor/utils": "npm:1.5.17"
launch-editor: "npm:^2.13.2"
safer-buffer: "npm:2.1.2"
socket.io: "npm:4.8.1"
tapable: "npm:2.3.3"
checksum: 10/8a845468e13c66b93f9784c7887f7040b1df24f43e9304b50c3a7258c6b172c2bc3ca5f6e5e9d15801d1634e3e48f6bc78115a7a0242890548d111ae512caf7d
checksum: 10/d8a146a43726d61a9d7d2cfca7e2cd48c42a7ba28c9d280353f986f1647c0a33f05ec68a45af4f22104df8a8dae7dc14d621e56a15f11c3967d78c21216be234
languageName: node
linkType: hard
"@rsdoctor/types@npm:1.5.16":
version: 1.5.16
resolution: "@rsdoctor/types@npm:1.5.16"
"@rsdoctor/types@npm:1.5.17":
version: 1.5.17
resolution: "@rsdoctor/types@npm:1.5.17"
dependencies:
"@types/connect": "npm:3.4.38"
"@types/estree": "npm:1.0.5"
@@ -4708,16 +4708,16 @@ __metadata:
optional: true
webpack:
optional: true
checksum: 10/f470a7047474669bd466c9cee15b5ef3e4b854d4347e3dd4f251f1d1f92bd9b7b5e6863349f5d3550485c3484497a1e8be71cefc56e883c81f8a734960d1fc5e
checksum: 10/4767825ae55498e25d1dfbecc0aebe2685b67701dae004617f4d95a68b85f19f29afe75f72b8efeab4fe49185bb9a3c85dcfce8f99852c49d4ee37a4f6b7d888
languageName: node
linkType: hard
"@rsdoctor/utils@npm:1.5.16":
version: 1.5.16
resolution: "@rsdoctor/utils@npm:1.5.16"
"@rsdoctor/utils@npm:1.5.17":
version: 1.5.17
resolution: "@rsdoctor/utils@npm:1.5.17"
dependencies:
"@babel/code-frame": "npm:7.26.2"
"@rsdoctor/types": "npm:1.5.16"
"@rsdoctor/types": "npm:1.5.17"
"@types/estree": "npm:1.0.5"
acorn: "npm:^8.10.0"
acorn-import-attributes: "npm:^1.9.5"
@@ -4731,7 +4731,7 @@ __metadata:
picocolors: "npm:^1.1.1"
rslog: "npm:^2.1.2"
strip-ansi: "npm:^6.0.1"
checksum: 10/d73062cc01f4e2def276d6515f2810f54bfd7f819f1d3a00dd884621f9c008eda4b31ae6e6d96efaec81d1bbad98f0f49cb77e14a028d5f53c97aca84b6b07d4
checksum: 10/7c9b4a3824de61f6254df50f80c5efe53df662f30cb07047afa956a9bc3917dc71bf0aa73c8edde7f73f9577a9cb051e1a81caaffa118db414a4b655223fe92a
languageName: node
linkType: hard
@@ -9771,7 +9771,7 @@ __metadata:
"@octokit/rest": "npm:22.0.1"
"@playwright/test": "npm:1.61.1"
"@replit/codemirror-indentation-markers": "npm:6.5.3"
"@rsdoctor/rspack-plugin": "npm:1.5.16"
"@rsdoctor/rspack-plugin": "npm:1.5.17"
"@rspack/core": "npm:2.1.1"
"@rspack/dev-server": "npm:2.1.0"
"@swc/helpers": "npm:0.5.23"
@@ -9837,7 +9837,7 @@ __metadata:
home-assistant-js-websocket: "npm:9.6.0"
html-minifier-terser: "npm:7.2.0"
husky: "npm:9.1.7"
idb-keyval: "npm:6.2.5"
idb-keyval: "npm:6.2.6"
intl-messageformat: "npm:11.2.9"
js-yaml: "npm:5.2.0"
jsdom: "npm:29.1.1"
@@ -10056,10 +10056,10 @@ __metadata:
languageName: node
linkType: hard
"idb-keyval@npm:6.2.5":
version: 6.2.5
resolution: "idb-keyval@npm:6.2.5"
checksum: 10/ac645882b3258ff07347d085baab91b871bac7be4f46ff8e20a7c036c2df35d3f695a30050009f27237b99045203568f2a842a35295a48f9b815959ee51a347e
"idb-keyval@npm:6.2.6":
version: 6.2.6
resolution: "idb-keyval@npm:6.2.6"
checksum: 10/8d0f8b9bd5eead685731a900510095dbc58936968739755bfd1de1c69a710daa5eb2b5cf185d0a7c7e9ce1daf4544fa5f58a2c7a37258a6826dd40f9e2614245
languageName: node
linkType: hard