This defines conformance to the Rain Sensor device type.

MatterSpecification.v13.Device § 7.13

interface RainSensorDevice {
    behaviors: {
        identify: typeof IdentifyServer;
    } & {
        booleanState: Type<WithAlterations<BooleanState.Cluster, {
            events: {
                stateChange: {
                    optional: false;
                };
            };
        }>, typeof BooleanStateServer, {
            components: never[];
        }>;
    };
    defaults: StateOf<{
        identify: typeof IdentifyServer;
    } & {
        booleanState: Type<WithAlterations<BooleanState.Cluster, {
            events: {
                stateChange: {
                    optional: false;
                };
            };
        }>, typeof BooleanStateServer, {
            components: never[];
        }>;
    }>;
    deviceClass: DeviceClassification;
    deviceRevision: number;
    deviceType: DeviceTypeId;
    name: "RainSensor";
    requirements: typeof RainSensorRequirements;
    set(defaults: InputStateOf<{
        identify: typeof IdentifyServer;
    } & {
        booleanState: Type<WithAlterations<BooleanState.Cluster, {
            events: {
                stateChange: {
                    optional: false;
                };
            };
        }>, typeof BooleanStateServer, {
            components: never[];
        }>;
    }>): With<For<{
        behaviors: {
            identify: typeof IdentifyServer;
        } & {
            booleanState: Type<WithAlterations<BooleanState.Cluster, {
                events: {
                    stateChange: {
                        optional: false;
                    };
                };
            }>, typeof BooleanStateServer, {
                components: never[];
            }>;
        };
        deviceRevision: 1;
        deviceType: 68;
        name: "RainSensor";
        requirements: typeof RainSensorRequirements;
    }>, {
        identify: typeof IdentifyServer;
    } & {
        booleanState: Type<WithAlterations<BooleanState.Cluster, {
            events: {
                stateChange: {
                    optional: false;
                };
            };
        }>, typeof BooleanStateServer, {
            components: never[];
        }>;
    }>;
    with<const BL>(...behaviors: BL): With<For<{
        behaviors: {
            identify: typeof IdentifyServer;
        } & {
            booleanState: Type<WithAlterations<BooleanState.Cluster, {
                events: {
                    stateChange: {
                        optional: false;
                    };
                };
            }>, typeof BooleanStateServer, {
                components: never[];
            }>;
        };
        deviceRevision: 1;
        deviceType: 68;
        name: "RainSensor";
        requirements: typeof RainSensorRequirements;
    }>, With<{
        identify: typeof IdentifyServer;
    } & {
        booleanState: Type<WithAlterations<BooleanState.Cluster, {
            events: {
                stateChange: {
                    optional: false;
                };
            };
        }>, typeof BooleanStateServer, {
            components: never[];
        }>;
    }, BL>>;
}

Hierarchy (view full)

Properties

behaviors: {
    identify: typeof IdentifyServer;
} & {
    booleanState: Type<WithAlterations<BooleanState.Cluster, {
        events: {
            stateChange: {
                optional: false;
            };
        };
    }>, typeof BooleanStateServer, {
        components: never[];
    }>;
}
defaults: StateOf<{
    identify: typeof IdentifyServer;
} & {
    booleanState: Type<WithAlterations<BooleanState.Cluster, {
        events: {
            stateChange: {
                optional: false;
            };
        };
    }>, typeof BooleanStateServer, {
        components: never[];
    }>;
}>

Access default state values.

deviceRevision: number
deviceType: DeviceTypeId
name
requirements: typeof RainSensorRequirements

Methods

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

    Parameters

    • defaults: InputStateOf<{
          identify: typeof IdentifyServer;
      } & {
          booleanState: Type<WithAlterations<BooleanState.Cluster, {
              events: {
                  stateChange: {
                      optional: false;
                  };
              };
          }>, typeof BooleanStateServer, {
              components: never[];
          }>;
      }>

    Returns With<For<{
        behaviors: {
            identify: typeof IdentifyServer;
        } & {
            booleanState: Type<WithAlterations<BooleanState.Cluster, {
                events: {
                    stateChange: {
                        optional: false;
                    };
                };
            }>, typeof BooleanStateServer, {
                components: never[];
            }>;
        };
        deviceRevision: 1;
        deviceType: 68;
        name: "RainSensor";
        requirements: typeof RainSensorRequirements;
    }>, {
        identify: typeof IdentifyServer;
    } & {
        booleanState: Type<WithAlterations<BooleanState.Cluster, {
            events: {
                stateChange: {
                    optional: false;
                };
            };
        }>, typeof BooleanStateServer, {
            components: never[];
        }>;
    }>

  • 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;
        } & {
            booleanState: Type<WithAlterations<BooleanState.Cluster, {
                events: {
                    stateChange: {
                        optional: false;
                    };
                };
            }>, typeof BooleanStateServer, {
                components: never[];
            }>;
        };
        deviceRevision: 1;
        deviceType: 68;
        name: "RainSensor";
        requirements: typeof RainSensorRequirements;
    }>, With<{
        identify: typeof IdentifyServer;
    } & {
        booleanState: Type<WithAlterations<BooleanState.Cluster, {
            events: {
                stateChange: {
                    optional: false;
                };
            };
        }>, typeof BooleanStateServer, {
            components: never[];
        }>;
    }, BL>>