@george.talusan/homebridge-eufy-robovac
Version:
Homebridge Plugin for Eufy Robovac
44 lines (43 loc) • 2.08 kB
TypeScript
import type { API, ClusterStateMap, EndpointType, Logging, MatterAccessory } from 'homebridge';
export interface BaseMatterAccessoryConfig {
UUID: string;
displayName: string;
deviceType: EndpointType;
serialNumber: string;
manufacturer: string;
model: string;
firmwareRevision: string;
hardwareRevision: string;
context?: Record<string, unknown>;
clusters?: MatterAccessory['clusters'];
handlers?: MatterAccessory['handlers'];
parts?: MatterAccessory['parts'];
}
export declare abstract class BaseMatterAccessory implements MatterAccessory {
readonly UUID: string;
readonly displayName: string;
readonly deviceType: EndpointType;
readonly serialNumber: string;
readonly manufacturer: string;
readonly model: string;
readonly firmwareRevision: string;
readonly hardwareRevision: string;
readonly context: Record<string, unknown>;
readonly clusters?: MatterAccessory['clusters'];
readonly handlers?: MatterAccessory['handlers'];
readonly parts?: MatterAccessory['parts'];
protected readonly api: API;
protected readonly log: Logging;
private matterReady;
protected constructor(api: API, log: Logging, config: BaseMatterAccessoryConfig);
protected updateState<K extends keyof ClusterStateMap>(cluster: K, attributes: Partial<ClusterStateMap[K]>, partId?: string): Promise<void>;
protected updateState(cluster: string, attributes: Record<string, unknown>, partId?: string): Promise<void>;
setMatterReady(): void;
protected readState<K extends keyof ClusterStateMap>(cluster: K, partId?: string): Promise<Partial<ClusterStateMap[K]> | undefined>;
protected readState(cluster: string, partId?: string): Promise<Record<string, unknown> | undefined>;
protected logInfo(message: string, ...args: unknown[]): void;
protected logError(message: string, ...args: unknown[]): void;
protected logDebug(message: string, ...args: unknown[]): void;
protected logWarn(message: string, ...args: unknown[]): void;
toAccessory(): MatterAccessory;
}