1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-02-14 23:18:21 +00:00

Move developer tools panel to config panel (#29221)

This commit is contained in:
Bram Kragten
2026-01-28 16:31:47 +01:00
committed by GitHub
parent 5a76c3f606
commit 4c98a7791b
30 changed files with 750 additions and 726 deletions

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 `/developer-tools/state`
You can find this information at `/config/developer-tools/state`
-->
```yaml

View File

@@ -135,9 +135,7 @@ export const computePanels = memoizeOne(
const beforeSpacer: PanelInfo[] = [];
const allPanels = Object.values(panels).filter(
(panel) =>
!FIXED_PANELS.includes(panel.url_path) &&
panel.url_path !== "developer-tools"
(panel) => !FIXED_PANELS.includes(panel.url_path)
);
allPanels.forEach((panel) => {

View File

@@ -4,7 +4,6 @@ import {
mdiChartBox,
mdiClipboardList,
mdiFormatListBulletedType,
mdiHammer,
mdiLightningBolt,
mdiPlayBoxMultiple,
mdiTooltipAccount,
@@ -116,7 +115,6 @@ export const getPanelIcon = (panel: PanelInfo): string | undefined => {
export const PANEL_ICON_PATHS = {
calendar: mdiCalendar,
"developer-tools": mdiHammer,
energy: mdiLightningBolt,
history: mdiChartBox,
logbook: mdiFormatListBulletedType,

View File

@@ -106,6 +106,10 @@ 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");
}
if (this._route && path === this._route.path) {
return;
}

View File

@@ -14,15 +14,13 @@ import { removeLaunchScreen } from "../util/launch-screen";
import type { RouteOptions, RouterOptions } from "./hass-router-page";
import { HassRouterPage } from "./hass-router-page";
const CACHE_URL_PATHS = ["lovelace", "developer-tools"];
const CACHE_URL_PATHS = ["lovelace", "home", "config"];
const COMPONENTS = {
app: () => import("../panels/app/ha-panel-app"),
energy: () => import("../panels/energy/ha-panel-energy"),
calendar: () => import("../panels/calendar/ha-panel-calendar"),
config: () => import("../panels/config/ha-panel-config"),
custom: () => import("../panels/custom/ha-panel-custom"),
"developer-tools": () =>
import("../panels/developer-tools/ha-panel-developer-tools"),
lovelace: () => import("../panels/lovelace/ha-panel-lovelace"),
history: () => import("../panels/history/ha-panel-history"),
iframe: () => import("../panels/iframe/ha-panel-iframe"),

View File

@@ -7,38 +7,41 @@ import { css, html, LitElement, nothing } from "lit";
import { customElement, property, query, state } from "lit/decorators";
import { until } from "lit/directives/until";
import memoizeOne from "memoize-one";
import { storage } from "../../../common/decorators/storage";
import { computeDomain } from "../../../common/entity/compute_domain";
import { computeObjectId } from "../../../common/entity/compute_object_id";
import { hasTemplate, isTemplate } from "../../../common/string/has-template";
import type { LocalizeFunc } from "../../../common/translations/localize";
import { extractSearchParam } from "../../../common/url/search-params";
import { copyToClipboard } from "../../../common/util/copy-clipboard";
import type { HaProgressButton } from "../../../components/buttons/ha-progress-button";
import { showToast } from "../../../util/toast";
import { storage } from "../../../../common/decorators/storage";
import { computeDomain } from "../../../../common/entity/compute_domain";
import { computeObjectId } from "../../../../common/entity/compute_object_id";
import {
hasTemplate,
isTemplate,
} from "../../../../common/string/has-template";
import type { LocalizeFunc } from "../../../../common/translations/localize";
import { extractSearchParam } from "../../../../common/url/search-params";
import { copyToClipboard } from "../../../../common/util/copy-clipboard";
import type { HaProgressButton } from "../../../../components/buttons/ha-progress-button";
import { showToast } from "../../../../util/toast";
import "../../../components/entity/ha-entity-picker";
import "../../../components/ha-alert";
import "../../../components/ha-button";
import "../../../components/ha-card";
import "../../../components/buttons/ha-progress-button";
import "../../../components/ha-expansion-panel";
import "../../../components/ha-icon-button";
import "../../../components/ha-service-control";
import "../../../components/ha-service-picker";
import "../../../components/ha-yaml-editor";
import type { HaYamlEditor } from "../../../components/ha-yaml-editor";
import { forwardHaptic } from "../../../data/haptics";
import type { Action, ServiceAction } from "../../../data/script";
import { migrateAutomationAction } from "../../../data/script";
import "../../../../components/entity/ha-entity-picker";
import "../../../../components/ha-alert";
import "../../../../components/ha-button";
import "../../../../components/ha-card";
import "../../../../components/buttons/ha-progress-button";
import "../../../../components/ha-expansion-panel";
import "../../../../components/ha-icon-button";
import "../../../../components/ha-service-control";
import "../../../../components/ha-service-picker";
import "../../../../components/ha-yaml-editor";
import type { HaYamlEditor } from "../../../../components/ha-yaml-editor";
import { forwardHaptic } from "../../../../data/haptics";
import type { Action, ServiceAction } from "../../../../data/script";
import { migrateAutomationAction } from "../../../../data/script";
import {
callExecuteScript,
serviceCallWillDisconnect,
} from "../../../data/service";
import { haStyle } from "../../../resources/styles";
import type { HomeAssistant } from "../../../types";
import { documentationUrl } from "../../../util/documentation-url";
import { resolveMediaSource } from "../../../data/media_source";
} from "../../../../data/service";
import { haStyle } from "../../../../resources/styles";
import type { HomeAssistant } from "../../../../types";
import { documentationUrl } from "../../../../util/documentation-url";
import { resolveMediaSource } from "../../../../data/media_source";
@customElement("developer-tools-action")
class HaPanelDevAction extends LitElement {
@@ -144,7 +147,7 @@ class HaPanelDevAction extends LitElement {
<div class="content">
<p>
${this.hass.localize(
"ui.panel.developer-tools.tabs.actions.description"
"ui.panel.config.developer-tools.tabs.actions.description"
)}
</p>
<ha-card>
@@ -189,23 +192,23 @@ class HaPanelDevAction extends LitElement {
>
${this._yamlMode
? this.hass.localize(
"ui.panel.developer-tools.tabs.actions.ui_mode"
"ui.panel.config.developer-tools.tabs.actions.ui_mode"
)
: this.hass.localize(
"ui.panel.developer-tools.tabs.actions.yaml_mode"
"ui.panel.config.developer-tools.tabs.actions.yaml_mode"
)}
</ha-button>
${!this._uiAvailable
? html`<span class="error"
>${this.hass.localize(
"ui.panel.developer-tools.tabs.actions.no_template_ui_support"
"ui.panel.config.developer-tools.tabs.actions.no_template_ui_support"
)}</span
>`
: ""}
</div>
<ha-progress-button raised @click=${this._callService}>
${this.hass.localize(
"ui.panel.developer-tools.tabs.actions.call_service"
"ui.panel.config.developer-tools.tabs.actions.call_service"
)}
</ha-progress-button>
</div>
@@ -214,7 +217,7 @@ class HaPanelDevAction extends LitElement {
? html`<div class="content response">
<ha-card
.header=${this.hass.localize(
"ui.panel.developer-tools.tabs.actions.response"
"ui.panel.config.developer-tools.tabs.actions.response"
)}
>
<div class="card-content">
@@ -230,7 +233,7 @@ class HaPanelDevAction extends LitElement {
slot="extra-actions"
@click=${this._copyTemplate}
>${this.hass.localize(
"ui.panel.developer-tools.tabs.actions.copy_clipboard_template"
"ui.panel.config.developer-tools.tabs.actions.copy_clipboard_template"
)}</ha-button
>
</ha-yaml-editor>
@@ -244,10 +247,10 @@ class HaPanelDevAction extends LitElement {
<ha-expansion-panel
.header=${this._yamlMode
? this.hass.localize(
"ui.panel.developer-tools.tabs.actions.all_parameters"
"ui.panel.config.developer-tools.tabs.actions.all_parameters"
)
: this.hass.localize(
"ui.panel.developer-tools.tabs.actions.yaml_parameters"
"ui.panel.config.developer-tools.tabs.actions.yaml_parameters"
)}
outlined
.expanded=${this._yamlMode}
@@ -258,7 +261,7 @@ class HaPanelDevAction extends LitElement {
${target
? html`
${this.hass.localize(
"ui.panel.developer-tools.tabs.actions.accepts_target"
"ui.panel.config.developer-tools.tabs.actions.accepts_target"
)}
`
: ""}
@@ -289,17 +292,17 @@ class HaPanelDevAction extends LitElement {
<tr>
<th>
${this.hass.localize(
"ui.panel.developer-tools.tabs.actions.column_parameter"
"ui.panel.config.developer-tools.tabs.actions.column_parameter"
)}
</th>
<th>
${this.hass.localize(
"ui.panel.developer-tools.tabs.actions.column_description"
"ui.panel.config.developer-tools.tabs.actions.column_description"
)}
</th>
<th>
${this.hass.localize(
"ui.panel.developer-tools.tabs.actions.column_example"
"ui.panel.config.developer-tools.tabs.actions.column_example"
)}
</th>
</tr>
@@ -333,7 +336,7 @@ class HaPanelDevAction extends LitElement {
appearance="plain"
@click=${this._fillExampleData}
>${this.hass.localize(
"ui.panel.developer-tools.tabs.actions.fill_example_data"
"ui.panel.config.developer-tools.tabs.actions.fill_example_data"
)}</ha-button
>`
: ""}
@@ -366,14 +369,14 @@ class HaPanelDevAction extends LitElement {
const errorCategory = yamlMode ? "yaml" : "ui";
if (!serviceData?.action) {
return localize(
`ui.panel.developer-tools.tabs.actions.errors.${errorCategory}.no_action`
`ui.panel.config.developer-tools.tabs.actions.errors.${errorCategory}.no_action`
);
}
const domain = computeDomain(serviceData.action);
const service = computeObjectId(serviceData.action);
if (!domain || !service) {
return localize(
`ui.panel.developer-tools.tabs.actions.errors.${errorCategory}.invalid_action`
`ui.panel.config.developer-tools.tabs.actions.errors.${errorCategory}.invalid_action`
);
}
const dataIsTemplate =
@@ -387,7 +390,7 @@ class HaPanelDevAction extends LitElement {
!serviceData.data?.area_id
) {
return localize(
`ui.panel.developer-tools.tabs.actions.errors.${errorCategory}.no_target`
`ui.panel.config.developer-tools.tabs.actions.errors.${errorCategory}.no_target`
);
}
for (const field of fields) {
@@ -397,7 +400,7 @@ class HaPanelDevAction extends LitElement {
(!serviceData.data || serviceData.data[field.key] === undefined)
) {
return localize(
`ui.panel.developer-tools.tabs.actions.errors.${errorCategory}.missing_required_field`,
`ui.panel.config.developer-tools.tabs.actions.errors.${errorCategory}.missing_required_field`,
{ key: field.key }
);
}
@@ -456,7 +459,7 @@ class HaPanelDevAction extends LitElement {
forwardHaptic(this, "failure");
button.actionError();
this._error = this.hass.localize(
"ui.panel.developer-tools.tabs.actions.errors.yaml.invalid_yaml"
"ui.panel.config.developer-tools.tabs.actions.errors.yaml.invalid_yaml"
);
return;
}
@@ -529,7 +532,7 @@ class HaPanelDevAction extends LitElement {
rel="noreferrer"
><ha-button>
${this.hass.localize(
"ui.panel.developer-tools.tabs.actions.open_media"
"ui.panel.config.developer-tools.tabs.actions.open_media"
)}
</ha-button></a
>

View File

@@ -3,21 +3,21 @@ import { dump } from "js-yaml";
import type { CSSResultGroup } from "lit";
import { LitElement, css, html, nothing } from "lit";
import { customElement, property, query, state } from "lit/decorators";
import { storage } from "../../../common/decorators/storage";
import { formatLanguageCode } from "../../../common/language/format_language";
import "../../../components/ha-alert";
import "../../../components/ha-button";
import "../../../components/ha-card";
import "../../../components/ha-code-editor";
import "../../../components/ha-language-picker";
import "../../../components/ha-textarea";
import type { HaTextArea } from "../../../components/ha-textarea";
import type { AssistDebugResult } from "../../../data/conversation";
import { debugAgent, listAgents } from "../../../data/conversation";
import { SubscribeMixin } from "../../../mixins/subscribe-mixin";
import { haStyle } from "../../../resources/styles";
import type { HomeAssistant } from "../../../types";
import { fileDownload } from "../../../util/file_download";
import { storage } from "../../../../common/decorators/storage";
import { formatLanguageCode } from "../../../../common/language/format_language";
import "../../../../components/ha-alert";
import "../../../../components/ha-button";
import "../../../../components/ha-card";
import "../../../../components/ha-code-editor";
import "../../../../components/ha-language-picker";
import "../../../../components/ha-textarea";
import type { HaTextArea } from "../../../../components/ha-textarea";
import type { AssistDebugResult } from "../../../../data/conversation";
import { debugAgent, listAgents } from "../../../../data/conversation";
import { SubscribeMixin } from "../../../../mixins/subscribe-mixin";
import { haStyle } from "../../../../resources/styles";
import type { HomeAssistant } from "../../../../types";
import { fileDownload } from "../../../../util/file_download";
interface SentenceParsingResult {
sentence: string;
@@ -118,14 +118,14 @@ class HaPanelDevAssist extends SubscribeMixin(LitElement) {
<div class="content">
<ha-card
.header=${this.hass.localize(
"ui.panel.developer-tools.tabs.assist.title"
"ui.panel.config.developer-tools.tabs.assist.title"
)}
class="form"
>
<div class="card-content">
<p class="description">
${this.hass.localize(
"ui.panel.developer-tools.tabs.assist.description"
"ui.panel.config.developer-tools.tabs.assist.description"
)}
</p>
${this.supportedLanguages
@@ -141,7 +141,7 @@ class HaPanelDevAssist extends SubscribeMixin(LitElement) {
<ha-textarea
autogrow
.label=${this.hass.localize(
"ui.panel.developer-tools.tabs.assist.sentences"
"ui.panel.config.developer-tools.tabs.assist.sentences"
)}
id="sentences-input"
@input=${this._textAreaInput}
@@ -155,7 +155,7 @@ class HaPanelDevAssist extends SubscribeMixin(LitElement) {
.disabled=${!this._language || !this._validInput}
>
${this.hass.localize(
"ui.panel.developer-tools.tabs.assist.parse_sentences"
"ui.panel.config.developer-tools.tabs.assist.parse_sentences"
)}
</ha-button>
</div>
@@ -175,7 +175,7 @@ class HaPanelDevAssist extends SubscribeMixin(LitElement) {
<ha-button appearance="filled" @click=${this._download}>
<ha-svg-icon slot="start" .path=${mdiDownload}></ha-svg-icon>
${this.hass.localize(
"ui.panel.developer-tools.tabs.assist.download_results"
"ui.panel.config.developer-tools.tabs.assist.download_results"
)}
</ha-button>
</div>
@@ -194,7 +194,7 @@ class HaPanelDevAssist extends SubscribeMixin(LitElement) {
</div>
<div class="info">
${this.hass.localize(
"ui.panel.developer-tools.tabs.assist.language"
"ui.panel.config.developer-tools.tabs.assist.language"
)}:
${formatLanguageCode(language, this.hass.locale)}
(${language})
@@ -211,7 +211,7 @@ class HaPanelDevAssist extends SubscribeMixin(LitElement) {
`
: html`<ha-alert alert-type="error">
${this.hass.localize(
"ui.panel.developer-tools.tabs.assist.no_match"
"ui.panel.config.developer-tools.tabs.assist.no_match"
)}
</ha-alert>`}
</div>

View File

@@ -1,20 +1,20 @@
import { LitElement, css, html } from "lit";
import { customElement, property, state } from "lit/decorators";
import "../../../components/ha-card";
import "../../../components/ha-button";
import "../../../components/entity/ha-entity-picker";
import { SubscribeMixin } from "../../../mixins/subscribe-mixin";
import { haStyle } from "../../../resources/styles";
import type { HomeAssistant } from "../../../types";
import "../../../../components/ha-card";
import "../../../../components/ha-button";
import "../../../../components/entity/ha-entity-picker";
import { SubscribeMixin } from "../../../../mixins/subscribe-mixin";
import { haStyle } from "../../../../resources/styles";
import type { HomeAssistant } from "../../../../types";
import "./ha-debug-connection-row";
import {
getStatisticMetadata,
validateStatistics,
} from "../../../data/recorder";
import { computeDomain } from "../../../common/entity/compute_domain";
import { copyToClipboard } from "../../../common/util/copy-clipboard";
import { showToast } from "../../../util/toast";
import { getExtendedEntityRegistryEntry } from "../../../data/entity/entity_registry";
} from "../../../../data/recorder";
import { computeDomain } from "../../../../common/entity/compute_domain";
import { copyToClipboard } from "../../../../common/util/copy-clipboard";
import { showToast } from "../../../../util/toast";
import { getExtendedEntityRegistryEntry } from "../../../../data/entity/entity_registry";
@customElement("developer-tools-debug")
class HaPanelDevDebug extends SubscribeMixin(LitElement) {
@@ -29,7 +29,7 @@ class HaPanelDevDebug extends SubscribeMixin(LitElement) {
<div class="content">
<ha-card
.header=${this.hass.localize(
"ui.panel.developer-tools.tabs.debug.title"
"ui.panel.config.developer-tools.tabs.debug.title"
)}
>
<ha-debug-connection-row
@@ -39,14 +39,14 @@ class HaPanelDevDebug extends SubscribeMixin(LitElement) {
</ha-card>
<ha-card
.header=${this.hass.localize(
"ui.panel.developer-tools.tabs.debug.entity_diagnostic.title"
"ui.panel.config.developer-tools.tabs.debug.entity_diagnostic.title"
)}
>
<div class="card-content">
<ha-entity-picker
.hass=${this.hass}
.helper=${this.hass.localize(
"ui.panel.developer-tools.tabs.debug.entity_diagnostic.description"
"ui.panel.config.developer-tools.tabs.debug.entity_diagnostic.description"
)}
@value-changed=${this._entityPicked}
></ha-entity-picker>
@@ -57,7 +57,7 @@ class HaPanelDevDebug extends SubscribeMixin(LitElement) {
appearance="filled"
.disabled=${!this._entityId}
>${this.hass.localize(
"ui.panel.developer-tools.tabs.debug.entity_diagnostic.copy_to_clipboard"
"ui.panel.config.developer-tools.tabs.debug.entity_diagnostic.copy_to_clipboard"
)}</ha-button
>
</div>

View File

@@ -1,11 +1,11 @@
import type { TemplateResult } from "lit";
import { html, LitElement } from "lit";
import { customElement, property } from "lit/decorators";
import "../../../components/ha-settings-row";
import "../../../components/ha-switch";
import type { HaSwitch } from "../../../components/ha-switch";
import type { HomeAssistant } from "../../../types";
import { storeState } from "../../../util/ha-pref-storage";
import "../../../../components/ha-settings-row";
import "../../../../components/ha-switch";
import type { HaSwitch } from "../../../../components/ha-switch";
import type { HomeAssistant } from "../../../../types";
import { storeState } from "../../../../util/ha-pref-storage";
@customElement("ha-debug-connection-row")
class HaDebugConnectionRow extends LitElement {
@@ -18,12 +18,12 @@ class HaDebugConnectionRow extends LitElement {
<ha-settings-row .narrow=${this.narrow}>
<span slot="heading">
${this.hass.localize(
"ui.panel.developer-tools.tabs.debug.debug_connection.title"
"ui.panel.config.developer-tools.tabs.debug.debug_connection.title"
)}
</span>
<span slot="description">
${this.hass.localize(
"ui.panel.developer-tools.tabs.debug.debug_connection.description"
"ui.panel.config.developer-tools.tabs.debug.debug_connection.description"
)}
</span>
<ha-switch

View File

@@ -1,7 +1,7 @@
import { customElement, property } from "lit/decorators";
import type { RouterOptions } from "../../layouts/hass-router-page";
import { HassRouterPage } from "../../layouts/hass-router-page";
import type { HomeAssistant } from "../../types";
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 {

View File

@@ -1,17 +1,17 @@
import type { CSSResultGroup, TemplateResult } from "lit";
import { LitElement, css, html } from "lit";
import { customElement, property, state } from "lit/decorators";
import "../../../components/ha-yaml-editor";
import "../../../components/ha-textfield";
import "../../../components/ha-button";
import "../../../components/ha-card";
import { showAlertDialog } from "../../../dialogs/generic/show-dialog-box";
import { documentationUrl } from "../../../util/documentation-url";
import "../../../../components/ha-yaml-editor";
import "../../../../components/ha-textfield";
import "../../../../components/ha-button";
import "../../../../components/ha-card";
import { showAlertDialog } from "../../../../dialogs/generic/show-dialog-box";
import { documentationUrl } from "../../../../util/documentation-url";
import "./event-subscribe-card";
import "./events-list";
import { haStyle } from "../../../resources/styles";
import type { HomeAssistant } from "../../../types";
import { fireEvent } from "../../../common/dom/fire_event";
import { haStyle } from "../../../../resources/styles";
import type { HomeAssistant } from "../../../../types";
import { fireEvent } from "../../../../common/dom/fire_event";
@customElement("developer-tools-event")
class HaPanelDevEvent extends LitElement {
@@ -39,7 +39,7 @@ class HaPanelDevEvent extends LitElement {
<div class="card-content">
<p>
${this.hass.localize(
"ui.panel.developer-tools.tabs.events.description"
"ui.panel.config.developer-tools.tabs.events.description"
)}
<a
href=${documentationUrl(
@@ -50,14 +50,14 @@ class HaPanelDevEvent extends LitElement {
rel="noreferrer"
>
${this.hass.localize(
"ui.panel.developer-tools.tabs.events.documentation"
"ui.panel.config.developer-tools.tabs.events.documentation"
)}
</a>
</p>
<div class="inputs">
<ha-textfield
.label=${this.hass.localize(
"ui.panel.developer-tools.tabs.events.type"
"ui.panel.config.developer-tools.tabs.events.type"
)}
autofocus
required
@@ -66,7 +66,7 @@ class HaPanelDevEvent extends LitElement {
></ha-textfield>
<p>
${this.hass.localize(
"ui.panel.developer-tools.tabs.events.data"
"ui.panel.config.developer-tools.tabs.events.data"
)}
</p>
</div>
@@ -85,7 +85,7 @@ class HaPanelDevEvent extends LitElement {
appearance="filled"
.disabled=${!this._isValid}
>${this.hass.localize(
"ui.panel.developer-tools.tabs.events.fire_event"
"ui.panel.config.developer-tools.tabs.events.fire_event"
)}</ha-button
>
</div>
@@ -100,7 +100,7 @@ class HaPanelDevEvent extends LitElement {
<div>
<h2>
${this.hass.localize(
"ui.panel.developer-tools.tabs.events.active_listeners"
"ui.panel.config.developer-tools.tabs.events.active_listeners"
)}
</h2>
<events-list
@@ -130,7 +130,7 @@ class HaPanelDevEvent extends LitElement {
if (!this._eventType) {
showAlertDialog(this, {
text: this.hass.localize(
"ui.panel.developer-tools.tabs.events.alert_event_type"
"ui.panel.config.developer-tools.tabs.events.alert_event_type"
),
});
return;
@@ -142,7 +142,7 @@ class HaPanelDevEvent extends LitElement {
);
fireEvent(this, "hass-notification", {
message: this.hass.localize(
"ui.panel.developer-tools.tabs.events.notification_event_fired",
"ui.panel.config.developer-tools.tabs.events.notification_event_fired",
{ type: this._eventType }
),
});

View File

@@ -3,13 +3,13 @@ import type { TemplateResult } from "lit";
import { css, html, LitElement } from "lit";
import { customElement, property, state } from "lit/decorators";
import { repeat } from "lit/directives/repeat";
import { formatTime } from "../../../common/datetime/format_time";
import "../../../components/ha-card";
import "../../../components/ha-textfield";
import "../../../components/ha-yaml-editor";
import "../../../components/ha-button";
import "../../../components/ha-alert";
import type { HomeAssistant } from "../../../types";
import { formatTime } from "../../../../common/datetime/format_time";
import "../../../../components/ha-card";
import "../../../../components/ha-textfield";
import "../../../../components/ha-yaml-editor";
import "../../../../components/ha-button";
import "../../../../components/ha-alert";
import type { HomeAssistant } from "../../../../types";
@customElement("event-subscribe-card")
class EventSubscribeCard extends LitElement {
@@ -58,17 +58,17 @@ class EventSubscribeCard extends LitElement {
return html`
<ha-card
header=${this.hass!.localize(
"ui.panel.developer-tools.tabs.events.listen_to_events"
"ui.panel.config.developer-tools.tabs.events.listen_to_events"
)}
>
<div class="card-content">
<ha-textfield
.label=${this._subscribed
? this.hass!.localize(
"ui.panel.developer-tools.tabs.events.listening_to"
"ui.panel.config.developer-tools.tabs.events.listening_to"
)
: this.hass!.localize(
"ui.panel.developer-tools.tabs.events.subscribe_to"
"ui.panel.config.developer-tools.tabs.events.subscribe_to"
)}
.disabled=${this._subscribed !== undefined}
.value=${this._eventType}
@@ -76,12 +76,12 @@ class EventSubscribeCard extends LitElement {
></ha-textfield>
<ha-textfield
.label=${this.hass!.localize(
"ui.panel.developer-tools.tabs.events.filter_events"
"ui.panel.config.developer-tools.tabs.events.filter_events"
)}
.value=${this._eventFilter}
.disabled=${this._subscribed !== undefined}
helperPersistent
.helper=${`${this.hass!.localize("ui.panel.developer-tools.tabs.events.filter_helper")}${this._ignoredEventsCount ? ` ${this.hass!.localize("ui.panel.developer-tools.tabs.events.filter_ignored", { count: this._ignoredEventsCount })}` : ""}`}
.helper=${`${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 })}` : ""}`}
@input=${this._filterChanged}
></ha-textfield>
${this._error
@@ -96,10 +96,10 @@ class EventSubscribeCard extends LitElement {
>
${this._subscribed
? this.hass!.localize(
"ui.panel.developer-tools.tabs.events.stop_listening"
"ui.panel.config.developer-tools.tabs.events.stop_listening"
)
: this.hass!.localize(
"ui.panel.developer-tools.tabs.events.start_listening"
"ui.panel.config.developer-tools.tabs.events.start_listening"
)}
</ha-button>
<ha-button
@@ -108,7 +108,7 @@ class EventSubscribeCard extends LitElement {
@click=${this._clearEvents}
>
${this.hass!.localize(
"ui.panel.developer-tools.tabs.events.clear_events"
"ui.panel.config.developer-tools.tabs.events.clear_events"
)}
</ha-button>
</div>
@@ -122,7 +122,7 @@ class EventSubscribeCard extends LitElement {
(event) => html`
<div class="event">
${this.hass!.localize(
"ui.panel.developer-tools.tabs.events.event_fired",
"ui.panel.config.developer-tools.tabs.events.event_fired",
{ name: event.id }
)}
${formatTime(
@@ -216,7 +216,7 @@ class EventSubscribeCard extends LitElement {
}, this._eventType);
} catch (error: any) {
this._error = this.hass!.localize(
"ui.panel.developer-tools.tabs.events.subscribe_failed",
"ui.panel.config.developer-tools.tabs.events.subscribe_failed",
{ error: error.message || "Unknown error" }
);
}

View File

@@ -1,9 +1,9 @@
import type { TemplateResult } from "lit";
import { css, html, LitElement } from "lit";
import { customElement, property } from "lit/decorators";
import { stringCompare } from "../../../common/string/compare";
import { fireEvent } from "../../../common/dom/fire_event";
import type { HomeAssistant } from "../../../types";
import { stringCompare } from "../../../../common/string/compare";
import { fireEvent } from "../../../../common/dom/fire_event";
import type { HomeAssistant } from "../../../../types";
interface EventListenerCount {
event: string;
@@ -27,7 +27,7 @@ class EventsList extends LitElement {
>
<span>
${this.hass.localize(
"ui.panel.developer-tools.tabs.events.count_listeners",
"ui.panel.config.developer-tools.tabs.events.count_listeners",
{
count: event.listener_count,
}

View File

@@ -3,16 +3,16 @@ import type { CSSResultGroup, TemplateResult } from "lit";
import { css, html, LitElement } from "lit";
import { customElement, property } from "lit/decorators";
import { classMap } from "lit/directives/class-map";
import { goBack, navigate } from "../../common/navigate";
import "../../components/ha-dropdown";
import "../../components/ha-dropdown-item";
import "../../components/ha-icon-button";
import "../../components/ha-icon-button-arrow-prev";
import "../../components/ha-menu-button";
import "../../components/ha-tab-group";
import "../../components/ha-tab-group-tab";
import { haStyle } from "../../resources/styles";
import type { HomeAssistant, Route } from "../../types";
import { navigate } from "../../../common/navigate";
import "../../../components/ha-dropdown";
import "../../../components/ha-dropdown-item";
import "../../../components/ha-icon-button";
import "../../../components/ha-icon-button-arrow-prev";
import "../../../components/ha-menu-button";
import "../../../components/ha-tab-group";
import "../../../components/ha-tab-group-tab";
import { haStyle } from "../../../resources/styles";
import type { HomeAssistant, Route } from "../../../types";
import "./developer-tools-router";
@customElement("ha-panel-developer-tools")
@@ -39,7 +39,9 @@ class PanelDeveloperTools extends LitElement {
@click=${this._handleBack}
></ha-icon-button-arrow-prev>
<div class="main-title">
${this.hass.localize("panel.developer_tools")}
${this.hass.localize(
"ui.panel.config.dashboard.developer_tools.main"
)}
</div>
<ha-dropdown slot="actionItems" @wa-select=${this._handleMenuAction}>
<ha-icon-button
@@ -48,27 +50,35 @@ class PanelDeveloperTools extends LitElement {
.path=${mdiDotsVertical}
></ha-icon-button>
<ha-dropdown-item value="debug">
${this.hass.localize("ui.panel.developer-tools.tabs.debug.title")}
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.debug.title"
)}
</ha-dropdown-item>
</ha-dropdown>
</div>
<ha-tab-group @wa-tab-show=${this._handlePageSelected}>
<ha-tab-group-tab slot="nav" panel="yaml" .active=${page === "yaml"}>
${this.hass.localize("ui.panel.developer-tools.tabs.yaml.title")}
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.yaml.title"
)}
</ha-tab-group-tab>
<ha-tab-group-tab
slot="nav"
panel="state"
.active=${page === "state"}
>
${this.hass.localize("ui.panel.developer-tools.tabs.states.title")}
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.states.title"
)}
</ha-tab-group-tab>
<ha-tab-group-tab
slot="nav"
panel="action"
.active=${page === "action"}
>
${this.hass.localize("ui.panel.developer-tools.tabs.actions.title")}
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.actions.title"
)}
</ha-tab-group-tab>
<ha-tab-group-tab
slot="nav"
@@ -76,7 +86,7 @@ class PanelDeveloperTools extends LitElement {
.active=${page === "template"}
>
${this.hass.localize(
"ui.panel.developer-tools.tabs.templates.title"
"ui.panel.config.developer-tools.tabs.templates.title"
)}
</ha-tab-group-tab>
<ha-tab-group-tab
@@ -84,7 +94,9 @@ class PanelDeveloperTools extends LitElement {
panel="event"
.active=${page === "event"}
>
${this.hass.localize("ui.panel.developer-tools.tabs.events.title")}
${this.hass.localize(
"ui.panel.config.developer-tools.tabs.events.title"
)}
</ha-tab-group-tab>
<ha-tab-group-tab
slot="nav"
@@ -92,7 +104,7 @@ class PanelDeveloperTools extends LitElement {
.active=${page === "statistics"}
>
${this.hass.localize(
"ui.panel.developer-tools.tabs.statistics.title"
"ui.panel.config.developer-tools.tabs.statistics.title"
)}
</ha-tab-group-tab>
<ha-tab-group-tab
@@ -117,7 +129,7 @@ class PanelDeveloperTools extends LitElement {
return;
}
if (newPage !== this._page) {
navigate(`/developer-tools/${newPage}`);
navigate(`/config/developer-tools/${newPage}`);
} else {
scrollTo({ behavior: "smooth", top: 0 });
}
@@ -128,7 +140,7 @@ class PanelDeveloperTools extends LitElement {
) {
const action = ev.detail.item.value;
if (action === "debug") {
navigate(`/developer-tools/debug`);
navigate(`/config/developer-tools/debug`);
}
}
@@ -137,7 +149,7 @@ class PanelDeveloperTools extends LitElement {
}
private _handleBack() {
goBack("/config");
navigate("/config");
}
static get styles(): CSSResultGroup {

View File

@@ -9,14 +9,14 @@ import type { RenderItemFunction } from "@lit-labs/virtualizer/virtualize";
import { css, html, LitElement, nothing } from "lit";
import { classMap } from "lit/directives/class-map";
import { customElement, property } from "lit/decorators";
import { fireEvent } from "../../../common/dom/fire_event";
import { loadVirtualizer } from "../../../resources/virtualizer";
import { copyToClipboard } from "../../../common/util/copy-clipboard";
import "../../../components/ha-checkbox";
import "../../../components/ha-svg-icon";
import type { HomeAssistant } from "../../../types";
import { showToast } from "../../../util/toast";
import { haStyle } from "../../../resources/styles";
import { fireEvent } from "../../../../common/dom/fire_event";
import { loadVirtualizer } from "../../../../resources/virtualizer";
import { copyToClipboard } from "../../../../common/util/copy-clipboard";
import "../../../../components/ha-checkbox";
import "../../../../components/ha-svg-icon";
import type { HomeAssistant } from "../../../../types";
import { showToast } from "../../../../util/toast";
import { haStyle } from "../../../../resources/styles";
@customElement("developer-tools-state-renderer")
class HaPanelDevStateRenderer extends LitElement {
@@ -69,21 +69,21 @@ class HaPanelDevStateRenderer extends LitElement {
<div class="header" role="columnheader">
<span class="padded">
${this.hass.localize(
"ui.panel.developer-tools.tabs.states.entity"
"ui.panel.config.developer-tools.tabs.states.entity"
)}
</span>
</div>
<div class="header" role="columnheader">
<span class="padded">
${this.hass.localize(
"ui.panel.developer-tools.tabs.states.state"
"ui.panel.config.developer-tools.tabs.states.state"
)}
</span>
</div>
<div class="header" role="columnheader">
<span class="padded">
${this.hass.localize(
"ui.panel.developer-tools.tabs.states.attributes"
"ui.panel.config.developer-tools.tabs.states.attributes"
)}
</span>
</div>
@@ -105,7 +105,7 @@ class HaPanelDevStateRenderer extends LitElement {
<div class="cell" role="cell" aria-colspan="3">
<span class="padded">
${this.hass.localize(
"ui.panel.developer-tools.tabs.states.no_entities"
"ui.panel.config.developer-tools.tabs.states.no_entities"
)}
</span>
</div>
@@ -152,10 +152,10 @@ class HaPanelDevStateRenderer extends LitElement {
@click=${this._copyEntity}
.entity=${item}
alt=${this.hass.localize(
"ui.panel.developer-tools.tabs.states.copy_id"
"ui.panel.config.developer-tools.tabs.states.copy_id"
)}
title=${this.hass.localize(
"ui.panel.developer-tools.tabs.states.copy_id"
"ui.panel.config.developer-tools.tabs.states.copy_id"
)}
.path=${mdiClipboardTextMultipleOutline}
></ha-svg-icon>
@@ -168,10 +168,10 @@ class HaPanelDevStateRenderer extends LitElement {
@click=${this._entityMoreInfo}
.entity=${item}
alt=${this.hass.localize(
"ui.panel.developer-tools.tabs.states.more_info"
"ui.panel.config.developer-tools.tabs.states.more_info"
)}
title=${this.hass.localize(
"ui.panel.developer-tools.tabs.states.more_info"
"ui.panel.config.developer-tools.tabs.states.more_info"
)}
.path=${mdiInformationOutline}
></ha-svg-icon>

View File

@@ -9,26 +9,26 @@ import type { CSSResultGroup } from "lit";
import { LitElement, css, html, nothing } from "lit";
import { customElement, property, query, state } from "lit/decorators";
import memoizeOne from "memoize-one";
import { formatDateTimeWithSeconds } from "../../../common/datetime/format_date_time";
import { storage } from "../../../common/decorators/storage";
import { escapeRegExp } from "../../../common/string/escape_regexp";
import { copyToClipboard } from "../../../common/util/copy-clipboard";
import "../../../components/entity/ha-entity-picker";
import "../../../components/ha-alert";
import "../../../components/ha-button";
import "../../../components/ha-checkbox";
import "../../../components/ha-expansion-panel";
import "../../../components/ha-icon-button";
import "../../../components/ha-input-helper-text";
import "../../../components/ha-svg-icon";
import "../../../components/ha-tip";
import "../../../components/ha-yaml-editor";
import type { HaYamlEditor } from "../../../components/ha-yaml-editor";
import "../../../components/search-input";
import { showAlertDialog } from "../../../dialogs/generic/show-dialog-box";
import { haStyle } from "../../../resources/styles";
import type { HomeAssistant } from "../../../types";
import { showToast } from "../../../util/toast";
import { formatDateTimeWithSeconds } from "../../../../common/datetime/format_date_time";
import { storage } from "../../../../common/decorators/storage";
import { escapeRegExp } from "../../../../common/string/escape_regexp";
import { copyToClipboard } from "../../../../common/util/copy-clipboard";
import "../../../../components/entity/ha-entity-picker";
import "../../../../components/ha-alert";
import "../../../../components/ha-button";
import "../../../../components/ha-checkbox";
import "../../../../components/ha-expansion-panel";
import "../../../../components/ha-icon-button";
import "../../../../components/ha-input-helper-text";
import "../../../../components/ha-svg-icon";
import "../../../../components/ha-tip";
import "../../../../components/ha-yaml-editor";
import type { HaYamlEditor } from "../../../../components/ha-yaml-editor";
import "../../../../components/search-input";
import { showAlertDialog } from "../../../../dialogs/generic/show-dialog-box";
import { haStyle } from "../../../../resources/styles";
import type { HomeAssistant } from "../../../../types";
import { showToast } from "../../../../util/toast";
import "./developer-tools-state-renderer";
// Use virtualizer after threshold to avoid performance issues
@@ -101,13 +101,13 @@ class HaPanelDevState extends LitElement {
<div class="heading">
<h1>
${this.hass.localize(
"ui.panel.developer-tools.tabs.states.current_entities"
"ui.panel.config.developer-tools.tabs.states.current_entities"
)}
</h1>
${!this.narrow
? html` <ha-formfield
.label=${this.hass.localize(
"ui.panel.developer-tools.tabs.states.attributes"
"ui.panel.config.developer-tools.tabs.states.attributes"
)}
>
<ha-checkbox
@@ -120,7 +120,7 @@ class HaPanelDevState extends LitElement {
</div>
<ha-expansion-panel
.header=${this.hass.localize(
"ui.panel.developer-tools.tabs.states.set_state"
"ui.panel.config.developer-tools.tabs.states.set_state"
)}
outlined
.expanded=${this._expanded}
@@ -128,10 +128,10 @@ class HaPanelDevState extends LitElement {
>
<p>
${this.hass.localize(
"ui.panel.developer-tools.tabs.states.description1"
"ui.panel.config.developer-tools.tabs.states.description1"
)}<br />
${this.hass.localize(
"ui.panel.developer-tools.tabs.states.description2"
"ui.panel.config.developer-tools.tabs.states.description2"
)}
</p>
${this._error
@@ -154,7 +154,7 @@ class HaPanelDevState extends LitElement {
.path=${mdiContentCopy}
@click=${this._copyStateEntity}
title=${this.hass.localize(
"ui.panel.developer-tools.tabs.states.copy_id"
"ui.panel.config.developer-tools.tabs.states.copy_id"
)}
></ha-icon-button>
</div>
@@ -162,7 +162,7 @@ class HaPanelDevState extends LitElement {
: nothing}
<ha-textfield
.label=${this.hass.localize(
"ui.panel.developer-tools.tabs.states.state"
"ui.panel.config.developer-tools.tabs.states.state"
)}
required
autocapitalize="none"
@@ -175,7 +175,7 @@ class HaPanelDevState extends LitElement {
></ha-textfield>
<p>
${this.hass.localize(
"ui.panel.developer-tools.tabs.states.state_attributes"
"ui.panel.config.developer-tools.tabs.states.state_attributes"
)}
</p>
<ha-yaml-editor
@@ -191,7 +191,7 @@ class HaPanelDevState extends LitElement {
.disabled=${!this._validJSON}
raised
>${this.hass.localize(
"ui.panel.developer-tools.tabs.states.set_state"
"ui.panel.config.developer-tools.tabs.states.set_state"
)}</ha-button
>
<ha-icon-button
@@ -206,7 +206,7 @@ class HaPanelDevState extends LitElement {
? html`<p>
<b
>${this.hass.localize(
"ui.panel.developer-tools.tabs.states.last_changed"
"ui.panel.config.developer-tools.tabs.states.last_changed"
)}:</b
><br />
<a href=${this._historyFromLastChanged(this._entity)}
@@ -216,7 +216,7 @@ class HaPanelDevState extends LitElement {
<p>
<b
>${this.hass.localize(
"ui.panel.developer-tools.tabs.states.last_updated"
"ui.panel.config.developer-tools.tabs.states.last_updated"
)}:</b
><br />
<a href=${this._historyFromLastUpdated(this._entity)}
@@ -239,7 +239,7 @@ class HaPanelDevState extends LitElement {
slot="filter-entities"
.hass=${this.hass}
.label=${this.hass.localize(
"ui.panel.developer-tools.tabs.states.filter_entities"
"ui.panel.config.developer-tools.tabs.states.filter_entities"
)}
.value=${this._entityFilter}
@value-changed=${this._entityFilterChanged}
@@ -248,7 +248,7 @@ class HaPanelDevState extends LitElement {
slot="filter-states"
.hass=${this.hass}
.label=${this.hass.localize(
"ui.panel.developer-tools.tabs.states.filter_states"
"ui.panel.config.developer-tools.tabs.states.filter_states"
)}
type="search"
.value=${this._stateFilter}
@@ -258,7 +258,7 @@ class HaPanelDevState extends LitElement {
slot="filter-attributes"
.hass=${this.hass}
.label=${this.hass.localize(
"ui.panel.developer-tools.tabs.states.filter_attributes"
"ui.panel.config.developer-tools.tabs.states.filter_attributes"
)}
type="search"
.value=${this._attributeFilter}
@@ -362,7 +362,7 @@ class HaPanelDevState extends LitElement {
if (!this._entityId) {
showAlertDialog(this, {
text: this.hass.localize(
"ui.panel.developer-tools.tabs.states.alert_entity_field"
"ui.panel.config.developer-tools.tabs.states.alert_entity_field"
),
});
return;

View File

@@ -15,42 +15,42 @@ import { css, type CSSResultGroup, html, LitElement, nothing } from "lit";
import { customElement, property, query, state } from "lit/decorators";
import { classMap } from "lit/directives/class-map";
import memoizeOne from "memoize-one";
import type { HASSDomEvent } from "../../../common/dom/fire_event";
import { fireEvent } from "../../../common/dom/fire_event";
import { computeStateName } from "../../../common/entity/compute_state_name";
import type { LocalizeFunc } from "../../../common/translations/localize";
import "../../../components/chips/ha-assist-chip";
import "../../../components/data-table/ha-data-table";
import type { HASSDomEvent } from "../../../../common/dom/fire_event";
import { fireEvent } from "../../../../common/dom/fire_event";
import { computeStateName } from "../../../../common/entity/compute_state_name";
import type { LocalizeFunc } from "../../../../common/translations/localize";
import "../../../../components/chips/ha-assist-chip";
import "../../../../components/data-table/ha-data-table";
import type {
DataTableColumnContainer,
HaDataTable,
SelectionChangedEvent,
SortingDirection,
} from "../../../components/data-table/ha-data-table";
import { showDataTableSettingsDialog } from "../../../components/data-table/show-dialog-data-table-settings";
} from "../../../../components/data-table/ha-data-table";
import { showDataTableSettingsDialog } from "../../../../components/data-table/show-dialog-data-table-settings";
import "@home-assistant/webawesome/dist/components/divider/divider";
import "../../../components/ha-button";
import "../../../components/ha-dialog";
import "../../../components/ha-dropdown";
import "../../../components/ha-dropdown-item";
import type { HaMdMenu } from "../../../components/ha-md-menu";
import "../../../components/ha-md-menu-item";
import "../../../components/search-input-outlined";
import "../../../../components/ha-button";
import "../../../../components/ha-dialog";
import "../../../../components/ha-dropdown";
import "../../../../components/ha-dropdown-item";
import type { HaMdMenu } from "../../../../components/ha-md-menu";
import "../../../../components/ha-md-menu-item";
import "../../../../components/search-input-outlined";
import type {
StatisticsMetaData,
StatisticsValidationResult,
} from "../../../data/recorder";
} from "../../../../data/recorder";
import {
clearStatistics,
getStatisticIds,
StatisticMeanType,
updateStatisticsIssues,
validateStatistics,
} from "../../../data/recorder";
import { KeyboardShortcutMixin } from "../../../mixins/keyboard-shortcut-mixin";
import { haStyle } from "../../../resources/styles";
import type { HomeAssistant } from "../../../types";
import { showConfirmationDialog } from "../../lovelace/custom-card-helpers";
} from "../../../../data/recorder";
import { KeyboardShortcutMixin } from "../../../../mixins/keyboard-shortcut-mixin";
import { haStyle } from "../../../../resources/styles";
import type { HomeAssistant } from "../../../../types";
import { showConfirmationDialog } from "../../../lovelace/custom-card-helpers";
import { fixStatisticsIssue } from "./fix-statistics";
import { showStatisticsAdjustSumDialog } from "./show-dialog-statistics-adjust-sum";
@@ -139,7 +139,7 @@ class HaPanelDevStatistics extends KeyboardShortcutMixin(LitElement) {
?.map(
(issue) =>
localize(
`ui.panel.developer-tools.tabs.statistics.issues.${issue.type}`,
`ui.panel.config.developer-tools.tabs.statistics.issues.${issue.type}`,
issue.data
) || issue.type
)
@@ -153,7 +153,7 @@ class HaPanelDevStatistics extends KeyboardShortcutMixin(LitElement) {
): DataTableColumnContainer<DisplayedStatisticData> => ({
displayName: {
title: localize(
"ui.panel.developer-tools.tabs.statistics.data_table.name"
"ui.panel.config.developer-tools.tabs.statistics.data_table.name"
),
main: true,
sortable: true,
@@ -162,7 +162,7 @@ class HaPanelDevStatistics extends KeyboardShortcutMixin(LitElement) {
},
statistic_id: {
title: localize(
"ui.panel.developer-tools.tabs.statistics.data_table.statistic_id"
"ui.panel.config.developer-tools.tabs.statistics.data_table.statistic_id"
),
sortable: true,
filterable: true,
@@ -170,7 +170,7 @@ class HaPanelDevStatistics extends KeyboardShortcutMixin(LitElement) {
},
statistics_unit_of_measurement: {
title: localize(
"ui.panel.developer-tools.tabs.statistics.data_table.statistics_unit"
"ui.panel.config.developer-tools.tabs.statistics.data_table.statistics_unit"
),
sortable: true,
filterable: true,
@@ -178,7 +178,7 @@ class HaPanelDevStatistics extends KeyboardShortcutMixin(LitElement) {
},
source: {
title: localize(
"ui.panel.developer-tools.tabs.statistics.data_table.source"
"ui.panel.config.developer-tools.tabs.statistics.data_table.source"
),
sortable: true,
filterable: true,
@@ -186,7 +186,7 @@ class HaPanelDevStatistics extends KeyboardShortcutMixin(LitElement) {
},
issues_string: {
title: localize(
"ui.panel.developer-tools.tabs.statistics.data_table.issue"
"ui.panel.config.developer-tools.tabs.statistics.data_table.issue"
),
sortable: true,
filterable: true,
@@ -195,12 +195,14 @@ class HaPanelDevStatistics extends KeyboardShortcutMixin(LitElement) {
flex: 2,
template: (statistic) =>
html`${statistic.issues_string ??
localize("ui.panel.developer-tools.tabs.statistics.no_issue")}`,
localize(
"ui.panel.config.developer-tools.tabs.statistics.no_issue"
)}`,
},
fix: {
title: "",
label: this.hass.localize(
"ui.panel.developer-tools.tabs.statistics.fix_issue.fix"
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.fix"
),
type: "icon",
template: (statistic) =>
@@ -215,8 +217,8 @@ class HaPanelDevStatistics extends KeyboardShortcutMixin(LitElement) {
statistic.issues.some((issue) =>
FIXABLE_ISSUES.includes(issue.type)
)
? "ui.panel.developer-tools.tabs.statistics.fix_issue.fix"
: "ui.panel.developer-tools.tabs.statistics.fix_issue.info"
? "ui.panel.config.developer-tools.tabs.statistics.fix_issue.fix"
: "ui.panel.config.developer-tools.tabs.statistics.fix_issue.info"
)}
</ha-button>`
: "—"}`,
@@ -226,7 +228,9 @@ class HaPanelDevStatistics extends KeyboardShortcutMixin(LitElement) {
},
actions: {
title: "",
label: localize("ui.panel.developer-tools.tabs.statistics.adjust_sum"),
label: localize(
"ui.panel.config.developer-tools.tabs.statistics.adjust_sum"
),
type: "icon-button",
showNarrow: true,
template: (statistic) =>
@@ -234,7 +238,7 @@ class HaPanelDevStatistics extends KeyboardShortcutMixin(LitElement) {
? html`
<ha-icon-button
.label=${localize(
"ui.panel.developer-tools.tabs.statistics.adjust_sum"
"ui.panel.config.developer-tools.tabs.statistics.adjust_sum"
)}
.path=${mdiSlopeUphill}
.statistic=${statistic}
@@ -347,7 +351,7 @@ class HaPanelDevStatistics extends KeyboardShortcutMixin(LitElement) {
</ha-dropdown-item>
<ha-dropdown-item @click=${this._selectAllIssues}>
${localize(
"ui.panel.developer-tools.tabs.statistics.data_table.select_all_issues"
"ui.panel.config.developer-tools.tabs.statistics.data_table.select_all_issues"
)}
</ha-dropdown-item>
<ha-dropdown-item @click=${this._selectNone}>
@@ -371,7 +375,7 @@ class HaPanelDevStatistics extends KeyboardShortcutMixin(LitElement) {
</div>
<ha-assist-chip
.label=${localize(
"ui.panel.developer-tools.tabs.statistics.delete_selected"
"ui.panel.config.developer-tools.tabs.statistics.delete_selected"
)}
.disabled=${!this._selected.length}
@click=${this._clearSelected}
@@ -397,7 +401,7 @@ class HaPanelDevStatistics extends KeyboardShortcutMixin(LitElement) {
.columns=${columns}
.data=${this._displayData(this._data, this.hass.localize)}
.noDataText=${this.hass.localize(
"ui.panel.developer-tools.tabs.statistics.data_table.no_statistics"
"ui.panel.config.developer-tools.tabs.statistics.data_table.no_statistics"
)}
.filter=${this.filter}
.selectable=${this._selectMode}
@@ -648,10 +652,10 @@ class HaPanelDevStatistics extends KeyboardShortcutMixin(LitElement) {
await showConfirmationDialog(this, {
title: this.hass.localize(
"ui.panel.developer-tools.tabs.statistics.multi_delete.title"
"ui.panel.config.developer-tools.tabs.statistics.multi_delete.title"
),
text: html`${this.hass.localize(
"ui.panel.developer-tools.tabs.statistics.multi_delete.info_text",
"ui.panel.config.developer-tools.tabs.statistics.multi_delete.info_text",
{ statistic_count: deletableIds.length }
)}`,
confirmText: this.hass.localize("ui.common.delete"),

View File

@@ -3,28 +3,31 @@ import type { CSSResultGroup, PropertyValues, TemplateResult } from "lit";
import { css, html, LitElement, nothing } from "lit";
import { customElement, property, state } from "lit/decorators";
import memoizeOne from "memoize-one";
import { formatDateTime } from "../../../common/datetime/format_date_time";
import { fireEvent } from "../../../common/dom/fire_event";
import "../../../components/ha-spinner";
import "../../../components/ha-dialog";
import "../../../components/ha-button";
import "../../../components/ha-form/ha-form";
import "../../../components/ha-icon-next";
import "../../../components/ha-list-item";
import "../../../components/ha-selector/ha-selector-datetime";
import "../../../components/ha-selector/ha-selector-number";
import "../../../components/ha-svg-icon";
import type { StatisticValue } from "../../../data/recorder";
import { formatDateTime } from "../../../../common/datetime/format_date_time";
import { fireEvent } from "../../../../common/dom/fire_event";
import "../../../../components/ha-spinner";
import "../../../../components/ha-dialog";
import "../../../../components/ha-button";
import "../../../../components/ha-form/ha-form";
import "../../../../components/ha-icon-next";
import "../../../../components/ha-list-item";
import "../../../../components/ha-selector/ha-selector-datetime";
import "../../../../components/ha-selector/ha-selector-number";
import "../../../../components/ha-svg-icon";
import type { StatisticValue } from "../../../../data/recorder";
import {
adjustStatisticsSum,
fetchStatistics,
getDisplayUnit,
} from "../../../data/recorder";
import type { DateTimeSelector, NumberSelector } from "../../../data/selector";
import { showAlertDialog } from "../../../dialogs/generic/show-dialog-box";
import { haStyle, haStyleDialog } from "../../../resources/styles";
import type { HomeAssistant } from "../../../types";
import { showToast } from "../../../util/toast";
} from "../../../../data/recorder";
import type {
DateTimeSelector,
NumberSelector,
} from "../../../../data/selector";
import { showAlertDialog } from "../../../../dialogs/generic/show-dialog-box";
import { haStyle, haStyleDialog } from "../../../../resources/styles";
import type { HomeAssistant } from "../../../../types";
import { showToast } from "../../../../util/toast";
import type { DialogStatisticsAdjustSumParams } from "./show-dialog-statistics-adjust-sum";
interface CombinedStat {
@@ -108,7 +111,7 @@ export class DialogStatisticsFixUnsupportedUnitMetadata extends LitElement {
escapeKeyAction
@closed=${this.closeDialog}
.heading=${this.hass.localize(
"ui.panel.developer-tools.tabs.statistics.fix_issue.adjust_sum.title"
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.adjust_sum.title"
)}
>
${content}
@@ -133,7 +136,7 @@ export class DialogStatisticsFixUnsupportedUnitMetadata extends LitElement {
} else if (this._statsHour.length < 1 && this._stats5min.length < 1) {
stats = html`<p>
${this.hass.localize(
"ui.panel.developer-tools.tabs.statistics.fix_issue.adjust_sum.no_statistics_found"
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.adjust_sum.no_statistics_found"
)}
</p>`;
} else {
@@ -172,20 +175,20 @@ export class DialogStatisticsFixUnsupportedUnitMetadata extends LitElement {
return html`
<div class="text-content">
${this.hass.localize(
"ui.panel.developer-tools.tabs.statistics.fix_issue.adjust_sum.info_text_1"
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.adjust_sum.info_text_1"
)}
</div>
<div class="text-content">
<b
>${this.hass.localize(
"ui.panel.developer-tools.tabs.statistics.fix_issue.adjust_sum.statistic"
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.adjust_sum.statistic"
)}</b
>
${this._params!.statistic.statistic_id}
</div>
<ha-selector-datetime
.label=${this.hass.localize(
"ui.panel.developer-tools.tabs.statistics.fix_issue.adjust_sum.pick_a_time"
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.adjust_sum.pick_a_time"
)}
.hass=${this.hass}
.selector=${this._dateTimeSelector}
@@ -199,7 +202,7 @@ export class DialogStatisticsFixUnsupportedUnitMetadata extends LitElement {
@click=${this._fetchOutliers}
>
${this.hass.localize(
"ui.panel.developer-tools.tabs.statistics.fix_issue.adjust_sum.outliers"
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.adjust_sum.outliers"
)}
</ha-button>
<ha-button slot="primaryAction" dialogAction="cancel">
@@ -236,7 +239,7 @@ export class DialogStatisticsFixUnsupportedUnitMetadata extends LitElement {
<div class="text-content">
<b
>${this.hass.localize(
"ui.panel.developer-tools.tabs.statistics.fix_issue.adjust_sum.statistic"
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.adjust_sum.statistic"
)}</b
>
${this._params!.statistic.statistic_id}
@@ -245,7 +248,7 @@ export class DialogStatisticsFixUnsupportedUnitMetadata extends LitElement {
<div class="table-row">
<span
>${this.hass.localize(
"ui.panel.developer-tools.tabs.statistics.fix_issue.adjust_sum.start"
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.adjust_sum.start"
)}</span
>
<span
@@ -260,7 +263,7 @@ export class DialogStatisticsFixUnsupportedUnitMetadata extends LitElement {
<div class="table-row">
<span
>${this.hass.localize(
"ui.panel.developer-tools.tabs.statistics.fix_issue.adjust_sum.end"
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.adjust_sum.end"
)}</span
>
<span
@@ -274,7 +277,7 @@ export class DialogStatisticsFixUnsupportedUnitMetadata extends LitElement {
<ha-selector-number
.label=${this.hass.localize(
"ui.panel.developer-tools.tabs.statistics.fix_issue.adjust_sum.new_value"
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.adjust_sum.new_value"
)}
.hass=${this.hass}
.selector=${this._amountSelector(unit || undefined)}
@@ -297,7 +300,7 @@ export class DialogStatisticsFixUnsupportedUnitMetadata extends LitElement {
@click=${this._fixIssue}
>
${this.hass.localize(
"ui.panel.developer-tools.tabs.statistics.fix_issue.adjust_sum.adjust"
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.adjust_sum.adjust"
)}</ha-button
>
`;
@@ -470,7 +473,7 @@ export class DialogStatisticsFixUnsupportedUnitMetadata extends LitElement {
this._busy = false;
showAlertDialog(this, {
text: this.hass.localize(
"ui.panel.developer-tools.tabs.statistics.fix_issue.adjust_sum.error_sum_adjusted",
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.adjust_sum.error_sum_adjusted",
{ message: err.message || err }
),
});
@@ -478,7 +481,7 @@ export class DialogStatisticsFixUnsupportedUnitMetadata extends LitElement {
}
showToast(this, {
message: this.hass.localize(
"ui.panel.developer-tools.tabs.statistics.fix_issue.adjust_sum.sum_adjusted"
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.adjust_sum.sum_adjusted"
),
});
this.closeDialog();

View File

@@ -1,18 +1,18 @@
import type { CSSResultGroup } from "lit";
import { html, LitElement, nothing } from "lit";
import { customElement, property, state } from "lit/decorators";
import { fireEvent } from "../../../common/dom/fire_event";
import "../../../components/ha-dialog";
import "../../../components/ha-button";
import "../../../components/ha-formfield";
import "../../../components/ha-radio";
import { fireEvent } from "../../../../common/dom/fire_event";
import "../../../../components/ha-dialog";
import "../../../../components/ha-button";
import "../../../../components/ha-formfield";
import "../../../../components/ha-radio";
import {
clearStatistics,
getStatisticLabel,
updateStatisticsMetadata,
} from "../../../data/recorder";
import { haStyle, haStyleDialog } from "../../../resources/styles";
import type { HomeAssistant } from "../../../types";
} from "../../../../data/recorder";
import { haStyle, haStyleDialog } from "../../../../resources/styles";
import type { HomeAssistant } from "../../../../types";
import type { DialogStatisticsUnitsChangedParams } from "./show-dialog-statistics-fix-units-changed";
@customElement("dialog-statistics-fix-units-changed")
@@ -50,12 +50,12 @@ export class DialogStatisticsFixUnitsChanged extends LitElement {
escapeKeyAction
@closed=${this._closeDialog}
.heading=${this.hass.localize(
"ui.panel.developer-tools.tabs.statistics.fix_issue.units_changed.title"
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.units_changed.title"
)}
>
<p>
${this.hass.localize(
"ui.panel.developer-tools.tabs.statistics.fix_issue.units_changed.info_text_1",
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.units_changed.info_text_1",
{
name: getStatisticLabel(
this.hass,
@@ -68,21 +68,21 @@ export class DialogStatisticsFixUnitsChanged extends LitElement {
}
)}<br />
${this.hass.localize(
"ui.panel.developer-tools.tabs.statistics.fix_issue.units_changed.info_text_2"
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.units_changed.info_text_2"
)}<br />
${this.hass.localize(
"ui.panel.developer-tools.tabs.statistics.fix_issue.units_changed.info_text_3"
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.units_changed.info_text_3"
)}
</p>
<h3>
${this.hass.localize(
"ui.panel.developer-tools.tabs.statistics.fix_issue.units_changed.how_to_fix"
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.units_changed.how_to_fix"
)}
</h3>
<ha-formfield
.label=${this.hass.localize(
"ui.panel.developer-tools.tabs.statistics.fix_issue.units_changed.update",
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.units_changed.update",
this._params.issue.data
)}
>
@@ -96,7 +96,7 @@ export class DialogStatisticsFixUnitsChanged extends LitElement {
</ha-formfield>
<ha-formfield
.label=${this.hass.localize(
`ui.panel.developer-tools.tabs.statistics.fix_issue.units_changed.clear`
`ui.panel.config.developer-tools.tabs.statistics.fix_issue.units_changed.clear`
)}
>
<ha-radio
@@ -116,7 +116,7 @@ export class DialogStatisticsFixUnitsChanged extends LitElement {
</ha-button>
<ha-button slot="primaryAction" @click=${this._fixIssue}>
${this.hass.localize(
"ui.panel.developer-tools.tabs.statistics.fix_issue.fix"
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.fix"
)}
</ha-button>
</ha-dialog>

View File

@@ -1,15 +1,15 @@
import type { CSSResultGroup } from "lit";
import { html, LitElement, nothing } from "lit";
import { customElement, property, state } from "lit/decorators";
import { fireEvent } from "../../../common/dom/fire_event";
import "../../../components/ha-button";
import "../../../components/ha-dialog";
import "../../../components/ha-spinner";
import { clearStatistics, getStatisticLabel } from "../../../data/recorder";
import { haStyle, haStyleDialog } from "../../../resources/styles";
import type { HomeAssistant } from "../../../types";
import { documentationUrl } from "../../../util/documentation-url";
import { showAlertDialog } from "../../lovelace/custom-card-helpers";
import { fireEvent } from "../../../../common/dom/fire_event";
import "../../../../components/ha-button";
import "../../../../components/ha-dialog";
import "../../../../components/ha-spinner";
import { clearStatistics, getStatisticLabel } from "../../../../data/recorder";
import { haStyle, haStyleDialog } from "../../../../resources/styles";
import type { HomeAssistant } from "../../../../types";
import { documentationUrl } from "../../../../util/documentation-url";
import { showAlertDialog } from "../../../lovelace/custom-card-helpers";
import type { DialogStatisticsFixParams } from "./show-dialog-statistics-fix";
@customElement("dialog-statistics-fix")
@@ -48,12 +48,12 @@ export class DialogStatisticsFix extends LitElement {
escapeKeyAction
@closed=${this._closeDialog}
.heading=${this.hass.localize(
`ui.panel.developer-tools.tabs.statistics.fix_issue.${issue.type}.title`
`ui.panel.config.developer-tools.tabs.statistics.fix_issue.${issue.type}.title`
)}
>
<p>
${this.hass.localize(
`ui.panel.developer-tools.tabs.statistics.fix_issue.${issue.type}.info_text_1`,
`ui.panel.config.developer-tools.tabs.statistics.fix_issue.${issue.type}.info_text_1`,
{
name: getStatisticLabel(
this.hass,
@@ -64,23 +64,23 @@ export class DialogStatisticsFix extends LitElement {
...(issue.type === "mean_type_changed"
? {
metadata_mean_type: this.hass.localize(
`ui.panel.developer-tools.tabs.statistics.mean_type.${issue.data.metadata_mean_type}`
`ui.panel.config.developer-tools.tabs.statistics.mean_type.${issue.data.metadata_mean_type}`
),
state_mean_type: this.hass.localize(
`ui.panel.developer-tools.tabs.statistics.mean_type.${issue.data.state_mean_type}`
`ui.panel.config.developer-tools.tabs.statistics.mean_type.${issue.data.state_mean_type}`
),
}
: {}),
}
)}<br /><br />
${this.hass.localize(
`ui.panel.developer-tools.tabs.statistics.fix_issue.${issue.type}.info_text_2`,
`ui.panel.config.developer-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.developer-tools.tabs.statistics.fix_issue.mean_type_changed.info_text_3",
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.mean_type_changed.info_text_3",
{ statistic_id: issue.data.statistic_id }
)}`
: issue.type === "entity_not_recorded"
@@ -94,7 +94,7 @@ export class DialogStatisticsFix extends LitElement {
rel="noreferrer noopener"
>
${this.hass.localize(
"ui.panel.developer-tools.tabs.statistics.fix_issue.entity_not_recorded.info_text_3_link"
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.entity_not_recorded.info_text_3_link"
)}</a
>`
: issue.type === "entity_no_longer_recorded"
@@ -107,22 +107,22 @@ export class DialogStatisticsFix extends LitElement {
rel="noreferrer noopener"
>
${this.hass.localize(
"ui.panel.developer-tools.tabs.statistics.fix_issue.entity_no_longer_recorded.info_text_3_link"
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.entity_no_longer_recorded.info_text_3_link"
)}</a
><br /><br />
${this.hass.localize(
"ui.panel.developer-tools.tabs.statistics.fix_issue.entity_no_longer_recorded.info_text_4"
"ui.panel.config.developer-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.developer-tools.tabs.statistics.fix_issue.state_class_removed.info_text_3"
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.state_class_removed.info_text_3"
)}
</li>
<li>
${this.hass.localize(
"ui.panel.developer-tools.tabs.statistics.fix_issue.state_class_removed.info_text_4"
"ui.panel.config.developer-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"
@@ -130,18 +130,18 @@ export class DialogStatisticsFix extends LitElement {
rel="noreferrer noopener"
>
${this.hass.localize(
"ui.panel.developer-tools.tabs.statistics.fix_issue.state_class_removed.info_text_4_link"
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.state_class_removed.info_text_4_link"
)}</a
>
</li>
<li>
${this.hass.localize(
"ui.panel.developer-tools.tabs.statistics.fix_issue.state_class_removed.info_text_5"
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.state_class_removed.info_text_5"
)}
</li>
</ul>
${this.hass.localize(
"ui.panel.developer-tools.tabs.statistics.fix_issue.state_class_removed.info_text_6",
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.state_class_removed.info_text_6",
{ statistic_id: issue.data.statistic_id }
)}`
: nothing}
@@ -185,15 +185,15 @@ export class DialogStatisticsFix extends LitElement {
title:
err.code === "timeout"
? this.hass.localize(
"ui.panel.developer-tools.tabs.statistics.fix_issue.clearing_timeout_title"
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.clearing_timeout_title"
)
: this.hass.localize(
"ui.panel.developer-tools.tabs.statistics.fix_issue.clearing_failed"
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.clearing_failed"
),
text:
err.code === "timeout"
? this.hass.localize(
"ui.panel.developer-tools.tabs.statistics.fix_issue.clearing_timeout_text"
"ui.panel.config.developer-tools.tabs.statistics.fix_issue.clearing_timeout_text"
)
: err.message,
});

View File

@@ -1,4 +1,4 @@
import type { StatisticsValidationResult } from "../../../data/recorder";
import type { StatisticsValidationResult } from "../../../../data/recorder";
import { showFixStatisticsDialog } from "./show-dialog-statistics-fix";
import { showFixStatisticsUnitsChangedDialog } from "./show-dialog-statistics-fix-units-changed";

View File

@@ -1,5 +1,5 @@
import { fireEvent } from "../../../common/dom/fire_event";
import type { StatisticsMetaData } from "../../../data/recorder";
import { fireEvent } from "../../../../common/dom/fire_event";
import type { StatisticsMetaData } from "../../../../data/recorder";
export const loadAdjustSumDialog = () =>
import("./dialog-statistics-adjust-sum");

View File

@@ -1,5 +1,5 @@
import { fireEvent } from "../../../common/dom/fire_event";
import type { StatisticsValidationResultUnitsChanged } from "../../../data/recorder";
import { fireEvent } from "../../../../common/dom/fire_event";
import type { StatisticsValidationResultUnitsChanged } from "../../../../data/recorder";
export const loadFixUnitsDialog = () =>
import("./dialog-statistics-fix-units-changed");

View File

@@ -1,5 +1,5 @@
import { fireEvent } from "../../../common/dom/fire_event";
import type { StatisticsValidationResult } from "../../../data/recorder";
import { fireEvent } from "../../../../common/dom/fire_event";
import type { StatisticsValidationResult } from "../../../../data/recorder";
export const loadFixDialog = () => import("./dialog-statistics-fix");

View File

@@ -3,18 +3,18 @@ import type { CSSResultGroup } from "lit";
import { css, html, LitElement, nothing } from "lit";
import { customElement, property, state } from "lit/decorators";
import { classMap } from "lit/directives/class-map";
import { debounce } from "../../../common/util/debounce";
import "../../../components/ha-alert";
import "../../../components/ha-button";
import "../../../components/ha-card";
import "../../../components/ha-code-editor";
import "../../../components/ha-spinner";
import type { RenderTemplateResult } from "../../../data/ws-templates";
import { subscribeRenderTemplate } from "../../../data/ws-templates";
import { showConfirmationDialog } from "../../../dialogs/generic/show-dialog-box";
import { haStyle } from "../../../resources/styles";
import type { HomeAssistant } from "../../../types";
import { documentationUrl } from "../../../util/documentation-url";
import { debounce } from "../../../../common/util/debounce";
import "../../../../components/ha-alert";
import "../../../../components/ha-button";
import "../../../../components/ha-card";
import "../../../../components/ha-code-editor";
import "../../../../components/ha-spinner";
import type { RenderTemplateResult } from "../../../../data/ws-templates";
import { subscribeRenderTemplate } from "../../../../data/ws-templates";
import { showConfirmationDialog } from "../../../../dialogs/generic/show-dialog-box";
import { haStyle } from "../../../../resources/styles";
import type { HomeAssistant } from "../../../../types";
import { documentationUrl } from "../../../../util/documentation-url";
const DEMO_TEMPLATE = `{## Imitate available variables: ##}
{% set my_test_json = {
@@ -92,7 +92,7 @@ class HaPanelDevTemplate extends LitElement {
<div class="description">
<p>
${this.hass.localize(
"ui.panel.developer-tools.tabs.templates.description"
"ui.panel.config.developer-tools.tabs.templates.description"
)}
</p>
<ul>
@@ -102,7 +102,7 @@ class HaPanelDevTemplate extends LitElement {
target="_blank"
rel="noreferrer"
>${this.hass.localize(
"ui.panel.developer-tools.tabs.templates.jinja_documentation"
"ui.panel.config.developer-tools.tabs.templates.jinja_documentation"
)}
</a>
</li>
@@ -116,7 +116,7 @@ class HaPanelDevTemplate extends LitElement {
rel="noreferrer"
>
${this.hass.localize(
"ui.panel.developer-tools.tabs.templates.template_extensions"
"ui.panel.config.developer-tools.tabs.templates.template_extensions"
)}</a
>
</li>
@@ -132,7 +132,7 @@ class HaPanelDevTemplate extends LitElement {
<ha-card
class="edit-pane"
header=${this.hass.localize(
"ui.panel.developer-tools.tabs.templates.editor"
"ui.panel.config.developer-tools.tabs.templates.editor"
)}
>
<div class="card-content">
@@ -151,7 +151,7 @@ class HaPanelDevTemplate extends LitElement {
<div class="card-actions">
<ha-button appearance="plain" @click=${this._restoreDemo}>
${this.hass.localize(
"ui.panel.developer-tools.tabs.templates.reset"
"ui.panel.config.developer-tools.tabs.templates.reset"
)}
</ha-button>
<ha-button appearance="plain" @click=${this._clear}>
@@ -163,7 +163,7 @@ class HaPanelDevTemplate extends LitElement {
<ha-card
class="render-pane"
header=${this.hass.localize(
"ui.panel.developer-tools.tabs.templates.result"
"ui.panel.config.developer-tools.tabs.templates.result"
)}
>
<div class="card-content">
@@ -191,7 +191,7 @@ ${type === "object"
>
<p>
${this.hass.localize(
"ui.panel.developer-tools.tabs.templates.result_type"
"ui.panel.config.developer-tools.tabs.templates.result_type"
)}:
${resultType}
</p>
@@ -199,7 +199,7 @@ ${type === "object"
? html`
<p>
${this.hass.localize(
"ui.panel.developer-tools.tabs.templates.time"
"ui.panel.config.developer-tools.tabs.templates.time"
)}
</p>
`
@@ -210,7 +210,7 @@ ${type === "object"
? html`
<p class="all_listeners">
${this.hass.localize(
"ui.panel.developer-tools.tabs.templates.all_listeners"
"ui.panel.config.developer-tools.tabs.templates.all_listeners"
)}
</p>
`
@@ -219,7 +219,7 @@ ${type === "object"
? html`
<p>
${this.hass.localize(
"ui.panel.developer-tools.tabs.templates.listeners"
"ui.panel.config.developer-tools.tabs.templates.listeners"
)}
</p>
<ul>
@@ -230,7 +230,7 @@ ${type === "object"
<li>
<b
>${this.hass.localize(
"ui.panel.developer-tools.tabs.templates.domain"
"ui.panel.config.developer-tools.tabs.templates.domain"
)}</b
>: ${domain}
</li>
@@ -243,7 +243,7 @@ ${type === "object"
<li>
<b
>${this.hass.localize(
"ui.panel.developer-tools.tabs.templates.entity"
"ui.panel.config.developer-tools.tabs.templates.entity"
)}</b
>: ${entity_id}
</li>
@@ -254,7 +254,7 @@ ${type === "object"
: !this._templateResult.listeners.time
? html`<span class="all_listeners">
${this.hass.localize(
"ui.panel.developer-tools.tabs.templates.no_listeners"
"ui.panel.config.developer-tools.tabs.templates.no_listeners"
)}
</span>`
: nothing}`
@@ -457,7 +457,7 @@ ${type === "object"
if (
!(await showConfirmationDialog(this, {
text: this.hass.localize(
"ui.panel.developer-tools.tabs.templates.confirm_reset"
"ui.panel.config.developer-tools.tabs.templates.confirm_reset"
),
warning: true,
}))
@@ -473,7 +473,7 @@ ${type === "object"
if (
!(await showConfirmationDialog(this, {
text: this.hass.localize(
"ui.panel.developer-tools.tabs.templates.confirm_clear"
"ui.panel.config.developer-tools.tabs.templates.confirm_clear"
),
warning: true,
}))

View File

@@ -1,22 +1,22 @@
import type { CSSResultGroup, TemplateResult } from "lit";
import { css, html, LitElement, nothing } from "lit";
import { customElement, property, state } from "lit/decorators";
import { componentsWithService } from "../../../common/config/components_with_service";
import { stringCompare } from "../../../common/string/compare";
import "../../../components/buttons/ha-call-service-button";
import "../../../components/ha-alert";
import "../../../components/ha-button";
import "../../../components/ha-card";
import "../../../components/ha-spinner";
import type { CheckConfigResult } from "../../../data/core";
import { checkCoreConfig } from "../../../data/core";
import { domainToName } from "../../../data/integration";
import { showRestartDialog } from "../../../dialogs/restart/show-dialog-restart";
import { haStyle } from "../../../resources/styles";
import type { HomeAssistant, Route, TranslationDict } from "../../../types";
import { componentsWithService } from "../../../../common/config/components_with_service";
import { stringCompare } from "../../../../common/string/compare";
import "../../../../components/buttons/ha-call-service-button";
import "../../../../components/ha-alert";
import "../../../../components/ha-button";
import "../../../../components/ha-card";
import "../../../../components/ha-spinner";
import type { CheckConfigResult } from "../../../../data/core";
import { checkCoreConfig } from "../../../../data/core";
import { domainToName } from "../../../../data/integration";
import { showRestartDialog } from "../../../../dialogs/restart/show-dialog-restart";
import { haStyle } from "../../../../resources/styles";
import type { HomeAssistant, Route, TranslationDict } from "../../../../types";
type ReloadableDomain = Exclude<
keyof TranslationDict["ui"]["panel"]["developer-tools"]["tabs"]["yaml"]["section"]["reloading"],
keyof TranslationDict["ui"]["panel"]["config"]["developer-tools"]["tabs"]["yaml"]["section"]["reloading"],
"heading" | "introduction" | "reload"
>;
@@ -63,10 +63,10 @@ export class DeveloperYamlConfig extends LitElement {
domain,
name:
this.hass.localize(
`ui.panel.developer-tools.tabs.yaml.section.reloading.${domain}`
`ui.panel.config.developer-tools.tabs.yaml.section.reloading.${domain}`
) ||
this.hass.localize(
"ui.panel.developer-tools.tabs.yaml.section.reloading.reload",
"ui.panel.config.developer-tools.tabs.yaml.section.reloading.reload",
{ domain: domainToName(this.hass.localize, domain) }
),
}))
@@ -82,12 +82,12 @@ export class DeveloperYamlConfig extends LitElement {
<ha-card
outlined
header=${this.hass.localize(
"ui.panel.developer-tools.tabs.yaml.section.validation.heading"
"ui.panel.config.developer-tools.tabs.yaml.section.validation.heading"
)}
>
<div class="card-content">
${this.hass.localize(
"ui.panel.developer-tools.tabs.yaml.section.validation.introduction"
"ui.panel.config.developer-tools.tabs.yaml.section.validation.introduction"
)}
${!this._validateResult
? this._validating
@@ -104,10 +104,10 @@ export class DeveloperYamlConfig extends LitElement {
${
this._validateResult.result === "valid"
? this.hass.localize(
"ui.panel.developer-tools.tabs.yaml.section.validation.valid"
"ui.panel.config.developer-tools.tabs.yaml.section.validation.valid"
)
: this.hass.localize(
"ui.panel.developer-tools.tabs.yaml.section.validation.invalid"
"ui.panel.config.developer-tools.tabs.yaml.section.validation.invalid"
)
}
</div>
@@ -117,7 +117,7 @@ export class DeveloperYamlConfig extends LitElement {
? html`<ha-alert
alert-type="error"
.title=${this.hass.localize(
"ui.panel.developer-tools.tabs.yaml.section.validation.errors"
"ui.panel.config.developer-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.developer-tools.tabs.yaml.section.validation.warnings"
"ui.panel.config.developer-tools.tabs.yaml.section.validation.warnings"
)}
>
<!-- prettier-ignore -->
@@ -146,7 +146,7 @@ export class DeveloperYamlConfig extends LitElement {
<div class="card-actions">
<ha-button appearance="plain" @click=${this._validateConfig}>
${this.hass.localize(
"ui.panel.developer-tools.tabs.yaml.section.validation.check_config"
"ui.panel.config.developer-tools.tabs.yaml.section.validation.check_config"
)}
</ha-button>
<ha-button
@@ -156,7 +156,7 @@ export class DeveloperYamlConfig extends LitElement {
.disabled=${this._validateResult?.result === "invalid"}
>
${this.hass.localize(
"ui.panel.developer-tools.tabs.yaml.section.server_management.restart"
"ui.panel.config.developer-tools.tabs.yaml.section.server_management.restart"
)}
</ha-button>
</div>
@@ -164,12 +164,12 @@ export class DeveloperYamlConfig extends LitElement {
<ha-card
outlined
header=${this.hass.localize(
"ui.panel.developer-tools.tabs.yaml.section.reloading.heading"
"ui.panel.config.developer-tools.tabs.yaml.section.reloading.heading"
)}
>
<div class="card-content">
${this.hass.localize(
"ui.panel.developer-tools.tabs.yaml.section.reloading.introduction"
"ui.panel.config.developer-tools.tabs.yaml.section.reloading.introduction"
)}
</div>
<div class="card-actions">
@@ -178,7 +178,7 @@ export class DeveloperYamlConfig extends LitElement {
domain="homeassistant"
service="reload_all"
>${this.hass.localize(
"ui.panel.developer-tools.tabs.yaml.section.reloading.all"
"ui.panel.config.developer-tools.tabs.yaml.section.reloading.all"
)}
</ha-call-service-button>
</div>
@@ -188,7 +188,7 @@ export class DeveloperYamlConfig extends LitElement {
domain="homeassistant"
service="reload_core_config"
>${this.hass.localize(
"ui.panel.developer-tools.tabs.yaml.section.reloading.core"
"ui.panel.config.developer-tools.tabs.yaml.section.reloading.core"
)}
</ha-call-service-button>
</div>

View File

@@ -198,7 +198,7 @@ export const configSections: Record<string, PageNavigation[]> = {
core: true,
},
{
path: "/developer-tools",
path: "/config/developer-tools",
translationKey: "developer_tools",
iconPath: mdiHammer,
iconColor: "#7A5AA6",
@@ -517,6 +517,11 @@ class HaPanelConfig extends SubscribeMixin(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"),
cache: true,
},
logs: {
tag: "ha-config-logs",
load: () => import("./logs/ha-config-logs"),

View File

@@ -12,7 +12,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 "../developer-tools/statistics/fix-statistics";
import { showRepairsFlowDialog } from "./show-dialog-repair-flow";
import { showRepairsIssueDialog } from "./show-repair-issue-dialog";
import type { StatisticsValidationResult } from "../../../data/recorder";

View File

@@ -26,34 +26,34 @@ export const getMyRedirects = (): Redirects => ({
redirect: "/config/application_credentials",
},
developer_assist: {
redirect: "/developer-tools/assist",
redirect: "/config/developer-tools/assist",
},
developer_debug: {
redirect: "/developer-tools/debug",
redirect: "/config/developer-tools/debug",
},
developer_states: {
redirect: "/developer-tools/state",
redirect: "/config/developer-tools/state",
},
developer_services: {
redirect: "/developer-tools/action",
redirect: "/config/developer-tools/action",
},
developer_call_service: {
redirect: "/developer-tools/action",
redirect: "/config/developer-tools/action",
params: {
service: "string",
},
},
developer_template: {
redirect: "/developer-tools/template",
redirect: "/config/developer-tools/template",
},
developer_events: {
redirect: "/developer-tools/event",
redirect: "/config/developer-tools/event",
},
developer_statistics: {
redirect: "/developer-tools/statistics",
redirect: "/config/developer-tools/statistics",
},
server_controls: {
redirect: "/developer-tools/yaml",
redirect: "/config/developer-tools/yaml",
},
calendar: {
component: "calendar",

View File

@@ -9,7 +9,6 @@
"logbook": "Activity",
"history": "History",
"todo": "To-do lists",
"developer_tools": "Developer tools",
"media_browser": "Media",
"profile": "Profile",
"light": "Lights",
@@ -1368,45 +1367,45 @@
"navigate_title": "Navigate",
"commands": {
"reload": {
"all": "[%key:ui::panel::developer-tools::tabs::yaml::section::reloading::all%]",
"reload": "[%key:ui::panel::developer-tools::tabs::yaml::section::reloading::reload%]",
"core": "[%key:ui::panel::developer-tools::tabs::yaml::section::reloading::core%]",
"group": "[%key:ui::panel::developer-tools::tabs::yaml::section::reloading::group%]",
"automation": "[%key:ui::panel::developer-tools::tabs::yaml::section::reloading::automation%]",
"script": "[%key:ui::panel::developer-tools::tabs::yaml::section::reloading::script%]",
"scene": "[%key:ui::panel::developer-tools::tabs::yaml::section::reloading::scene%]",
"person": "[%key:ui::panel::developer-tools::tabs::yaml::section::reloading::person%]",
"zone": "[%key:ui::panel::developer-tools::tabs::yaml::section::reloading::zone%]",
"input_boolean": "[%key:ui::panel::developer-tools::tabs::yaml::section::reloading::input_boolean%]",
"input_button": "[%key:ui::panel::developer-tools::tabs::yaml::section::reloading::input_button%]",
"input_text": "[%key:ui::panel::developer-tools::tabs::yaml::section::reloading::input_text%]",
"input_number": "[%key:ui::panel::developer-tools::tabs::yaml::section::reloading::input_number%]",
"input_datetime": "[%key:ui::panel::developer-tools::tabs::yaml::section::reloading::input_datetime%]",
"input_select": "[%key:ui::panel::developer-tools::tabs::yaml::section::reloading::input_select%]",
"template": "[%key:ui::panel::developer-tools::tabs::yaml::section::reloading::template%]",
"universal": "[%key:ui::panel::developer-tools::tabs::yaml::section::reloading::universal%]",
"rest": "[%key:ui::panel::developer-tools::tabs::yaml::section::reloading::rest%]",
"command_line": "[%key:ui::panel::developer-tools::tabs::yaml::section::reloading::command_line%]",
"filter": "[%key:ui::panel::developer-tools::tabs::yaml::section::reloading::filter%]",
"statistics": "[%key:ui::panel::developer-tools::tabs::yaml::section::reloading::statistics%]",
"generic": "[%key:ui::panel::developer-tools::tabs::yaml::section::reloading::generic%]",
"generic_thermostat": "[%key:ui::panel::developer-tools::tabs::yaml::section::reloading::generic_thermostat%]",
"homekit": "[%key:ui::panel::developer-tools::tabs::yaml::section::reloading::homekit%]",
"min_max": "[%key:ui::panel::developer-tools::tabs::yaml::section::reloading::min_max%]",
"history_stats": "[%key:ui::panel::developer-tools::tabs::yaml::section::reloading::history_stats%]",
"trend": "[%key:ui::panel::developer-tools::tabs::yaml::section::reloading::trend%]",
"ping": "[%key:ui::panel::developer-tools::tabs::yaml::section::reloading::ping%]",
"filesize": "[%key:ui::panel::developer-tools::tabs::yaml::section::reloading::filesize%]",
"telegram": "[%key:ui::panel::developer-tools::tabs::yaml::section::reloading::telegram%]",
"smtp": "[%key:ui::panel::developer-tools::tabs::yaml::section::reloading::smtp%]",
"mqtt": "[%key:ui::panel::developer-tools::tabs::yaml::section::reloading::mqtt%]",
"rpi_gpio": "[%key:ui::panel::developer-tools::tabs::yaml::section::reloading::rpi_gpio%]",
"themes": "[%key:ui::panel::developer-tools::tabs::yaml::section::reloading::themes%]"
"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%]"
},
"server_control": {
"perform_action": "{action} server",
"restart": "[%key:ui::panel::developer-tools::tabs::yaml::section::server_management::restart%]",
"stop": "[%key:ui::panel::developer-tools::tabs::yaml::section::server_management::stop%]"
"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%]"
},
"types": {
"reload": "Reload",
@@ -1440,7 +1439,7 @@
"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::developer-tools::tabs::yaml::title%]",
"server_control": "[%key:ui::panel::config::developer-tools::tabs::yaml::title%]",
"system": "[%key:ui::panel::config::dashboard::system::main%]",
"app_dashboard": "App dashboard",
"app_store": "App store",
@@ -1928,12 +1927,12 @@
"data": "Additional data"
},
"template": {
"time": "[%key:ui::panel::developer-tools::tabs::templates::time%]",
"all_listeners": "[%key:ui::panel::developer-tools::tabs::templates::all_listeners%]",
"no_listeners": "[%key:ui::panel::developer-tools::tabs::templates::no_listeners%]",
"listeners": "[%key:ui::panel::developer-tools::tabs::templates::listeners%]",
"entity": "[%key:ui::panel::developer-tools::tabs::templates::entity%]",
"domain": "[%key:ui::panel::developer-tools::tabs::templates::domain%]"
"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%]"
}
},
"options_flow": {
@@ -3436,6 +3435,289 @@
"companion_apps": "Companion apps"
}
},
"developer-tools": {
"tabs": {
"assist": {
"title": "Sentences parser",
"description": "Enter sentences and see how they will be parsed by Home Assistant. Each line will be processed as an individual sentence. Intents will not be executed on your instance.",
"parse_sentences": "Parse sentences",
"sentences": "Sentences",
"download_results": "Download results",
"no_match": "No intent matched",
"language": "[%key:ui::components::language-picker::language%]"
},
"debug": {
"title": "Debug tools",
"debug_connection": {
"title": "Debug connection",
"description": "Observe requests to the server and responses from the server in browser console."
},
"entity_diagnostic": {
"title": "Entity diagnostic",
"description": "Select an entity to copy diagnostic details.",
"copy_to_clipboard": "[%key:ui::panel::config::automation::editor::copy_to_clipboard%]"
}
},
"events": {
"title": "Events",
"description": "Fire an event on the event bus.",
"documentation": "Events documentation",
"type": "Event type",
"data": "Event data (YAML, optional)",
"fire_event": "Fire event",
"event_fired": "Event {name} fired",
"active_listeners": "Active listeners",
"count_listeners": "({count} {count, plural,\n one {listener}\n other {listeners}\n})",
"listen_to_events": "Listen to events",
"filter_events": "Filter events",
"filter_helper": "Only capture events containing the filter string.",
"filter_ignored": "Ignored {count} events.",
"listening_to": "Listening to",
"subscribe_to": "Event to subscribe to",
"start_listening": "Start listening",
"stop_listening": "Stop listening",
"clear_events": "Clear events",
"alert_event_type": "Event type is a mandatory field",
"notification_event_fired": "Event {type} successfully fired!",
"subscribe_failed": "Failed to subscribe to event: {error}"
},
"actions": {
"title": "Actions",
"description": "The actions dev tool allows you to perform any action available in Home Assistant.",
"call_service": "Perform action",
"response": "Response",
"column_parameter": "Parameter",
"column_description": "Description",
"column_example": "Example",
"fill_example_data": "Fill example data",
"yaml_mode": "Go to YAML mode",
"ui_mode": "Go to UI mode",
"yaml_parameters": "Parameters only available in YAML mode",
"all_parameters": "All available parameters",
"accepts_target": "This action accepts a target, for example: `entity_id: light.bed_light`",
"no_template_ui_support": "The UI does not support templates, you can still use the YAML editor.",
"copy_clipboard_template": "Copy to clipboard as template",
"open_media": "Open media",
"errors": {
"ui": {
"no_action": "No action selected, please select an action",
"invalid_action": "Selected action is invalid, please select a valid action",
"no_target": "This action requires a target, please select a target from the picker",
"missing_required_field": "This action requires field {key}, please enter a valid value for {key}"
},
"yaml": {
"invalid_yaml": "Action YAML contains syntax errors, please fix the syntax",
"no_action": "No action defined, please define an 'action:' key",
"invalid_action": "Defined action is invalid, please provide an action in the format domain.action",
"no_target": "This action requires a target, please define a target 'entity_id', 'device_id', or 'area_id' under 'target:' or 'data:'",
"missing_required_field": "This action requires field {key}, which must be provided under 'data:'"
}
}
},
"states": {
"title": "States",
"description1": "Set the current state representation of an entity within Home Assistant.",
"description2": "If the entity belongs to a device, there will be no actual communication with that device.",
"entity": "Entity",
"state": "State",
"attributes": "Attributes",
"state_attributes": "State attributes (YAML, optional)",
"set_state": "Set state",
"current_entities": "Current entity states",
"filter_entities": "Filter entities",
"filter_states": "Filter states",
"filter_attributes": "Filter attributes",
"no_entities": "No entities",
"more_info": "More info",
"alert_entity_field": "Entity is a mandatory field",
"last_updated": "[%key:ui::dialogs::more_info_control::last_updated%]",
"last_changed": "[%key:ui::dialogs::more_info_control::last_changed%]",
"copy_id": "Copy ID to clipboard"
},
"templates": {
"title": "Template",
"description": "Templates are rendered using the Jinja2 template engine with some Home Assistant specific extensions.",
"editor": "Template editor",
"result": "Result",
"reset": "Reset to demo template",
"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",
"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.",
"no_listeners": "This template does not listen for any events and will not update automatically.",
"listeners": "This template listens for the following state changed events:",
"entity": "Entity",
"domain": "Domain"
},
"statistics": {
"title": "Statistics",
"entity": "Entity",
"issue": "Issue",
"no_issue": "No issue",
"issues": {
"units_changed": "The unit of this entity changed from ''{metadata_unit}'' to ''{state_unit}''.",
"mean_type_changed": "The mean type of this entity changed from ''{metadata_mean_type}'' to ''{state_mean_type}''.",
"state_class_removed": "This entity no longer has a state class",
"entity_not_recorded": "This entity is excluded from being recorded.",
"entity_no_longer_recorded": "This entity is no longer being recorded.",
"no_state": "There is no state available for this entity."
},
"delete_selected": "Delete selected statistics",
"multi_delete": {
"title": "Delete selected statistics",
"info_text": "Do you want to permanently delete the long term statistics {statistic_count, plural,\n one {of this entity}\n other {of {statistic_count} entities}\n} from your database?"
},
"mean_type": {
"0": "None",
"1": "Arithmetic",
"2": "Circular"
},
"fix_issue": {
"fix": "Fix issue",
"clearing_failed": "Clearing the statistics failed",
"clearing_timeout_title": "Clearing not done yet",
"clearing_timeout_text": "The clearing of the statistics took longer than expected, it might take longer for the issue to disappear.",
"fix_all": "Fix all",
"info": "Info",
"no_support": {
"title": "Fix issue",
"info_text_1": "Fixing this issue is not supported yet."
},
"no_state": {
"title": "Entity has no state",
"info_text_1": "''{name}'' ({statistic_id}) has no state at the moment, if this is an orphaned entity, you may want to delete the long term statistics of it from your database.",
"info_text_2": "Do you want to permanently delete the long term statistics of {statistic_id} from your database?"
},
"entity_not_recorded": {
"title": "Entity is not recorded",
"info_text_1": "State changes of ''{name}'' ({statistic_id}) are not recorded, therefore, we cannot track long term statistics for it.",
"info_text_2": "You probably excluded this entity, or have just included some entities.",
"info_text_3_link": "See the Recorder documentation for more information."
},
"entity_no_longer_recorded": {
"title": "Entity is no longer recorded",
"info_text_1": "We have generated statistics for ''{name}'' ({statistic_id}) in the past, but state changes of this entity are no longer recorded, therefore, we cannot track long term statistics for it anymore.",
"info_text_2": "You probably excluded this entity, or have just included some entities.",
"info_text_3_link": "See the Recorder documentation for more information.",
"info_text_4": "If you no longer wish to keep the long term statistics recorded in the past, you may delete them now."
},
"state_class_removed": {
"title": "The entity no longer has a state class",
"info_text_1": "We have generated statistics for ''{name}'' ({statistic_id}) in the past, but it no longer has a state class, therefore, we cannot track long term statistics for it anymore.",
"info_text_2": "Statistics cannot be generated until this entity has a supported state class.",
"info_text_3": "If the state class was previously provided by an integration, this might be a bug. Please report an issue.",
"info_text_4": "If you previously set the state class yourself, please correct it.",
"info_text_4_link": "The different state classes and when to use which can be found in the developer documentation.",
"info_text_5": "If the state class has permanently been removed, you may want to delete the long term statistics of it from your database.",
"info_text_6": "Do you want to permanently delete the long term statistics of {statistic_id} from your database?"
},
"units_changed": {
"title": "The unit has changed",
"update": "Update the unit of the historic statistic values from ''{metadata_unit}'' to ''{state_unit}'', without converting.",
"clear": "Delete all old statistic data for this entity",
"how_to_fix": "How do you want to fix this issue?",
"info_text_1": "The unit of ''{name}'' ({statistic_id}) changed to ''{current_unit}'' which can't be converted to the previously stored unit, ''{previous_unit}''.",
"info_text_2": "If the historic statistic values have a wrong unit, you can update the units of the old values. The values will not be updated.",
"info_text_3": "Otherwise you can choose to delete all historic statistic values, and start over."
},
"mean_type_changed": {
"title": "The mean type has changed",
"info_text_1": "The mean type of ''{name}'' ({statistic_id}) changed from ''{metadata_mean_type}'' to ''{state_mean_type}''.",
"info_text_2": "Statistics cannot be generated until the old statistics are deleted, or the mean type matches the old statistics data again.",
"info_text_3": "Do you want to permanently delete the long term statistics of {statistic_id} from your database?"
},
"adjust_sum": {
"title": "Adjust a statistic",
"no_statistics_found": "No statistics found for this period.",
"info_text_1": "Sometimes the statistics end up being incorrect for a specific point in time. This can mess up your beautiful graphs! Select a time below to find the bad moment and adjust the data.",
"pick_a_time": "Pick a time",
"statistic": "Statistic:",
"start": "Start",
"end": "End",
"new_value": "New value",
"adjust": "Adjust",
"outliers": "Outliers",
"sum_adjusted": "Statistic sum adjusted",
"error_sum_adjusted": "Error adjusting sum: {message}"
}
},
"adjust_sum": "Adjust sum",
"data_table": {
"select_all_issues": "Select all with issues",
"name": "Name",
"statistic_id": "Statistic ID",
"statistics_unit": "Statistics unit",
"source": "Source",
"issue": "Issue",
"no_statistics": "[%key:ui::components::statistics_charts::no_statistics_found%]"
}
},
"yaml": {
"title": "YAML",
"section": {
"validation": {
"heading": "Check and restart",
"introduction": "A basic validation of the configuration is automatically done before restarting. The basic validation ensures the YAML configuration doesn't have errors which will prevent Home Assistant or any integration from starting. It's also possible to only do the basic validation check without restarting.",
"check_config": "Check configuration",
"valid": "Configuration will not prevent Home Assistant from starting!",
"invalid": "Configuration invalid!",
"warnings": "Configuration warnings",
"errors": "Configuration errors"
},
"reloading": {
"all": "All YAML configuration",
"heading": "YAML configuration reloading",
"introduction": "Some parts of Home Assistant can reload without requiring a restart. Selecting one of the options below will unload their current YAML configuration and load the new one.",
"reload": "{domain}",
"core": "Location & customizations",
"group": "Groups, group entities, and notify services",
"automation": "Automations",
"script": "Scripts",
"scene": "Scenes",
"person": "People",
"zone": "Zones",
"input_boolean": "Input booleans",
"input_button": "Input buttons",
"input_text": "Input texts",
"input_number": "Input numbers",
"input_datetime": "Input datetimes",
"input_select": "Input selects",
"template": "Template entities",
"universal": "Universal media player entities",
"rest": "REST entities and notify services",
"command_line": "Command line entities",
"filter": "Filter entities",
"statistics": "Statistics entities",
"generic": "Generic IP camera entities",
"generic_thermostat": "Generic thermostat entities",
"homekit": "HomeKit",
"min_max": "Min/max entities",
"history_stats": "History stats entities",
"trend": "Trend entities",
"ping": "Ping binary sensor entities",
"filesize": "File size entities",
"telegram": "Telegram notify services",
"smtp": "SMTP notify services",
"mqtt": "Manually configured MQTT entities",
"rpi_gpio": "Raspberry Pi GPIO entities",
"timer": "Timers",
"themes": "Themes"
},
"server_management": {
"heading": "Home Assistant",
"restart": "Restart",
"stop": "Stop",
"confirm_stop": "Are you sure you want to stop Home Assistant?",
"restart_error": "Failed to restart Home Assistant"
}
}
}
}
},
"energy": {
"caption": "Energy",
"description": "Monitor your energy production and consumption",
@@ -4099,7 +4381,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::developer-tools::tabs::actions::response%]",
"response": "[%key:ui::panel::config::developer-tools::tabs::actions::response%]",
"send": "Send",
"continue_listening": "Continue listening for wake word",
"continue_talking": "Continue talking",
@@ -9603,289 +9885,6 @@
}
}
},
"developer-tools": {
"tabs": {
"assist": {
"title": "Sentences parser",
"description": "Enter sentences and see how they will be parsed by Home Assistant. Each line will be processed as an individual sentence. Intents will not be executed on your instance.",
"parse_sentences": "Parse sentences",
"sentences": "Sentences",
"download_results": "Download results",
"no_match": "No intent matched",
"language": "[%key:ui::components::language-picker::language%]"
},
"debug": {
"title": "Debug tools",
"debug_connection": {
"title": "Debug connection",
"description": "Observe requests to the server and responses from the server in browser console."
},
"entity_diagnostic": {
"title": "Entity diagnostic",
"description": "Select an entity to copy diagnostic details.",
"copy_to_clipboard": "[%key:ui::panel::config::automation::editor::copy_to_clipboard%]"
}
},
"events": {
"title": "Events",
"description": "Fire an event on the event bus.",
"documentation": "Events documentation",
"type": "Event type",
"data": "Event data (YAML, optional)",
"fire_event": "Fire event",
"event_fired": "Event {name} fired",
"active_listeners": "Active listeners",
"count_listeners": "({count} {count, plural,\n one {listener}\n other {listeners}\n})",
"listen_to_events": "Listen to events",
"filter_events": "Filter events",
"filter_helper": "Only capture events containing the filter string.",
"filter_ignored": "Ignored {count} events.",
"listening_to": "Listening to",
"subscribe_to": "Event to subscribe to",
"start_listening": "Start listening",
"stop_listening": "Stop listening",
"clear_events": "Clear events",
"alert_event_type": "Event type is a mandatory field",
"notification_event_fired": "Event {type} successfully fired!",
"subscribe_failed": "Failed to subscribe to event: {error}"
},
"actions": {
"title": "Actions",
"description": "The actions dev tool allows you to perform any action available in Home Assistant.",
"call_service": "Perform action",
"response": "Response",
"column_parameter": "Parameter",
"column_description": "Description",
"column_example": "Example",
"fill_example_data": "Fill example data",
"yaml_mode": "Go to YAML mode",
"ui_mode": "Go to UI mode",
"yaml_parameters": "Parameters only available in YAML mode",
"all_parameters": "All available parameters",
"accepts_target": "This action accepts a target, for example: `entity_id: light.bed_light`",
"no_template_ui_support": "The UI does not support templates, you can still use the YAML editor.",
"copy_clipboard_template": "Copy to clipboard as template",
"open_media": "Open media",
"errors": {
"ui": {
"no_action": "No action selected, please select an action",
"invalid_action": "Selected action is invalid, please select a valid action",
"no_target": "This action requires a target, please select a target from the picker",
"missing_required_field": "This action requires field {key}, please enter a valid value for {key}"
},
"yaml": {
"invalid_yaml": "Action YAML contains syntax errors, please fix the syntax",
"no_action": "No action defined, please define an 'action:' key",
"invalid_action": "Defined action is invalid, please provide an action in the format domain.action",
"no_target": "This action requires a target, please define a target 'entity_id', 'device_id', or 'area_id' under 'target:' or 'data:'",
"missing_required_field": "This action requires field {key}, which must be provided under 'data:'"
}
}
},
"states": {
"title": "States",
"description1": "Set the current state representation of an entity within Home Assistant.",
"description2": "If the entity belongs to a device, there will be no actual communication with that device.",
"entity": "Entity",
"state": "State",
"attributes": "Attributes",
"state_attributes": "State attributes (YAML, optional)",
"set_state": "Set state",
"current_entities": "Current entity states",
"filter_entities": "Filter entities",
"filter_states": "Filter states",
"filter_attributes": "Filter attributes",
"no_entities": "No entities",
"more_info": "More info",
"alert_entity_field": "Entity is a mandatory field",
"last_updated": "[%key:ui::dialogs::more_info_control::last_updated%]",
"last_changed": "[%key:ui::dialogs::more_info_control::last_changed%]",
"copy_id": "Copy ID to clipboard"
},
"templates": {
"title": "Template",
"description": "Templates are rendered using the Jinja2 template engine with some Home Assistant specific extensions.",
"editor": "Template editor",
"result": "Result",
"reset": "Reset to demo template",
"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",
"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.",
"no_listeners": "This template does not listen for any events and will not update automatically.",
"listeners": "This template listens for the following state changed events:",
"entity": "Entity",
"domain": "Domain"
},
"statistics": {
"title": "Statistics",
"entity": "Entity",
"issue": "Issue",
"no_issue": "No issue",
"issues": {
"units_changed": "The unit of this entity changed from ''{metadata_unit}'' to ''{state_unit}''.",
"mean_type_changed": "The mean type of this entity changed from ''{metadata_mean_type}'' to ''{state_mean_type}''.",
"state_class_removed": "This entity no longer has a state class",
"entity_not_recorded": "This entity is excluded from being recorded.",
"entity_no_longer_recorded": "This entity is no longer being recorded.",
"no_state": "There is no state available for this entity."
},
"delete_selected": "Delete selected statistics",
"multi_delete": {
"title": "Delete selected statistics",
"info_text": "Do you want to permanently delete the long term statistics {statistic_count, plural,\n one {of this entity}\n other {of {statistic_count} entities}\n} from your database?"
},
"mean_type": {
"0": "None",
"1": "Arithmetic",
"2": "Circular"
},
"fix_issue": {
"fix": "Fix issue",
"clearing_failed": "Clearing the statistics failed",
"clearing_timeout_title": "Clearing not done yet",
"clearing_timeout_text": "The clearing of the statistics took longer than expected, it might take longer for the issue to disappear.",
"fix_all": "Fix all",
"info": "Info",
"no_support": {
"title": "Fix issue",
"info_text_1": "Fixing this issue is not supported yet."
},
"no_state": {
"title": "Entity has no state",
"info_text_1": "''{name}'' ({statistic_id}) has no state at the moment, if this is an orphaned entity, you may want to delete the long term statistics of it from your database.",
"info_text_2": "Do you want to permanently delete the long term statistics of {statistic_id} from your database?"
},
"entity_not_recorded": {
"title": "Entity is not recorded",
"info_text_1": "State changes of ''{name}'' ({statistic_id}) are not recorded, therefore, we cannot track long term statistics for it.",
"info_text_2": "You probably excluded this entity, or have just included some entities.",
"info_text_3_link": "See the Recorder documentation for more information."
},
"entity_no_longer_recorded": {
"title": "Entity is no longer recorded",
"info_text_1": "We have generated statistics for ''{name}'' ({statistic_id}) in the past, but state changes of this entity are no longer recorded, therefore, we cannot track long term statistics for it anymore.",
"info_text_2": "You probably excluded this entity, or have just included some entities.",
"info_text_3_link": "See the Recorder documentation for more information.",
"info_text_4": "If you no longer wish to keep the long term statistics recorded in the past, you may delete them now."
},
"state_class_removed": {
"title": "The entity no longer has a state class",
"info_text_1": "We have generated statistics for ''{name}'' ({statistic_id}) in the past, but it no longer has a state class, therefore, we cannot track long term statistics for it anymore.",
"info_text_2": "Statistics cannot be generated until this entity has a supported state class.",
"info_text_3": "If the state class was previously provided by an integration, this might be a bug. Please report an issue.",
"info_text_4": "If you previously set the state class yourself, please correct it.",
"info_text_4_link": "The different state classes and when to use which can be found in the developer documentation.",
"info_text_5": "If the state class has permanently been removed, you may want to delete the long term statistics of it from your database.",
"info_text_6": "Do you want to permanently delete the long term statistics of {statistic_id} from your database?"
},
"units_changed": {
"title": "The unit has changed",
"update": "Update the unit of the historic statistic values from ''{metadata_unit}'' to ''{state_unit}'', without converting.",
"clear": "Delete all old statistic data for this entity",
"how_to_fix": "How do you want to fix this issue?",
"info_text_1": "The unit of ''{name}'' ({statistic_id}) changed to ''{current_unit}'' which can't be converted to the previously stored unit, ''{previous_unit}''.",
"info_text_2": "If the historic statistic values have a wrong unit, you can update the units of the old values. The values will not be updated.",
"info_text_3": "Otherwise you can choose to delete all historic statistic values, and start over."
},
"mean_type_changed": {
"title": "The mean type has changed",
"info_text_1": "The mean type of ''{name}'' ({statistic_id}) changed from ''{metadata_mean_type}'' to ''{state_mean_type}''.",
"info_text_2": "Statistics cannot be generated until the old statistics are deleted, or the mean type matches the old statistics data again.",
"info_text_3": "Do you want to permanently delete the long term statistics of {statistic_id} from your database?"
},
"adjust_sum": {
"title": "Adjust a statistic",
"no_statistics_found": "No statistics found for this period.",
"info_text_1": "Sometimes the statistics end up being incorrect for a specific point in time. This can mess up your beautiful graphs! Select a time below to find the bad moment and adjust the data.",
"pick_a_time": "Pick a time",
"statistic": "Statistic:",
"start": "Start",
"end": "End",
"new_value": "New value",
"adjust": "Adjust",
"outliers": "Outliers",
"sum_adjusted": "Statistic sum adjusted",
"error_sum_adjusted": "Error adjusting sum: {message}"
}
},
"adjust_sum": "Adjust sum",
"data_table": {
"select_all_issues": "Select all with issues",
"name": "Name",
"statistic_id": "Statistic ID",
"statistics_unit": "Statistics unit",
"source": "Source",
"issue": "Issue",
"no_statistics": "[%key:ui::components::statistics_charts::no_statistics_found%]"
}
},
"yaml": {
"title": "YAML",
"section": {
"validation": {
"heading": "Check and restart",
"introduction": "A basic validation of the configuration is automatically done before restarting. The basic validation ensures the YAML configuration doesn't have errors which will prevent Home Assistant or any integration from starting. It's also possible to only do the basic validation check without restarting.",
"check_config": "Check configuration",
"valid": "Configuration will not prevent Home Assistant from starting!",
"invalid": "Configuration invalid!",
"warnings": "Configuration warnings",
"errors": "Configuration errors"
},
"reloading": {
"all": "All YAML configuration",
"heading": "YAML configuration reloading",
"introduction": "Some parts of Home Assistant can reload without requiring a restart. Selecting one of the options below will unload their current YAML configuration and load the new one.",
"reload": "{domain}",
"core": "Location & customizations",
"group": "Groups, group entities, and notify services",
"automation": "Automations",
"script": "Scripts",
"scene": "Scenes",
"person": "People",
"zone": "Zones",
"input_boolean": "Input booleans",
"input_button": "Input buttons",
"input_text": "Input texts",
"input_number": "Input numbers",
"input_datetime": "Input datetimes",
"input_select": "Input selects",
"template": "Template entities",
"universal": "Universal media player entities",
"rest": "REST entities and notify services",
"command_line": "Command line entities",
"filter": "Filter entities",
"statistics": "Statistics entities",
"generic": "Generic IP camera entities",
"generic_thermostat": "Generic thermostat entities",
"homekit": "HomeKit",
"min_max": "Min/max entities",
"history_stats": "History stats entities",
"trend": "Trend entities",
"ping": "Ping binary sensor entities",
"filesize": "File size entities",
"telegram": "Telegram notify services",
"smtp": "SMTP notify services",
"mqtt": "Manually configured MQTT entities",
"rpi_gpio": "Raspberry Pi GPIO entities",
"timer": "Timers",
"themes": "Themes"
},
"server_management": {
"heading": "Home Assistant",
"restart": "Restart",
"stop": "Stop",
"confirm_stop": "Are you sure you want to stop Home Assistant?",
"restart_error": "Failed to restart Home Assistant"
}
}
}
}
},
"page-onboarding": {
"intro": "Are you ready to awaken your home, reclaim your privacy and join a worldwide community of tinkerers?",
"back": "Back",