/** * @license * Copyright 2022-2026 Matter.js Authors * SPDX-License-Identifier: Apache-2.0 */ /*** THIS FILE IS GENERATED, DO NOT EDIT ***/ import { IdentifyServer as BaseIdentifyServer } from "../behaviors/identify/IdentifyServer.js"; import { BooleanStateServer as BaseBooleanStateServer } from "../behaviors/boolean-state/BooleanStateServer.js"; import { BooleanStateConfigurationServer as BaseBooleanStateConfigurationServer } from "../behaviors/boolean-state-configuration/BooleanStateConfigurationServer.js"; import { MutableEndpoint } from "../endpoint/type/MutableEndpoint.js"; import { SupportedBehaviors } from "../endpoint/properties/SupportedBehaviors.js"; import { Identity } from "@matter/general"; /** * This defines conformance to the Rain Sensor device type. * * ### Cluster Requirements * * #### Identify Cluster * * This is used to identify the endpoint. * * #### Boolean State Cluster * * This is used to indicate the state of the sensor/detector. * * The state of the Boolean State cluster shall reflect the sensor detection using this scheme of: * * #### Boolean State Configuration Cluster * * This is used to configure the sensor/detector and is for this device type linked to the configuration of the Boolean * State cluster. * * @see {@link MatterSpecification.v161.Device} ยง 7.13 */ export interface RainSensorDevice extends Identity {} export namespace RainSensorRequirements { /** * The Identify cluster is required by the Matter specification. * * We provide this alias to the default implementation {@link IdentifyServer} for convenience. */ export const IdentifyServer = BaseIdentifyServer; /** * The BooleanState cluster is required by the Matter specification. * * This version of {@link BooleanStateServer} is specialized per the specification. */ export const BooleanStateServer = BaseBooleanStateServer .with("ChangeEvent") .alter({ events: { stateChange: { optional: false } } }); /** * The BooleanStateConfiguration cluster is optional per the Matter specification. * * We provide this alias to the default implementation {@link BooleanStateConfigurationServer} for convenience. */ export const BooleanStateConfigurationServer = BaseBooleanStateConfigurationServer; /** * An implementation for each server cluster supported by the endpoint per the Matter specification. */ export const server = { mandatory: { Identify: IdentifyServer, BooleanState: BooleanStateServer }, optional: { BooleanStateConfiguration: BooleanStateConfigurationServer } }; } export const RainSensorDeviceDefinition = MutableEndpoint({ name: "RainSensor", deviceType: 0x44, deviceRevision: 2, requirements: RainSensorRequirements, behaviors: SupportedBehaviors( RainSensorRequirements.server.mandatory.Identify, RainSensorRequirements.server.mandatory.BooleanState ) }); Object.freeze(RainSensorDeviceDefinition); export const RainSensorDevice: RainSensorDevice = RainSensorDeviceDefinition;