A Flow Sensor device measures and reports the flow rate of a fluid.

MatterSpecification.v13.Device § 7.6

interface FlowSensorDevice {
    behaviors: {
        flowMeasurement: typeof FlowMeasurementServer;
    } & {
        identify: typeof IdentifyServer;
    };
    defaults: StateOf<{
        flowMeasurement: typeof FlowMeasurementServer;
    } & {
        identify: typeof IdentifyServer;
    }>;
    deviceClass: DeviceClassification;
    deviceRevision: number;
    deviceType: DeviceTypeId;
    name: "FlowSensor";
    requirements: typeof FlowSensorRequirements;
    set(defaults: InputStateOf<{
        flowMeasurement: typeof FlowMeasurementServer;
    } & {
        identify: typeof IdentifyServer;
    }>): With<For<{
        behaviors: {
            flowMeasurement: typeof FlowMeasurementServer;
        } & {
            identify: typeof IdentifyServer;
        };
        deviceRevision: 2;
        deviceType: 774;
        name: "FlowSensor";
        requirements: typeof FlowSensorRequirements;
    }>, {
        flowMeasurement: typeof FlowMeasurementServer;
    } & {
        identify: typeof IdentifyServer;
    }>;
    with<const BL>(...behaviors: BL): With<For<{
        behaviors: {
            flowMeasurement: typeof FlowMeasurementServer;
        } & {
            identify: typeof IdentifyServer;
        };
        deviceRevision: 2;
        deviceType: 774;
        name: "FlowSensor";
        requirements: typeof FlowSensorRequirements;
    }>, With<{
        flowMeasurement: typeof FlowMeasurementServer;
    } & {
        identify: typeof IdentifyServer;
    }, BL>>;
}

Hierarchy (view full)

Properties

behaviors: {
    flowMeasurement: typeof FlowMeasurementServer;
} & {
    identify: typeof IdentifyServer;
}
defaults: StateOf<{
    flowMeasurement: typeof FlowMeasurementServer;
} & {
    identify: typeof IdentifyServer;
}>

Access default state values.

deviceRevision: number
deviceType: DeviceTypeId
name
requirements: typeof FlowSensorRequirements

Methods

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

    Parameters

    Returns With<For<{
        behaviors: {
            flowMeasurement: typeof FlowMeasurementServer;
        } & {
            identify: typeof IdentifyServer;
        };
        deviceRevision: 2;
        deviceType: 774;
        name: "FlowSensor";
        requirements: typeof FlowSensorRequirements;
    }>, {
        flowMeasurement: typeof FlowMeasurementServer;
    } & {
        identify: typeof IdentifyServer;
    }>

  • 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: {
            flowMeasurement: typeof FlowMeasurementServer;
        } & {
            identify: typeof IdentifyServer;
        };
        deviceRevision: 2;
        deviceType: 774;
        name: "FlowSensor";
        requirements: typeof FlowSensorRequirements;
    }>, With<{
        flowMeasurement: typeof FlowMeasurementServer;
    } & {
        identify: typeof IdentifyServer;
    }, BL>>