Skip to content

Commit

Permalink
Add sequence action support (#3180)
Browse files Browse the repository at this point in the history
  • Loading branch information
frenck authored Sep 30, 2024
1 parent 7dbb4b7 commit 2d6d75a
Showing 1 changed file with 27 additions and 10 deletions.
37 changes: 27 additions & 10 deletions src/language-service/src/schemas/integrations/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export type Action =
| RepeatAction
| SceneAction
| ServiceAction
| SequenceAction
| StopAction
| WaitForTriggerAction
| WaitTemplateAction
Expand Down Expand Up @@ -247,16 +248,7 @@ export interface ParallelAction {
* The sequence of actions to run in parallel.
* https://www.home-assistant.io/docs/scripts/#parallelizing-actions
*/
parallel:
| (
| {
sequence: Action | Action[] | IncludeList;
}
| Action
| Action[]
| IncludeList
)[]
| IncludeList;
parallel: (Action | Action[] | IncludeList)[] | IncludeList;
}

export interface RepeatAction {
Expand Down Expand Up @@ -344,6 +336,31 @@ export interface SceneAction {
metadata?: any;
}

export interface SequenceAction {
/**
* Alias for the sequence action.
*/
alias?: string;

/**
* Every individual action can be disabled, without removing it.
* https://www.home-assistant.io/docs/scripts/#disabling-an-action
*/
enabled?: boolean;

/**
* Set it to true if you’d like to continue the action sequence, regardless of whether that action encounters an error.
* https://www.home-assistant.io/docs/scripts/#continuing-on-error
*/
continue_on_error?: boolean;

/**
* The sequence of actions to run in serial
* https://www.home-assistant.io/docs/scripts/#grouping-actions
*/
sequence: Action | Action[] | IncludeList;
}

export interface ServiceAction {
/**
* Service call alias.
Expand Down

0 comments on commit 2d6d75a

Please sign in to comment.