An Air Purifier is a standalone device that is designed to clean the air in a room.

It is a device that has a fan to control the air speed while it is operating. Optionally, it can report on the condition of its filters.

MatterSpecification.v13.Device § 9.3

interface AirPurifierDevice {
    behaviors: {
        identify: typeof IdentifyServer;
    } & {
        fanControl: typeof FanControlServer;
    };
    defaults: StateOf<{
        identify: typeof IdentifyServer;
    } & {
        fanControl: typeof FanControlServer;
    }>;
    deviceClass: DeviceClassification;
    deviceRevision: number;
    deviceType: DeviceTypeId;
    name: "AirPurifier";
    requirements: typeof AirPurifierRequirements;
    set(defaults: InputStateOf<{
        identify: typeof IdentifyServer;
    } & {
        fanControl: typeof FanControlServer;
    }>): With<For<{
        behaviors: {
            identify: typeof IdentifyServer;
        } & {
            fanControl: typeof FanControlServer;
        };
        deviceRevision: 1;
        deviceType: 45;
        name: "AirPurifier";
        requirements: typeof AirPurifierRequirements;
    }>, {
        identify: typeof IdentifyServer;
    } & {
        fanControl: typeof FanControlServer;
    }>;
    with<const BL>(...behaviors: BL): With<For<{
        behaviors: {
            identify: typeof IdentifyServer;
        } & {
            fanControl: typeof FanControlServer;
        };
        deviceRevision: 1;
        deviceType: 45;
        name: "AirPurifier";
        requirements: typeof AirPurifierRequirements;
    }>, With<{
        identify: typeof IdentifyServer;
    } & {
        fanControl: typeof FanControlServer;
    }, BL>>;
}

Hierarchy (view full)

Properties

behaviors: {
    identify: typeof IdentifyServer;
} & {
    fanControl: typeof FanControlServer;
}
defaults: StateOf<{
    identify: typeof IdentifyServer;
} & {
    fanControl: typeof FanControlServer;
}>

Access default state values.

deviceRevision: number
deviceType: DeviceTypeId
name
requirements: typeof AirPurifierRequirements

Methods

  • Define an endpoint like this one with different defaults. Only updates values present in the input object.

    Parameters

    Returns With<For<{
        behaviors: {
            identify: typeof IdentifyServer;
        } & {
            fanControl: typeof FanControlServer;
        };
        deviceRevision: 1;
        deviceType: 45;
        name: "AirPurifier";
        requirements: typeof AirPurifierRequirements;
    }>, {
        identify: typeof IdentifyServer;
    } & {
        fanControl: typeof FanControlServer;
    }>

  • Define an endpoint like this one with additional and/or replacement server behaviors.

    Type Parameters

    • const BL extends List

    Parameters

    • Rest...behaviors: BL

    Returns With<For<{
        behaviors: {
            identify: typeof IdentifyServer;
        } & {
            fanControl: typeof FanControlServer;
        };
        deviceRevision: 1;
        deviceType: 45;
        name: "AirPurifier";
        requirements: typeof AirPurifierRequirements;
    }>, With<{
        identify: typeof IdentifyServer;
    } & {
        fanControl: typeof FanControlServer;
    }, BL>>