import type { Service, PlatformConfig, CharacteristicValue, CharacteristicSetCallback, CharacteristicGetCallback } from 'homebridge'; import { HomebridgeMagichomeDynamicPlatform } from './platform'; import { Transport } from './magichome-interface/Transport'; import { MagicHomeAccessory, IDeviceProps } from './magichome-interface/types'; /** * 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 HomebridgeMagichomeDynamicPlatformAccessory { protected readonly platform: HomebridgeMagichomeDynamicPlatform; protected readonly accessory: MagicHomeAccessory; readonly config: PlatformConfig; protected service: Service; protected myDevice: IDeviceProps; protected transport: Transport; protected colorWhiteThreshold: any; protected colorWhiteThresholdSimultaniousDevices: any; protected colorOffThresholdSimultaniousDevices: any; protected simultaniousDevicesColorWhite: any; activeAnimation: { name: string; brightnessInterrupt: boolean; hueSaturationInterrupt: boolean; }; protected setColortemp: boolean; protected colorCommand: boolean; protected deviceWriteInProgress: boolean; protected deviceWriteRetry: any; protected deviceUpdateInProgress: boolean; protected deviceReadInProgress: boolean; logs: import("./logs").Logs; lightStateTemporary: { HSL: { hue: number; saturation: number; luminance: number; }; RGB: { red: number; green: number; blue: number; }; whiteValues: { warmWhite: number; coldWhite: number; }; isOn: boolean; brightness: number; CCT: number; }; protected lightState: { HSL: { hue: number; saturation: number; luminance: number; }; RGB: { red: number; green: number; blue: number; }; whiteValues: { warmWhite: number; coldWhite: number; }; isOn: boolean; brightness: number; CCT: number; }; constructor(platform: HomebridgeMagichomeDynamicPlatform, accessory: MagicHomeAccessory, config: PlatformConfig); setConfiguredName(value: CharacteristicValue, callback: CharacteristicSetCallback): void; identifyLight(): void; setHue(value: CharacteristicValue, callback: CharacteristicSetCallback): void; setSaturation(value: CharacteristicValue, callback: CharacteristicSetCallback): void; setBrightness(value: CharacteristicValue, callback: CharacteristicSetCallback): void; setColorTemperature(value: CharacteristicValue, callback: CharacteristicSetCallback): void; setOn(value: CharacteristicValue, callback: CharacteristicSetCallback): void; getHue(callback: CharacteristicGetCallback): void; getColorTemperature(callback: CharacteristicGetCallback): void; getBrightness(callback: CharacteristicGetCallback): void; /** ** @getOn * instantly retrieve the current on/off state stored in our object * next call this.getState() which will update all values asynchronously as they are ready */ getOn(callback: CharacteristicGetCallback): void; /** ** @updateLocalState * retrieve light's state object from transport class * once values are available, update homekit with actual values */ updateLocalState(): Promise; /** ** @updateHomekitState * send state to homekit */ updateHomekitState(): Promise; updateLocalHSL(_hsl: any): void; updateLocalRGB(_rgb: any): void; updateLocalWhiteValues(_whiteValues: any): void; updateLocalIsOn(_isOn: any): void; updateLocalBrightness(_brightness: any): void; /** ** @updateDeviceState * determine RGB and warmWhite/coldWhite values from homekit's HSL * perform different logic based on light's capabilities, detimined by "this.myDevice.lightVersion" * */ updateDeviceState(_timeout?: number): Promise; /** ** @calculateWhiteColor * determine warmWhite/coldWhite values from hue * the closer to 0/360 the weaker coldWhite brightness becomes * the closer to 180 the weaker warmWhite brightness becomes * the closer to 90/270 the stronger both warmWhite and coldWhite become simultaniously */ hueToWhiteTemperature(): { warmWhite: number; coldWhite: number; }; cctToWhiteTemperature(): { warmWhite: number; coldWhite: number; }; send(command: number[], useChecksum?: boolean, _timeout?: number): Promise; cacheCurrentLightState(): void; restoreCachedLightState(): Promise; flashEffect(): void; stopAnimation(): Promise; protected myTimer: any; protected timestamps: any[]; protected timeOfLastRead: any; protected timeOfLastWrite: any; processRequest(): void; /** * This is a debug function to show the number of listeners for each .on event. */ logListeners(): void; } //# sourceMappingURL=platformAccessory.d.ts.map