mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-14 21:06:34 +00:00
Add actions to design gallery (#12518)
* Add actions to design gallery * Update describe-action.ts
This commit is contained in:
parent
f52e8c3392
commit
011467ece0
@ -73,6 +73,14 @@ const ACTIONS = [
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
stop: "No one is home!",
|
||||||
|
},
|
||||||
|
{ repeat: { count: 3, sequence: [{ delay: "00:00:01" }] } },
|
||||||
|
{
|
||||||
|
if: [{ condition: "state" }],
|
||||||
|
then: [{ delay: "00:00:01" }],
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@customElement("demo-automation-describe-action")
|
@customElement("demo-automation-describe-action")
|
||||||
|
@ -21,6 +21,9 @@ import { HaWaitAction } from "../../../../src/panels/config/automation/action/ty
|
|||||||
import { Action } from "../../../../src/data/script";
|
import { Action } from "../../../../src/data/script";
|
||||||
import { HaConditionAction } from "../../../../src/panels/config/automation/action/types/ha-automation-action-condition";
|
import { HaConditionAction } from "../../../../src/panels/config/automation/action/types/ha-automation-action-condition";
|
||||||
import { HaParallelAction } from "../../../../src/panels/config/automation/action/types/ha-automation-action-parallel";
|
import { HaParallelAction } from "../../../../src/panels/config/automation/action/types/ha-automation-action-parallel";
|
||||||
|
import { HaIfAction } from "../../../../src/panels/config/automation/action/types/ha-automation-action-if";
|
||||||
|
import { HaStopAction } from "../../../../src/panels/config/automation/action/types/ha-automation-action-stop";
|
||||||
|
import { HaPlayMediaAction } from "../../../../src/panels/config/automation/action/types/ha-automation-action-play_media";
|
||||||
|
|
||||||
const SCHEMAS: { name: string; actions: Action[] }[] = [
|
const SCHEMAS: { name: string; actions: Action[] }[] = [
|
||||||
{ name: "Event", actions: [HaEventAction.defaultConfig] },
|
{ name: "Event", actions: [HaEventAction.defaultConfig] },
|
||||||
@ -29,12 +32,15 @@ const SCHEMAS: { name: string; actions: Action[] }[] = [
|
|||||||
{ name: "Condition", actions: [HaConditionAction.defaultConfig] },
|
{ name: "Condition", actions: [HaConditionAction.defaultConfig] },
|
||||||
{ name: "Delay", actions: [HaDelayAction.defaultConfig] },
|
{ name: "Delay", actions: [HaDelayAction.defaultConfig] },
|
||||||
{ name: "Scene", actions: [HaSceneAction.defaultConfig] },
|
{ name: "Scene", actions: [HaSceneAction.defaultConfig] },
|
||||||
|
{ name: "Play media", actions: [HaPlayMediaAction.defaultConfig] },
|
||||||
{ name: "Wait", actions: [HaWaitAction.defaultConfig] },
|
{ name: "Wait", actions: [HaWaitAction.defaultConfig] },
|
||||||
{ name: "WaitForTrigger", actions: [HaWaitForTriggerAction.defaultConfig] },
|
{ name: "WaitForTrigger", actions: [HaWaitForTriggerAction.defaultConfig] },
|
||||||
{ name: "Repeat", actions: [HaRepeatAction.defaultConfig] },
|
{ name: "Repeat", actions: [HaRepeatAction.defaultConfig] },
|
||||||
|
{ name: "If-Then", actions: [HaIfAction.defaultConfig] },
|
||||||
{ name: "Choose", actions: [HaChooseAction.defaultConfig] },
|
{ name: "Choose", actions: [HaChooseAction.defaultConfig] },
|
||||||
{ name: "Variables", actions: [{ variables: { hello: "1" } }] },
|
{ name: "Variables", actions: [{ variables: { hello: "1" } }] },
|
||||||
{ name: "Parallel", actions: [HaParallelAction.defaultConfig] },
|
{ name: "Parallel", actions: [HaParallelAction.defaultConfig] },
|
||||||
|
{ name: "Stop", actions: [HaStopAction.defaultConfig] },
|
||||||
];
|
];
|
||||||
|
|
||||||
@customElement("demo-automation-editor-action")
|
@customElement("demo-automation-editor-action")
|
||||||
@ -88,6 +94,6 @@ class DemoHaAutomationEditorAction extends LitElement {
|
|||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface HTMLElementTagNameMap {
|
interface HTMLElementTagNameMap {
|
||||||
"demo-ha-automation-editor-action": DemoHaAutomationEditorAction;
|
"demo-automation-editor-action": DemoHaAutomationEditorAction;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user