mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-21 16:26:43 +00:00
Eliminate redundant "for" in trigger description (#13669)
This commit is contained in:
parent
d323ab6726
commit
47c0901df2
@ -143,11 +143,11 @@ export const describeTrigger = (
|
|||||||
if ("for" in trigger) {
|
if ("for" in trigger) {
|
||||||
let duration: string;
|
let duration: string;
|
||||||
if (typeof trigger.for === "number") {
|
if (typeof trigger.for === "number") {
|
||||||
duration = `for ${secondsToDuration(trigger.for)!}`;
|
duration = `${secondsToDuration(trigger.for)!}`;
|
||||||
} else if (typeof trigger.for === "string") {
|
} else if (typeof trigger.for === "string") {
|
||||||
duration = `for ${trigger.for}`;
|
duration = `${trigger.for}`;
|
||||||
} else {
|
} else {
|
||||||
duration = `for ${JSON.stringify(trigger.for)}`;
|
duration = `${JSON.stringify(trigger.for)}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
base += ` for ${duration}`;
|
base += ` for ${duration}`;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user