import type { Block } from './block.ts'; import type { IFullBlocksClient, ITrigger, ITarget, IMutableNode, IBlocksNode, IEventBus } from '../types/index.ts'; import type { IMQTTConnection } from '@hass-blocks/hass-mqtt'; /** * @public * * The configuration object for a trigger */ export interface ITriggerConfig { /** * The name of the trigger */ name: string; /** * A id string for the trigger (must be unique) */ id?: string; /** * The Home Assistant trigger parameters (See {@link https://www.home-assistant.io/docs/automation/trigger/}) */ trigger: Record; /** * A list of targets used by the trigger. The framework will validate the targets on boot and * at regular intervals */ targets?: ITarget[]; } export declare class Trigger implements IMutableNode { config: ITriggerConfig; readonly name: string; readonly id: string; readonly trigger: Record; readonly type = "trigger"; private _children; addChild(...node: IMutableNode[]): void; constructor(config: ITriggerConfig); addNext(node: IMutableNode): void; initialise(hass: IFullBlocksClient, mqtt: IMQTTConnection): Promise; get children(): IBlocksNode[]; toJson(): IBlocksNode; attachToClient(client: IFullBlocksClient, block: Block, events: IEventBus): Promise; } /** * @public * * Associate the automation with a Home Assistant trigger. For more details, see {@link https://www.home-assistant.io/docs/automation/trigger/ | the Home Assistant docs} */ export declare const trigger: (config: ITriggerConfig) => ITrigger; //# sourceMappingURL=trigger.d.ts.map