This is the default server implementation of FanControlBehavior.

Hierarchy (view full)

Constructors

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> & {
    fanMode$Changing: ClusterEvents.AttributeObservable<WritableAttribute<FanControl.FanMode, any>>;
    fanModeSequence$Changing: ClusterEvents.AttributeObservable<FixedAttribute<FanControl.FanModeSequence, any>>;
    percentCurrent$Changing: ClusterEvents.AttributeObservable<Attribute<number, any>>;
    percentSetting$Changing: ClusterEvents.AttributeObservable<WritableAttribute<null | number, any>>;
} & {} & {
    fanMode$Changed: ClusterEvents.AttributeObservable<WritableAttribute<FanControl.FanMode, any>>;
    fanModeSequence$Changed: ClusterEvents.AttributeObservable<FixedAttribute<FanControl.FanModeSequence, any>>;
    percentCurrent$Changed: ClusterEvents.AttributeObservable<Attribute<number, any>>;
    percentSetting$Changed: ClusterEvents.AttributeObservable<WritableAttribute<null | number, any>>;
} & {} & {} & {}

Access the behavior's events.

features: TypeFromBitSchema<{}> & TypeFromBitSchema<{
    airflowDirection: BitFlag;
    auto: BitFlag;
    multiSpeed: BitFlag;
    rocking: BitFlag;
    step: BitFlag;
    wind: 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> & {
    fanMode: FanControl.FanMode;
    percentCurrent: number;
    percentSetting: null | number;
} & {} & {
    fanModeSequence: FanControl.FanModeSequence;
} & {}

Access the behavior's state.

Type declaration

  • ReadonlyfanMode: FanControl.FanMode

    Indicates the current speed mode of the fan. This attribute may be written by the client to request a different fan mode. A server shall return INVALID_IN_STATE to indicate that the fan is not in a state where the FanMode can be changed to the requested value. A server may have FanMode values that it can never be set to. For example, where this cluster appears on the same or another endpoint as other clusters with a system dependency, for example the Thermostat cluster, attempting to set the FanMode attribute of this cluster to Off may not be allowed by the system.

    This attribute shall be set to one of the values in FanModeEnum.

    When the FanMode attribute is successfully written to, the PercentSetting and SpeedSetting (if present) attributes shall be set to appropriate values, as defined by the Percent Rules and Speed Rules respectively, unless otherwise specified below.

    When the FanMode attribute is set to any given mode, the PercentCurrent and SpeedCurrent (if present) shall indicate the actual currently operating fan speed, unless otherwise specified below.

    MatterSpecification.v13.Cluster § 4.4.6.1

  • ReadonlypercentCurrent: number

    Indicates the actual currently operating fan speed, or zero to indicate that the fan is off. There may be a temporary mismatch between the value of this attribute and the value of the PercentSetting attribute due to other system requirements that would not allow the fan to operate at the requested setting. See Percent Rules for more details.

    MatterSpecification.v13.Cluster § 4.4.6.4

  • ReadonlypercentSetting: null | number

    Indicates the speed setting for the fan. This attribute may be written by the client to indicate a new fan speed. If the client writes null to this attribute, the attribute value shall NOT change. A server shall return INVALID_IN_STATE to indicate that the fan is not in a state where the PercentSetting can be changed to the requested value.

    If this is successfully written to 0, the server shall set the FanMode attribute value to Off.

    MatterSpecification.v13.Cluster § 4.4.6.3

Type declaration

  • ReadonlyfanModeSequence: FanControl.FanModeSequence

    This attribute indicates the fan speed ranges that shall be supported.

    MatterSpecification.v13.Cluster § 4.4.6.2

Base cluster state include all attribute values but may be extended by subclasses.

defaults: ClusterState.Type<FanControl.Cluster, Type<Of<{
    attributes: {};
    commands: {};
    events: {};
    id: 0;
    name: "Unknown";
    revision: 0;
}>, typeof ClusterBehavior, FanControlInterface>>
dependencies?: Iterable<Type, any, any>
early: boolean
Events: ClusterEvents.Type<FanControl.Cluster, Type<Of<{
    attributes: {};
    commands: {};
    events: {};
    id: 0;
    name: "Unknown";
    revision: 0;
}>, typeof ClusterBehavior, FanControlInterface>>
ExtensionInterface: {}
id

The behavior ID for ClusterBehaviors is the name of the cluster.

Internal: (new () => {})
name: string
schema?: Schema
State: (new () => ClusterState.Type<FanControl.Cluster, Type<Of<{
    attributes: {};
    commands: {};
    events: {};
    id: 0;
    name: "Unknown";
    revision: 0;
}>, typeof ClusterBehavior, FanControlInterface>>)
supervisor: RootSupervisor
supports: ((other: Type) => boolean)

Type declaration

    • (other): boolean
    • Does this behavior support functionality of a specific implementation?

      Parameters

      Returns boolean

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