i-trigger

An object representing a Home Assistant trigger

Name i-trigger
Type Interface
Path packages/blocks/src/types/i-trigger.ts

Methods

attachToClient

Register the trigger with a Home Assistant client so that it actually fires when the conditions are met

Signature
    attachToClient(client: IFullBlocksClient, block: IBlock<unknown, unknown>, events: IEventBus): Promise<void>; 
Parameters
Name Type Description
client IFullBlocksClient An initialied blocks client
block IBlock<unknown, unknown> The block that will be executed when the trigger is fired
events IEventBus The internal event bus
Return Value
Promise<void>