@wanderxjtu/homebridge-yeelighter
Version:
Yeelight support for Homebridge with particular support of ceiling lights
80 lines • 3.03 kB
TypeScript
import { PlatformAccessory, Service } from "homebridge";
import { YeelighterPlatform } from "./platform";
import { Specs } from "./specs";
import { Device, DeviceInfo } from "./yeedevice";
import { Attributes } from "./lightservice";
export declare const TRACKED_ATTRIBUTES: string[];
export interface OverrideLightConfiguration {
id: string;
name?: string;
color?: boolean;
backgroundLight?: boolean;
nightLight?: boolean;
ignored?: boolean;
colorTemperature?: ColorTemperatureConfiguration;
log?: boolean;
offOnDisconnect?: boolean;
useNameAsId?: boolean;
separateAmbient?: boolean;
[k: string]: any;
}
export interface ColorTemperatureConfiguration {
min: number;
max: number;
}
/**
* Platform Accessory
* An instance of this class is created for each accessory your platform registers
* Each accessory may expose multiple services of different service types.
*/
export declare class YeeAccessory {
private readonly platform;
readonly device: Device;
private readonly accessory;
private readonly ambientAccessory?;
private services;
private _detailedLogging;
connected: boolean;
name: string;
readonly specs: Specs;
displayName: string;
private support;
private updateTimestamp;
private updateResolve?;
private updateReject?;
private updatePromise?;
private updatePromisePending;
private attributes;
private lastCommandId;
private queryTimestamp;
overrideConfig?: OverrideLightConfiguration;
private interval?;
private transactions;
private static handledAccessories;
static instance(device: Device, platform: YeelighterPlatform, accessory: PlatformAccessory, ambientAccessory?: PlatformAccessory): YeeAccessory;
get detailedLogging(): boolean;
private constructor();
get info(): DeviceInfo;
protected get config(): OverrideLightConfiguration;
debug: (message?: unknown, ...optionalParameters: unknown[]) => void;
log: (message?: unknown, ...optionalParameters: unknown[]) => void;
warn: (message?: unknown, ...optionalParameters: unknown[]) => void;
error: (message?: unknown, ...optionalParameters: unknown[]) => void;
getAttributes: () => Promise<Attributes>;
setAttributes(attributes: Partial<Attributes>): void;
private onDeviceUpdate;
private onUpdateAttributes;
private onDeviceConnected;
private onDeviceDisconnected;
private onDeviceError;
connectDevice(device: Device): void;
identify(callback: () => void): void;
setNameService(service: Service): void;
setInfoService(override: OverrideLightConfiguration | undefined, accessory: PlatformAccessory): Service;
sendCommand(method: string, parameters: Array<string | number | boolean>): number;
sendCommandPromise(method: string, parameters: Array<string | number | boolean>): Promise<void>;
private clearOldTransactions;
private onInterval;
requestAttributes(): Promise<void>;
}
//# sourceMappingURL=yeeaccessory.d.ts.map