interface MicrowaveOvenControlBehavior {
    [reference]: Datasource<StateType>;
    agent: Agent;
    cluster: never;
    context: ActionContext;
    endpoint: Endpoint<Empty>;
    env: Environment;
    events: EventEmitter & Omit<ClusterEvents<Of<{
        attributes: {};
        commands: {};
        events: {};
        id: 0;
        name: "Unknown";
        revision: 0;
    }>, typeof ClusterBehavior>, never> & {
        cookTime$Changing: ClusterEvents.AttributeObservable<Attribute<number, any>>;
        maxCookTime$Changing: ClusterEvents.AttributeObservable<FixedAttribute<number, any>>;
    } & {
        wattRating$Changing: undefined | ClusterEvents.AttributeObservable<OptionalFixedAttribute<number, any>>;
    } & {
        cookTime$Changed: ClusterEvents.AttributeObservable<Attribute<number, any>>;
        maxCookTime$Changed: ClusterEvents.AttributeObservable<FixedAttribute<number, any>>;
    } & {
        wattRating$Changed: undefined | ClusterEvents.AttributeObservable<OptionalFixedAttribute<number, any>>;
    } & {} & {};
    features: TypeFromBitSchema<{}> & TypeFromBitSchema<{
        powerAsNumber: BitFlag;
        powerInWatts: BitFlag;
        powerNumberLimits: BitFlag;
    }>;
    session: SecureSession;
    state: Omit<ClusterState.Type<Of<{
        attributes: {};
        commands: {};
        events: {};
        id: 0;
        name: "Unknown";
        revision: 0;
    }>, typeof ClusterBehavior>, never> & {
        cookTime: number;
    } & {} & {
        maxCookTime: number;
    } & {
        wattRating?: number;
    };
    [asyncDispose](): MaybePromise;
    addMoreTime(request: MicrowaveOvenControl.AddMoreTimeRequest): MaybePromise;
    asAdmin(fn: (() => void)): void;
    assertAttributeEnabled<This, K>(this: This, attributeName: K): void;
    callback<A, R>(reactor: Reactor<A, R>, options?: Reactor.Options): ((...args: A) => undefined | R);
    initialize(_options?: {}): MaybePromise;
    reactTo<O>(observable: O, reactor: Reactor<Parameters<O["emit"]>, ReturnType<O["emit"]>>, options?: Reactor.Options): void;
    requireAttributeEnabled<This, K>(this: This, attributeName: K): Exclude<This["state"][K], undefined>;
    setCookingParameters(request: MicrowaveOvenControl.SetCookingParametersRequest): MaybePromise;
    toString(): string;
    State: any;
}

Hierarchy (view full)

Properties

[reference]: Datasource<StateType>
agent: Agent
cluster: never

The implemented cluster.

context: ActionContext
endpoint: Endpoint<Empty>
events: EventEmitter & Omit<ClusterEvents<Of<{
    attributes: {};
    commands: {};
    events: {};
    id: 0;
    name: "Unknown";
    revision: 0;
}>, typeof ClusterBehavior>, never> & {
    cookTime$Changing: ClusterEvents.AttributeObservable<Attribute<number, any>>;
    maxCookTime$Changing: ClusterEvents.AttributeObservable<FixedAttribute<number, any>>;
} & {
    wattRating$Changing: undefined | ClusterEvents.AttributeObservable<OptionalFixedAttribute<number, any>>;
} & {
    cookTime$Changed: ClusterEvents.AttributeObservable<Attribute<number, any>>;
    maxCookTime$Changed: ClusterEvents.AttributeObservable<FixedAttribute<number, any>>;
} & {
    wattRating$Changed: undefined | ClusterEvents.AttributeObservable<OptionalFixedAttribute<number, any>>;
} & {} & {}

Access the behavior's events.

features: TypeFromBitSchema<{}> & TypeFromBitSchema<{
    powerAsNumber: BitFlag;
    powerInWatts: BitFlag;
    powerNumberLimits: BitFlag;
}>

Supported features as a flag object.

session: SecureSession
state: Omit<ClusterState.Type<Of<{
    attributes: {};
    commands: {};
    events: {};
    id: 0;
    name: "Unknown";
    revision: 0;
}>, typeof ClusterBehavior>, never> & {
    cookTime: number;
} & {} & {
    maxCookTime: number;
} & {
    wattRating?: number;
}

Access the behavior's state.

Type declaration

  • ReadonlycookTime: number

    Indicates the total cook time associated with the operation of the device.

    This attribute shall remain unchanged during the operation of the oven unless the value is changed via a command or out-of-band action.

    MatterSpecification.v13.Cluster § 8.13.5.1

Type declaration

  • ReadonlymaxCookTime: number

    Indicates the maximum value to which the CookTime attribute can be set.

    MatterSpecification.v13.Cluster § 8.13.5.2

Type declaration

  • Optional ReadonlywattRating?: number

    Indicates the rating, in Watts, of the microwave power of the oven.

    Supporting this attribute can assist clients in suggesting cooking settings for various foods and beverages.

    MatterSpecification.v13.Cluster § 8.13.5.9

Methods

  • Create a generic callback function that has the same properties as a Reactor.

    Like a reactor, the callback's "this" will be bound to an active Behavior instance. Because of this: The reactor MUST be a real JS function - arrow functions will not work!

    Type Parameters

    • A extends any[]
    • R

    Parameters

    Returns ((...args: A) => undefined | R)

      • (...args): undefined | R
      • Parameters

        • Rest...args: A

        Returns undefined | R

  • Behaviors are ephemeral and should not perform initialization in their constructor. They can override this method instead.

    This method may be synchronous or asyncronous. If asynchronous, the behavior will not be available for external use until initialization completes.

    Parameters

    • Optional_options: {}

      Returns MaybePromise

    • Install a Reactor.

      Important: The reactor MUST be a real JS function - arrow functions will not work!

      Type Parameters

      Parameters

      Returns void