mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 19:56:42 +00:00
20240926.0 (#22107)
This commit is contained in:
commit
d4a5115a65
@ -139,7 +139,7 @@
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="section-header">Wat does Home Assistant Cast do?</div>
|
||||
<div class="section-header">What does Home Assistant Cast do?</div>
|
||||
<div class="card-content">
|
||||
<p>
|
||||
Home Assistant Cast is a receiver application for the Chromecast. When
|
||||
|
@ -167,7 +167,7 @@
|
||||
"@rollup/plugin-babel": "6.0.4",
|
||||
"@rollup/plugin-commonjs": "26.0.1",
|
||||
"@rollup/plugin-json": "6.1.0",
|
||||
"@rollup/plugin-node-resolve": "15.2.3",
|
||||
"@rollup/plugin-node-resolve": "15.2.4",
|
||||
"@rollup/plugin-replace": "5.0.7",
|
||||
"@types/babel__plugin-transform-runtime": "7.9.5",
|
||||
"@types/chromecast-caf-receiver": "6.0.17",
|
||||
|
@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "home-assistant-frontend"
|
||||
version = "20240925.0"
|
||||
version = "20240926.0"
|
||||
license = {text = "Apache-2.0"}
|
||||
description = "The Home Assistant frontend"
|
||||
readme = "README.md"
|
||||
|
@ -173,6 +173,7 @@ class HaEntityStatePicker extends LitElement {
|
||||
no-style
|
||||
@item-moved=${this._moveItem}
|
||||
.disabled=${this.disabled}
|
||||
filter="button.trailing.action"
|
||||
>
|
||||
<ha-chip-set>
|
||||
${repeat(
|
||||
|
@ -43,6 +43,13 @@ export class HaSortable extends LitElement {
|
||||
@property({ type: String, attribute: "handle-selector" })
|
||||
public handleSelector?: string;
|
||||
|
||||
/**
|
||||
* Selectors that do not lead to dragging (String or Function)
|
||||
* https://github.com/SortableJS/Sortable?tab=readme-ov-file#filter-option
|
||||
* */
|
||||
@property({ type: String, attribute: "filter" })
|
||||
public filter?: string;
|
||||
|
||||
@property({ type: String })
|
||||
public group?: string | SortableInstance.GroupOptions;
|
||||
|
||||
@ -145,6 +152,9 @@ export class HaSortable extends LitElement {
|
||||
if (this.group) {
|
||||
options.group = this.group;
|
||||
}
|
||||
if (this.filter) {
|
||||
options.filter = this.filter;
|
||||
}
|
||||
|
||||
this._sortable = new Sortable(container, options);
|
||||
}
|
||||
|
@ -68,6 +68,7 @@ export const startExternalCommissioning = async (hass: HomeAssistant) => {
|
||||
).tlv,
|
||||
border_agent_id: preferredDataset.preferred_border_agent_id,
|
||||
mac_extended_address: preferredDataset.preferred_extended_address,
|
||||
extended_pan_id: preferredDataset.extended_pan_id,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
@ -129,32 +129,31 @@ class DialogBox extends LitElement {
|
||||
}
|
||||
|
||||
private _dismiss(): void {
|
||||
this._cancel();
|
||||
this._closeState = "canceled";
|
||||
this._closeDialog();
|
||||
this._cancel();
|
||||
}
|
||||
|
||||
private _confirm(): void {
|
||||
this._closeState = "confirmed";
|
||||
this._closeDialog();
|
||||
if (this._params!.confirm) {
|
||||
this._params!.confirm(this._textField?.value);
|
||||
}
|
||||
this._closeState = "confirmed";
|
||||
this._closeDialog();
|
||||
}
|
||||
|
||||
private _closeDialog() {
|
||||
fireEvent(this, "dialog-closed", { dialog: this.localName });
|
||||
this._dialog?.close();
|
||||
}
|
||||
|
||||
private _dialogClosed() {
|
||||
if (!this._closeState) {
|
||||
fireEvent(this, "dialog-closed", { dialog: this.localName });
|
||||
this._cancel();
|
||||
}
|
||||
if (!this._params) {
|
||||
return;
|
||||
}
|
||||
this._closeState = undefined;
|
||||
this._params = undefined;
|
||||
fireEvent(this, "dialog-closed", { dialog: this.localName });
|
||||
}
|
||||
|
||||
static get styles(): CSSResultGroup {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { css, html, LitElement, PropertyValues } from "lit";
|
||||
import { css, html, LitElement, nothing, PropertyValues } from "lit";
|
||||
import { customElement, property } from "lit/decorators";
|
||||
import { fireEvent } from "../../common/dom/fire_event";
|
||||
import "../../components/ha-circular-progress";
|
||||
@ -45,7 +45,11 @@ export class HaVoiceAssistantSetupStepUpdate extends LitElement {
|
||||
}
|
||||
|
||||
protected override render() {
|
||||
const stateObj = this.hass.states[this.updateEntityId!];
|
||||
if (!this.updateEntityId || !(this.updateEntityId in this.hass.states)) {
|
||||
return nothing;
|
||||
}
|
||||
|
||||
const stateObj = this.hass.states[this.updateEntityId];
|
||||
|
||||
const progressIsNumeric =
|
||||
typeof stateObj?.attributes.in_progress === "number";
|
||||
|
@ -59,6 +59,7 @@ interface EMOutgoingMessageMatterCommission extends EMMessage {
|
||||
type: "matter/commission";
|
||||
payload?: {
|
||||
mac_extended_address: string | null;
|
||||
extended_pan_id: string | null;
|
||||
border_agent_id: string | null;
|
||||
active_operational_dataset: string | null;
|
||||
};
|
||||
|
@ -90,7 +90,7 @@ export class HaManualAutomationEditor extends LitElement {
|
||||
role="region"
|
||||
aria-labelledby="triggers-heading"
|
||||
.triggers=${this.config.triggers || []}
|
||||
.path=${["trigger"]}
|
||||
.path=${["triggers"]}
|
||||
@value-changed=${this._triggerChanged}
|
||||
@item-moved=${this._itemMoved}
|
||||
.hass=${this.hass}
|
||||
@ -132,7 +132,7 @@ export class HaManualAutomationEditor extends LitElement {
|
||||
role="region"
|
||||
aria-labelledby="conditions-heading"
|
||||
.conditions=${this.config.conditions || []}
|
||||
.path=${["condition"]}
|
||||
.path=${["conditions"]}
|
||||
@value-changed=${this._conditionChanged}
|
||||
@item-moved=${this._itemMoved}
|
||||
.hass=${this.hass}
|
||||
@ -172,7 +172,7 @@ export class HaManualAutomationEditor extends LitElement {
|
||||
role="region"
|
||||
aria-labelledby="actions-heading"
|
||||
.actions=${this.config.actions || []}
|
||||
.path=${["action"]}
|
||||
.path=${["actions"]}
|
||||
@value-changed=${this._actionChanged}
|
||||
@item-moved=${this._itemMoved}
|
||||
.hass=${this.hass}
|
||||
|
@ -137,7 +137,19 @@ class DialogMatterOpenCommissioningWindow extends LitElement {
|
||||
: html`
|
||||
<p>
|
||||
${this.hass.localize(
|
||||
"ui.panel.config.matter.open_commissioning_window.introduction"
|
||||
"ui.panel.config.matter.open_commissioning_window.description",
|
||||
{
|
||||
startCommissioning: html`<b
|
||||
>${this.hass.localize(
|
||||
"ui.panel.config.matter.open_commissioning_window.start_commissioning"
|
||||
)}</b
|
||||
>`,
|
||||
}
|
||||
)}
|
||||
</p>
|
||||
<p class="note">
|
||||
${this.hass.localize(
|
||||
"ui.panel.config.matter.open_commissioning_window.prevent_misuse_description"
|
||||
)}
|
||||
</p>
|
||||
<mwc-button slot="primaryAction" @click=${this._start}>
|
||||
@ -247,6 +259,11 @@ class DialogMatterOpenCommissioningWindow extends LitElement {
|
||||
.code {
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.note {
|
||||
color: var(--secondary-text-color);
|
||||
font-size: 0.9em;
|
||||
}
|
||||
`,
|
||||
];
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ import { customElement, property, state } from "lit/decorators";
|
||||
import { fireEvent } from "../../../../../common/dom/fire_event";
|
||||
import "../../../../../components/ha-circular-progress";
|
||||
import { createCloseHeading } from "../../../../../components/ha-dialog";
|
||||
import { pingMatterNode, MatterPingResult } from "../../../../../data/matter";
|
||||
import { pingMatterNode } from "../../../../../data/matter";
|
||||
import { haStyle, haStyleDialog } from "../../../../../resources/styles";
|
||||
import { HomeAssistant } from "../../../../../types";
|
||||
import { MatterPingNodeDialogParams } from "./show-dialog-matter-ping-node";
|
||||
@ -16,9 +16,12 @@ class DialogMatterPingNode extends LitElement {
|
||||
|
||||
@state() private device_id?: string;
|
||||
|
||||
@state() private _status?: string;
|
||||
@state() private _status?: "started" | "failed";
|
||||
|
||||
@state() private _pingResult?: MatterPingResult;
|
||||
@state() private _pingResultEntries?: [
|
||||
ip_address: string,
|
||||
success: boolean,
|
||||
][];
|
||||
|
||||
public async showDialog(params: MatterPingNodeDialogParams): Promise<void> {
|
||||
this.device_id = params.device_id;
|
||||
@ -38,60 +41,62 @@ class DialogMatterPingNode extends LitElement {
|
||||
this.hass.localize("ui.panel.config.matter.ping_node.title")
|
||||
)}
|
||||
>
|
||||
${this._pingResult
|
||||
${this._status === "failed"
|
||||
? html`
|
||||
<h2>
|
||||
${this.hass.localize(
|
||||
"ui.panel.config.matter.ping_node.ping_complete"
|
||||
)}
|
||||
</h2>
|
||||
<mwc-list>
|
||||
${Object.entries(this._pingResult).map(
|
||||
([ip, success]) =>
|
||||
html`<ha-list-item hasMeta noninteractive
|
||||
>${ip}
|
||||
<ha-svg-icon
|
||||
slot="meta"
|
||||
.path=${success ? mdiCheckCircle : mdiAlertCircle}
|
||||
class=${success ? "success" : "failed"}
|
||||
></ha-svg-icon>
|
||||
</ha-list-item>`
|
||||
)}
|
||||
</mwc-list>
|
||||
<div class="flex-container">
|
||||
<ha-svg-icon
|
||||
.path=${mdiCloseCircle}
|
||||
class="failed"
|
||||
></ha-svg-icon>
|
||||
<div class="status">
|
||||
<p>
|
||||
${this.hass.localize(
|
||||
this._pingResultEntries
|
||||
? "ui.panel.config.matter.ping_node.no_ip_found"
|
||||
: "ui.panel.config.matter.ping_node.ping_failed"
|
||||
)}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<mwc-button slot="primaryAction" @click=${this.closeDialog}>
|
||||
${this.hass.localize("ui.common.close")}
|
||||
</mwc-button>
|
||||
`
|
||||
: this._status === "started"
|
||||
: this._pingResultEntries
|
||||
? html`
|
||||
<div class="flex-container">
|
||||
<ha-circular-progress indeterminate></ha-circular-progress>
|
||||
<div class="status">
|
||||
<p>
|
||||
<b>
|
||||
${this.hass.localize(
|
||||
"ui.panel.config.matter.ping_node.in_progress"
|
||||
)}
|
||||
</b>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<h2>
|
||||
${this.hass.localize(
|
||||
"ui.panel.config.matter.ping_node.ping_complete"
|
||||
)}
|
||||
</h2>
|
||||
<mwc-list>
|
||||
${this._pingResultEntries.map(
|
||||
([ip, success]) =>
|
||||
html`<ha-list-item hasMeta noninteractive
|
||||
>${ip}
|
||||
<ha-svg-icon
|
||||
slot="meta"
|
||||
.path=${success ? mdiCheckCircle : mdiAlertCircle}
|
||||
class=${success ? "success" : "failed"}
|
||||
></ha-svg-icon>
|
||||
</ha-list-item>`
|
||||
)}
|
||||
</mwc-list>
|
||||
<mwc-button slot="primaryAction" @click=${this.closeDialog}>
|
||||
${this.hass.localize("ui.common.close")}
|
||||
</mwc-button>
|
||||
`
|
||||
: this._status === "failed"
|
||||
: this._status === "started"
|
||||
? html`
|
||||
<div class="flex-container">
|
||||
<ha-svg-icon
|
||||
.path=${mdiCloseCircle}
|
||||
class="failed"
|
||||
></ha-svg-icon>
|
||||
<ha-circular-progress indeterminate></ha-circular-progress>
|
||||
<div class="status">
|
||||
<p>
|
||||
${this.hass.localize(
|
||||
"ui.panel.config.matter.ping_node.ping_failed"
|
||||
)}
|
||||
<b>
|
||||
${this.hass.localize(
|
||||
"ui.panel.config.matter.ping_node.in_progress"
|
||||
)}
|
||||
</b>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@ -128,7 +133,13 @@ class DialogMatterPingNode extends LitElement {
|
||||
}
|
||||
this._status = "started";
|
||||
try {
|
||||
this._pingResult = await pingMatterNode(this.hass, this.device_id!);
|
||||
const pingResult = await pingMatterNode(this.hass, this.device_id!);
|
||||
const pingResultEntries = Object.entries(pingResult);
|
||||
if (pingResultEntries.length === 0) {
|
||||
this._status = "failed";
|
||||
}
|
||||
|
||||
this._pingResultEntries = pingResultEntries;
|
||||
} catch (err) {
|
||||
this._status = "failed";
|
||||
}
|
||||
@ -137,7 +148,7 @@ class DialogMatterPingNode extends LitElement {
|
||||
public closeDialog(): void {
|
||||
this.device_id = undefined;
|
||||
this._status = undefined;
|
||||
this._pingResult = undefined;
|
||||
this._pingResultEntries = undefined;
|
||||
fireEvent(this, "dialog-closed", { dialog: this.localName });
|
||||
}
|
||||
|
||||
|
@ -20,9 +20,9 @@ class DialogRepairsIssueSubtitle extends LitElement {
|
||||
protected render() {
|
||||
const domainName = domainToName(this.hass.localize, this.issue.domain);
|
||||
const reportedBy = domainName
|
||||
? this.hass.localize("ui.panel.config.repairs.reported_by", {
|
||||
? ` ⸱ ${this.hass.localize("ui.panel.config.repairs.reported_by", {
|
||||
integration: domainName,
|
||||
})
|
||||
})}`
|
||||
: "";
|
||||
|
||||
const severity = this.hass.localize(
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { mdiHelpCircle } from "@mdi/js";
|
||||
import { ERR_CONNECTION_LOST } from "home-assistant-js-websocket";
|
||||
import { ERR_CONNECTION_LOST, HassService } from "home-assistant-js-websocket";
|
||||
import { load } from "js-yaml";
|
||||
import { css, CSSResultGroup, html, LitElement, nothing } from "lit";
|
||||
import { customElement, property, query, state } from "lit/decorators";
|
||||
@ -8,16 +8,16 @@ import { storage } from "../../../common/decorators/storage";
|
||||
import { computeDomain } from "../../../common/entity/compute_domain";
|
||||
import { computeObjectId } from "../../../common/entity/compute_object_id";
|
||||
import { hasTemplate } from "../../../common/string/has-template";
|
||||
import { extractSearchParam } from "../../../common/url/search-params";
|
||||
import { HaProgressButton } from "../../../components/buttons/ha-progress-button";
|
||||
import { LocalizeFunc } from "../../../common/translations/localize";
|
||||
import { showToast } from "../../../util/toast";
|
||||
import { extractSearchParam } from "../../../common/url/search-params";
|
||||
import { copyToClipboard } from "../../../common/util/copy-clipboard";
|
||||
import { HaProgressButton } from "../../../components/buttons/ha-progress-button";
|
||||
import { showToast } from "../../../util/toast";
|
||||
|
||||
import "../../../components/entity/ha-entity-picker";
|
||||
import "../../../components/ha-card";
|
||||
import "../../../components/ha-alert";
|
||||
import "../../../components/ha-button";
|
||||
import "../../../components/ha-card";
|
||||
import "../../../components/ha-expansion-panel";
|
||||
import "../../../components/ha-icon-button";
|
||||
import "../../../components/ha-service-control";
|
||||
@ -382,10 +382,24 @@ class HaPanelDevAction extends LitElement {
|
||||
}
|
||||
const target = "target" in serviceDomains[domain][service];
|
||||
const fields = serviceDomains[domain][service].fields;
|
||||
const result = Object.keys(fields).map((field) => ({
|
||||
key: field,
|
||||
...fields[field],
|
||||
}));
|
||||
const result: (HassService["fields"] & { key: string })[] = [];
|
||||
|
||||
// TODO: remplace any by proper type when updated in home-assistant-js-websocket
|
||||
const getFields = (flds: any) => {
|
||||
Object.keys(flds).forEach((field) => {
|
||||
const fieldData = flds[field];
|
||||
if (fieldData.fields) {
|
||||
getFields(fieldData.fields);
|
||||
} else {
|
||||
result.push({
|
||||
key: field,
|
||||
...fieldData,
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
getFields(fields);
|
||||
|
||||
return {
|
||||
target,
|
||||
|
@ -61,6 +61,7 @@ export class DialogStatisticsFixUnitsChanged extends LitElement {
|
||||
this._params.issue.data.statistic_id,
|
||||
undefined
|
||||
),
|
||||
statistic_id: this._params.issue.data.statistic_id,
|
||||
current_unit: this._params.issue.data.state_unit,
|
||||
previous_unit: this._params.issue.data.metadata_unit,
|
||||
}
|
||||
|
@ -29,6 +29,7 @@ export const fixStatisticsIssue = async (
|
||||
"ui.panel.developer-tools.tabs.statistics.fix_issue.no_state.info_text_1",
|
||||
{
|
||||
name: getStatisticLabel(hass, issue.data.statistic_id, undefined),
|
||||
statistic_id: issue.data.statistic_id,
|
||||
}
|
||||
)}<br /><br />${localize(
|
||||
"ui.panel.developer-tools.tabs.statistics.fix_issue.no_state.info_text_2",
|
||||
@ -75,6 +76,7 @@ export const fixStatisticsIssue = async (
|
||||
"ui.panel.developer-tools.tabs.statistics.fix_issue.entity_no_longer_recorded.info_text_1",
|
||||
{
|
||||
name: getStatisticLabel(hass, issue.data.statistic_id, undefined),
|
||||
statistic_id: issue.data.statistic_id,
|
||||
}
|
||||
)}
|
||||
${localize(
|
||||
@ -110,6 +112,7 @@ export const fixStatisticsIssue = async (
|
||||
"ui.panel.developer-tools.tabs.statistics.fix_issue.unsupported_state_class.info_text_1",
|
||||
{
|
||||
name: getStatisticLabel(hass, issue.data.statistic_id, undefined),
|
||||
statistic_id: issue.data.statistic_id,
|
||||
state_class: issue.data.state_class,
|
||||
}
|
||||
)}<br /><br />
|
||||
|
@ -93,134 +93,120 @@ export class HaCardConditionEditor extends LitElement {
|
||||
if (!condition) return nothing;
|
||||
|
||||
return html`
|
||||
<ha-card outlined>
|
||||
<div class="container">
|
||||
<ha-expansion-panel leftChevron>
|
||||
<h3 slot="header">
|
||||
<ha-svg-icon
|
||||
class="condition-icon"
|
||||
.path=${ICON_CONDITION[condition.condition]}
|
||||
></ha-svg-icon>
|
||||
${
|
||||
this.hass.localize(
|
||||
`ui.panel.lovelace.editor.condition-editor.condition.${condition.condition}.label`
|
||||
) || condition.condition
|
||||
}
|
||||
${this.hass.localize(
|
||||
`ui.panel.lovelace.editor.condition-editor.condition.${condition.condition}.label`
|
||||
) || condition.condition}
|
||||
</h3>
|
||||
<ha-button-menu
|
||||
slot="icons"
|
||||
@action=${this._handleAction}
|
||||
@click=${preventDefault}
|
||||
@closed=${stopPropagation}
|
||||
fixed
|
||||
.corner=${"BOTTOM_END"}
|
||||
.menuCorner=${"END"}
|
||||
<ha-button-menu
|
||||
slot="icons"
|
||||
@action=${this._handleAction}
|
||||
@click=${preventDefault}
|
||||
@closed=${stopPropagation}
|
||||
fixed
|
||||
.corner=${"BOTTOM_END"}
|
||||
.menuCorner=${"END"}
|
||||
>
|
||||
<ha-icon-button
|
||||
slot="trigger"
|
||||
.label=${this.hass.localize("ui.common.menu")}
|
||||
.path=${mdiDotsVertical}
|
||||
>
|
||||
<ha-icon-button
|
||||
slot="trigger"
|
||||
.label=${this.hass.localize("ui.common.menu")}
|
||||
.path=${mdiDotsVertical}
|
||||
>
|
||||
</ha-icon-button>
|
||||
</ha-icon-button>
|
||||
|
||||
<ha-list-item graphic="icon">
|
||||
${this.hass.localize(
|
||||
"ui.panel.lovelace.editor.condition-editor.test"
|
||||
)}
|
||||
<ha-svg-icon slot="graphic" .path=${mdiFlask}></ha-svg-icon>
|
||||
</ha-list-item>
|
||||
<ha-list-item graphic="icon">
|
||||
${this.hass.localize(
|
||||
"ui.panel.lovelace.editor.condition-editor.test"
|
||||
)}
|
||||
<ha-svg-icon slot="graphic" .path=${mdiFlask}></ha-svg-icon>
|
||||
</ha-list-item>
|
||||
|
||||
<ha-list-item graphic="icon" .disabled=${!this._uiAvailable}>
|
||||
${this.hass.localize(
|
||||
"ui.panel.lovelace.editor.edit_card.edit_ui"
|
||||
)}
|
||||
${
|
||||
!this._yamlMode
|
||||
? html`
|
||||
<ha-svg-icon
|
||||
class="selected_menu_item"
|
||||
slot="graphic"
|
||||
.path=${mdiCheck}
|
||||
></ha-svg-icon>
|
||||
`
|
||||
: ``
|
||||
}
|
||||
</ha-list-item>
|
||||
|
||||
<ha-list-item graphic="icon">
|
||||
${this.hass.localize(
|
||||
"ui.panel.lovelace.editor.edit_card.edit_yaml"
|
||||
)}
|
||||
${
|
||||
this._yamlMode
|
||||
? html`
|
||||
<ha-svg-icon
|
||||
class="selected_menu_item"
|
||||
slot="graphic"
|
||||
.path=${mdiCheck}
|
||||
></ha-svg-icon>
|
||||
`
|
||||
: ``
|
||||
}
|
||||
</ha-list-item>
|
||||
|
||||
<li divider role="separator"></li>
|
||||
|
||||
<ha-list-item class="warning" graphic="icon">
|
||||
${this.hass!.localize("ui.common.delete")}
|
||||
<ha-svg-icon
|
||||
class="warning"
|
||||
slot="graphic"
|
||||
.path=${mdiDelete}
|
||||
></ha-svg-icon>
|
||||
</ha-list-item>
|
||||
</ha-button-menu>
|
||||
</div>
|
||||
${
|
||||
!this._uiAvailable
|
||||
? html`
|
||||
<ha-alert
|
||||
alert-type="warning"
|
||||
.title=${this.hass.localize(
|
||||
"ui.errors.config.editor_not_supported"
|
||||
)}
|
||||
>
|
||||
${this._uiWarnings!.length > 0 &&
|
||||
this._uiWarnings![0] !== undefined
|
||||
? html`
|
||||
<ul>
|
||||
${this._uiWarnings!.map(
|
||||
(warning) => html`<li>${warning}</li>`
|
||||
)}
|
||||
</ul>
|
||||
`
|
||||
: nothing}
|
||||
${this.hass.localize(
|
||||
"ui.errors.config.edit_in_yaml_supported"
|
||||
)}
|
||||
</ha-alert>
|
||||
`
|
||||
: nothing
|
||||
}
|
||||
<div class="content">
|
||||
${
|
||||
this._yamlMode
|
||||
<ha-list-item graphic="icon" .disabled=${!this._uiAvailable}>
|
||||
${this.hass.localize(
|
||||
"ui.panel.lovelace.editor.edit_card.edit_ui"
|
||||
)}
|
||||
${!this._yamlMode
|
||||
? html`
|
||||
<ha-yaml-editor
|
||||
.hass=${this.hass}
|
||||
.defaultValue=${this.condition}
|
||||
@value-changed=${this._onYamlChange}
|
||||
></ha-yaml-editor>
|
||||
<ha-svg-icon
|
||||
class="selected_menu_item"
|
||||
slot="graphic"
|
||||
.path=${mdiCheck}
|
||||
></ha-svg-icon>
|
||||
`
|
||||
: html`
|
||||
${dynamicElement(
|
||||
`ha-card-condition-${condition.condition}`,
|
||||
{
|
||||
hass: this.hass,
|
||||
condition: condition,
|
||||
}
|
||||
)}
|
||||
: ``}
|
||||
</ha-list-item>
|
||||
|
||||
<ha-list-item graphic="icon">
|
||||
${this.hass.localize(
|
||||
"ui.panel.lovelace.editor.edit_card.edit_yaml"
|
||||
)}
|
||||
${this._yamlMode
|
||||
? html`
|
||||
<ha-svg-icon
|
||||
class="selected_menu_item"
|
||||
slot="graphic"
|
||||
.path=${mdiCheck}
|
||||
></ha-svg-icon>
|
||||
`
|
||||
}
|
||||
: ``}
|
||||
</ha-list-item>
|
||||
|
||||
<li divider role="separator"></li>
|
||||
|
||||
<ha-list-item class="warning" graphic="icon">
|
||||
${this.hass!.localize("ui.common.delete")}
|
||||
<ha-svg-icon
|
||||
class="warning"
|
||||
slot="graphic"
|
||||
.path=${mdiDelete}
|
||||
></ha-svg-icon>
|
||||
</ha-list-item>
|
||||
</ha-button-menu>
|
||||
${!this._uiAvailable
|
||||
? html`
|
||||
<ha-alert
|
||||
alert-type="warning"
|
||||
.title=${this.hass.localize(
|
||||
"ui.errors.config.editor_not_supported"
|
||||
)}
|
||||
>
|
||||
${this._uiWarnings!.length > 0 &&
|
||||
this._uiWarnings![0] !== undefined
|
||||
? html`
|
||||
<ul>
|
||||
${this._uiWarnings!.map(
|
||||
(warning) => html`<li>${warning}</li>`
|
||||
)}
|
||||
</ul>
|
||||
`
|
||||
: nothing}
|
||||
${this.hass.localize(
|
||||
"ui.errors.config.edit_in_yaml_supported"
|
||||
)}
|
||||
</ha-alert>
|
||||
`
|
||||
: nothing}
|
||||
<div class="content">
|
||||
${this._yamlMode
|
||||
? html`
|
||||
<ha-yaml-editor
|
||||
.hass=${this.hass}
|
||||
.defaultValue=${this.condition}
|
||||
@value-changed=${this._onYamlChange}
|
||||
></ha-yaml-editor>
|
||||
`
|
||||
: html`
|
||||
${dynamicElement(`ha-card-condition-${condition.condition}`, {
|
||||
hass: this.hass,
|
||||
condition: condition,
|
||||
})}
|
||||
`}
|
||||
</div>
|
||||
</ha-expansion-panel>
|
||||
<div
|
||||
@ -230,19 +216,17 @@ export class HaCardConditionEditor extends LitElement {
|
||||
error: this._testingResult === false,
|
||||
})}"
|
||||
>
|
||||
${
|
||||
this._testingResult
|
||||
${this._testingResult
|
||||
? this.hass.localize(
|
||||
"ui.panel.lovelace.editor.condition-editor.testing_pass"
|
||||
)
|
||||
: this._testingResult === false
|
||||
? this.hass.localize(
|
||||
"ui.panel.lovelace.editor.condition-editor.testing_pass"
|
||||
"ui.panel.lovelace.editor.condition-editor.testing_error"
|
||||
)
|
||||
: this._testingResult === false
|
||||
? this.hass.localize(
|
||||
"ui.panel.lovelace.editor.condition-editor.testing_error"
|
||||
)
|
||||
: nothing
|
||||
}
|
||||
: nothing}
|
||||
</div>
|
||||
</ha-card>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
@ -313,7 +297,6 @@ export class HaCardConditionEditor extends LitElement {
|
||||
ha-button-menu {
|
||||
--mdc-theme-text-primary-on-background: var(--primary-text-color);
|
||||
}
|
||||
|
||||
ha-expansion-panel {
|
||||
--expansion-panel-summary-padding: 0 0 0 8px;
|
||||
--expansion-panel-content-padding: 0;
|
||||
@ -372,6 +355,11 @@ export class HaCardConditionEditor extends LitElement {
|
||||
.testing.pass {
|
||||
background-color: var(--success-color);
|
||||
}
|
||||
.container {
|
||||
position: relative;
|
||||
border-radius: var(--ha-card-border-radius, 12px);
|
||||
border: 1px solid var(--divider-color);
|
||||
}
|
||||
`,
|
||||
];
|
||||
}
|
||||
|
@ -5127,11 +5127,13 @@
|
||||
"start_ping": "Start ping",
|
||||
"in_progress": "The device is being pinged. This may take some time.",
|
||||
"ping_failed": "The device ping failed. Additional information may be available in the logs.",
|
||||
"ping_complete": "Ping device complete."
|
||||
"ping_complete": "Ping device complete.",
|
||||
"no_ip_found": "The device ping failed. No IP addresses found for this device."
|
||||
},
|
||||
"open_commissioning_window": {
|
||||
"title": "Share device",
|
||||
"introduction": "Enable commissioning mode on the device to pair it to another Matter controller.",
|
||||
"description": "To continue, select {startCommissioning}. Home Assistant will then put your device in commissioning mode, allowing it to pair with another Matter controller.",
|
||||
"prevent_misuse_description": "Note: Do not press the physical setup button on the device as this will reset it.",
|
||||
"start_commissioning": "Share device",
|
||||
"in_progress": "We're communicating with the device. This may take some time.",
|
||||
"failed": "The command failed. Additional information may be available in the logs.",
|
||||
@ -6960,25 +6962,25 @@
|
||||
},
|
||||
"no_state": {
|
||||
"title": "Entity has no state",
|
||||
"info_text_1": "{name} 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_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} are not recorded, therefore, we cannot track long term statistics for it.",
|
||||
"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} 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_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."
|
||||
},
|
||||
"unsupported_state_class": {
|
||||
"title": "Unsupported state class",
|
||||
"info_text_1": "The state class of {name}, {state_class} is not supported.",
|
||||
"info_text_1": "The state class of ''{name}'' ({statistic_id}), ''{state_class}'', is not supported.",
|
||||
"info_text_2": "Statistics cannot be generated until this entity has a supported state class.",
|
||||
"info_text_3": "If this state class was provided by an integration, this is a bug. Please report an issue.",
|
||||
"info_text_4": "If you have set this state class yourself, please correct it.",
|
||||
@ -6987,11 +6989,11 @@
|
||||
"info_text_6": "Do you want to permanently delete the long term statistics of {statistic_id} from your database?"
|
||||
},
|
||||
"units_changed": {
|
||||
"title": "The unit 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} changed to ''{current_unit}'' which can't be converted to the previously stored unit, ''{previous_unit}''.",
|
||||
"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."
|
||||
},
|
||||
|
13
yarn.lock
13
yarn.lock
@ -3793,14 +3793,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@rollup/plugin-node-resolve@npm:15.2.3, @rollup/plugin-node-resolve@npm:^15.2.3":
|
||||
version: 15.2.3
|
||||
resolution: "@rollup/plugin-node-resolve@npm:15.2.3"
|
||||
"@rollup/plugin-node-resolve@npm:15.2.4, @rollup/plugin-node-resolve@npm:^15.2.3":
|
||||
version: 15.2.4
|
||||
resolution: "@rollup/plugin-node-resolve@npm:15.2.4"
|
||||
dependencies:
|
||||
"@rollup/pluginutils": "npm:^5.0.1"
|
||||
"@types/resolve": "npm:1.20.2"
|
||||
deepmerge: "npm:^4.2.2"
|
||||
is-builtin-module: "npm:^3.2.1"
|
||||
is-module: "npm:^1.0.0"
|
||||
resolve: "npm:^1.22.1"
|
||||
peerDependencies:
|
||||
@ -3808,7 +3807,7 @@ __metadata:
|
||||
peerDependenciesMeta:
|
||||
rollup:
|
||||
optional: true
|
||||
checksum: 10/d36a6792fbe9d8673d3a7c7dc88920be669ac54fba02ac0093d3c00fc9463fce2e87da1906a2651016742709c3d202b367fb49a62acd0d98f18409343f27b8b4
|
||||
checksum: 10/ad1940019344df457be88414393214fa69eaabba59cb7763bd81a9baacf0bb80efedf1bb999c40593860974b905f8d96ea8600b3b04f402f04da9c7ddc714178
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@ -8973,7 +8972,7 @@ __metadata:
|
||||
"@rollup/plugin-babel": "npm:6.0.4"
|
||||
"@rollup/plugin-commonjs": "npm:26.0.1"
|
||||
"@rollup/plugin-json": "npm:6.1.0"
|
||||
"@rollup/plugin-node-resolve": "npm:15.2.3"
|
||||
"@rollup/plugin-node-resolve": "npm:15.2.4"
|
||||
"@rollup/plugin-replace": "npm:5.0.7"
|
||||
"@thomasloven/round-slider": "npm:0.6.0"
|
||||
"@types/babel__plugin-transform-runtime": "npm:7.9.5"
|
||||
@ -9597,7 +9596,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"is-builtin-module@npm:^3.0.0, is-builtin-module@npm:^3.1.0, is-builtin-module@npm:^3.2.1":
|
||||
"is-builtin-module@npm:^3.0.0, is-builtin-module@npm:^3.1.0":
|
||||
version: 3.2.1
|
||||
resolution: "is-builtin-module@npm:3.2.1"
|
||||
dependencies:
|
||||
|
Loading…
x
Reference in New Issue
Block a user