mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-19 07:16:39 +00:00
Use alias instead of description in case set in actions/conditions (#13441)
This commit is contained in:
parent
5fb2e3316a
commit
738367a7c7
@ -145,7 +145,7 @@ export default class HaAutomationActionRow extends LitElement {
|
|||||||
: ""}
|
: ""}
|
||||||
<ha-expansion-panel
|
<ha-expansion-panel
|
||||||
leftChevron
|
leftChevron
|
||||||
.header=${describeAction(this.hass, this.action)}
|
.header=${this.action.alias || describeAction(this.hass, this.action)}
|
||||||
>
|
>
|
||||||
${this.index !== 0
|
${this.index !== 0
|
||||||
? html`
|
? html`
|
||||||
|
@ -10,6 +10,7 @@ import type { HomeAssistant } from "../../../../../types";
|
|||||||
import { ActionElement } from "../ha-automation-action-row";
|
import { ActionElement } from "../ha-automation-action-row";
|
||||||
|
|
||||||
const actionStruct = object({
|
const actionStruct = object({
|
||||||
|
alias: optional(string()),
|
||||||
service: optional(string()),
|
service: optional(string()),
|
||||||
entity_id: optional(entityIdOrAll()),
|
entity_id: optional(entityIdOrAll()),
|
||||||
target: optional(any()),
|
target: optional(any()),
|
||||||
|
@ -80,7 +80,7 @@ export default class HaAutomationConditionRow extends LitElement {
|
|||||||
|
|
||||||
<ha-expansion-panel
|
<ha-expansion-panel
|
||||||
leftChevron
|
leftChevron
|
||||||
.header=${describeCondition(this.condition)}
|
.header=${this.condition.alias || describeCondition(this.condition)}
|
||||||
>
|
>
|
||||||
<ha-progress-button slot="icons" @click=${this._testCondition}>
|
<ha-progress-button slot="icons" @click=${this._testCondition}>
|
||||||
${this.hass.localize(
|
${this.hass.localize(
|
||||||
|
@ -12,6 +12,7 @@ import { forDictStruct } from "../../structs";
|
|||||||
import type { ConditionElement } from "../ha-automation-condition-row";
|
import type { ConditionElement } from "../ha-automation-condition-row";
|
||||||
|
|
||||||
const stateConditionStruct = object({
|
const stateConditionStruct = object({
|
||||||
|
alias: optional(string()),
|
||||||
condition: literal("state"),
|
condition: literal("state"),
|
||||||
entity_id: optional(string()),
|
entity_id: optional(string()),
|
||||||
attribute: optional(string()),
|
attribute: optional(string()),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user