matterbridge
Version:
Matterbridge plugin manager for Matter
91 lines • 6.35 kB
TypeScript
/**
* @description This file contains the Dishwasher class.
* @file src/devices/dishwasher.ts
* @author Luca Liguori
* @created 2025-05-25
* @version 1.1.0
* @license Apache-2.0
*
* Copyright 2025, 2026, 2027 Luca Liguori.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { MaybePromise } from '@matter/main';
import { OperationalState } from '@matter/main/clusters/operational-state';
import { ModeBase } from '@matter/main/clusters/mode-base';
import { DishwasherModeServer } from '@matter/main/behaviors/dishwasher-mode';
import { DishwasherMode } from '@matter/main/clusters/dishwasher-mode';
import { MatterbridgeEndpoint } from '../matterbridgeEndpoint.js';
export declare class Dishwasher extends MatterbridgeEndpoint {
/**
* Creates an instance of the DishWasher class.
*
* @param {string} name - The name of the dish washer.
* @param {string} serial - The serial number of the dish washer.
* @param {number} [currentMode] - The current mode of the dish washer. Defaults to 2 (Normal mode). Dead Front OnOff Cluster will set this to 2 when turned off. Persistent attribute.
* @param {DishwasherMode.ModeOption[]} [supportedModes] - The supported modes of the dish washer. Defaults to a set of common modes (which include Light, Normal, Heavy). Fixed attribute.
* @param {number} [selectedTemperatureLevel] - The selected temperature level as an index of the supportedTemperatureLevels array. Defaults to 1 (which corresponds to 'Warm').
* @param {string[]} [supportedTemperatureLevels] - The supported temperature levels. Defaults to ['Cold', 'Warm', 'Hot', '30°', '40°', '60°', '80°']. Fixed attribute.
* @param {number} [temperatureSetpoint] - The temperature setpoint * 100. Defaults to 40 * 100 (which corresponds to 40°C).
* @param {number} [minTemperature] - The minimum temperature * 100. Defaults to 30 * 100 (which corresponds to 30°C). Fixed attribute.
* @param {number} [maxTemperature] - The maximum temperature * 100. Defaults to 60 * 100 (which corresponds to 60°C). Fixed attribute.
* @param {number} [step] - The step size for temperature changes. Defaults to 10 * 100 (which corresponds to 10°C). Fixed attribute.
* @param {OperationalState.OperationalStateEnum} [operationalState] - The operational state of the laundry washer. Defaults to OperationalState.OperationalStateEnum.Off.
*
* Remarks:
* - If `temperatureSetpoint` is provided, the `createNumberTemperatureControlClusterServer` method will be used to create the TemperatureControl Cluster Server with features TemperatureNumber and TemperatureStep.
* - If `temperatureSetpoint` is not provided, the `createLevelTemperatureControlClusterServer` method will be used to create the TemperatureControl Cluster Server with feature TemperatureLevel.
*/
constructor(name: string, serial: string, currentMode?: number, supportedModes?: DishwasherMode.ModeOption[], selectedTemperatureLevel?: number, supportedTemperatureLevels?: string[], temperatureSetpoint?: number, minTemperature?: number, maxTemperature?: number, step?: number, operationalState?: OperationalState.OperationalStateEnum);
/**
* Creates a TemperatureControl Cluster Server with feature TemperatureLevel.
*
* @param {number} selectedTemperatureLevel - The selected temperature level as an index of the supportedTemperatureLevels array. Defaults to 1 (which corresponds to 'Warm').
* @param {string[]} supportedTemperatureLevels - The supported temperature levels. Defaults to ['Cold', 'Warm', 'Hot', '30°', '40°', '60°', '80°'].
*
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
*/
createLevelTemperatureControlClusterServer(selectedTemperatureLevel?: number, supportedTemperatureLevels?: string[]): this;
/**
* Creates a TemperatureControl Cluster Server with features TemperatureNumber and TemperatureStep.
*
* @param {number} temperatureSetpoint - The temperature setpoint * 100. Defaults to 40 * 100 (which corresponds to 40°C).
* @param {number} minTemperature - The minimum temperature * 100. Defaults to 30 * 100 (which corresponds to 30°C). Fixed attribute.
* @param {number} maxTemperature - The maximum temperature * 100. Defaults to 60 * 100 (which corresponds to 60°C). Fixed attribute.
* @param {number} [step] - The step size for temperature changes. Defaults to 10 * 100 (which corresponds to 10°C). Fixed attribute.
*
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
*/
createNumberTemperatureControlClusterServer(temperatureSetpoint?: number, minTemperature?: number, maxTemperature?: number, step?: number): this;
/**
* Creates a default Dishwasher Mode Cluster Server.
*
* @param {number} currentMode - The current mode of the dishwasher. Persistent attribute.
* @param {DishwasherMode.ModeOption[]} supportedModes - The supported modes of the dishwasher. Defaults to a set of common modes (Light, Normal, Heavy). Fixed attribute.
*
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
*/
createDefaultDishwasherModeClusterServer(currentMode?: number, supportedModes?: DishwasherMode.ModeOption[]): this;
/**
* Creates a default Dishwasher Alarm Cluster Server.
*
* @returns {this} The current MatterbridgeEndpoint instance for chaining.
*/
createDefaultDishwasherAlarmClusterServer(): this;
}
export declare class MatterbridgeDishwasherModeServer extends DishwasherModeServer {
initialize(): void;
protected handleOnOffChange(onOff: boolean): void;
changeToMode(request: ModeBase.ChangeToModeRequest): MaybePromise<ModeBase.ChangeToModeResponse>;
}
//# sourceMappingURL=dishwasher.d.ts.map