homebridge
    Preparing search index...

    Type Alias MatterCommandHandler<TArgs>

    MatterCommandHandler: (
        args: TArgs,
        context?: MatterHandlerContext,
    ) => Promise<void> | void

    Matter command handler function type

    Handlers can be synchronous or asynchronous (returning a Promise). The args parameter contains the command arguments passed by Matter.js (optional). The context parameter provides information about which part triggered the handler (for composed devices).

    Type Parameters

    • TArgs = unknown

    Type Declaration

      • (args: TArgs, context?: MatterHandlerContext): Promise<void> | void
      • Parameters

        • args: TArgs
        • Optionalcontext: MatterHandlerContext

        Returns Promise<void> | void