mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-17 06:16:33 +00:00
Add alias support to all triggers (#13442)
This commit is contained in:
parent
738367a7c7
commit
44422086d7
@ -62,6 +62,7 @@ export interface ContextConstraint {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface BaseTrigger {
|
export interface BaseTrigger {
|
||||||
|
alias?: string;
|
||||||
platform: string;
|
platform: string;
|
||||||
id?: string;
|
id?: string;
|
||||||
variables?: Record<string, unknown>;
|
variables?: Record<string, unknown>;
|
||||||
|
@ -110,7 +110,7 @@ export default class HaAutomationTriggerRow extends LitElement {
|
|||||||
|
|
||||||
<ha-expansion-panel
|
<ha-expansion-panel
|
||||||
leftChevron
|
leftChevron
|
||||||
.header=${describeTrigger(this.trigger)}
|
.header=${this.trigger.alias || describeTrigger(this.trigger)}
|
||||||
>
|
>
|
||||||
<ha-button-menu
|
<ha-button-menu
|
||||||
slot="icons"
|
slot="icons"
|
||||||
|
@ -25,6 +25,7 @@ import type { SchemaUnion } from "../../../../../components/ha-form/types";
|
|||||||
const stateTriggerStruct = assign(
|
const stateTriggerStruct = assign(
|
||||||
baseTriggerStruct,
|
baseTriggerStruct,
|
||||||
object({
|
object({
|
||||||
|
alias: optional(string()),
|
||||||
platform: literal("state"),
|
platform: literal("state"),
|
||||||
entity_id: optional(union([string(), array(string())])),
|
entity_id: optional(union([string(), array(string())])),
|
||||||
attribute: optional(string()),
|
attribute: optional(string()),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user