import { Block } from '../core/index.ts'; import { type BlockOutput, type ITrigger, type IBaseBlockConfig, type IRunContext, ExecutionMode, type IFullBlocksClient, type IMutableNode } from '../types/index.ts'; import type { GetSequenceInput, GetSequenceOutput, ValidateSequence, BlockRetainType } from '../sequence-validator/index.ts'; import type { IMQTTConnection } from '@hass-blocks/hass-mqtt'; /** * @public * * Configuration object for automation blocks */ export interface IAutomationConfig[], TInput = GetSequenceInput, TOutput = GetSequenceOutput> extends IBaseBlockConfig { /** * Sequence of blocks to execute when the trigger is fired */ then: (BlockRetainType & TSequence & ValidateSequence) | Block; /** * Trigger will result in this block being executed */ when?: ITrigger | ITrigger[]; /** * Whether to execute the blocks in sequnce or in parallel */ mode?: ExecutionMode; } export declare class Automation[], TInput = GetSequenceInput, TOutput = GetSequenceOutput> extends Block { config: IAutomationConfig; readonly name: string; private runQueue; constructor(config: IAutomationConfig); type: string; addNext(node?: IMutableNode): void; private linkContainedNodes; initialise(client: IFullBlocksClient, mqtt: IMQTTConnection): Promise; run({ hass, input, events, triggerId, }: IRunContext): Promise>; } /** * @public * * An automation represents a sequence of actions that can either be executed in sequence * or in parallel. When passed into */ export declare const automation: [], TInput = GetSequenceInput, TOutput = GetSequenceOutput>(config: IAutomationConfig) => Block; //# sourceMappingURL=automation.d.ts.map