import { PlatformAccessory, CharacteristicValue } from 'homebridge'; import { OpenRgbPlatform } from './platform'; import { Color, RgbDeviceContext } from './rgb'; /** * Platform Accessory * An instance of this class is created for each accessory the platform registers * Each accessory may expose multiple services of different service types. */ export declare class OpenRgbPlatformAccessory { private readonly platform; private readonly accessory; private service; private states; constructor(platform: OpenRgbPlatform, accessory: PlatformAccessory); /** * Handle the "GET" requests from HomeKit * These are sent when HomeKit wants to know the current state of the accessory, for example, checking if a Light bulb is on. * * GET requests should return as fast as possbile. A long delay here will result in * HomeKit being unresponsive and a bad user experience in general. * * If a device takes time to respond, you should update the status of the device * asynchronously instead using the `updateCharacteristic` method instead. * @example * this.service.updateCharacteristic(this.platform.Characteristic.On, true) * If you need to return an error to show the device as "Not Responding" in the Home app: * throw new this.platform.api.hap.HapStatusError(this.platform.api.hap.HAPStatus.SERVICE_COMMUNICATION_FAILURE); */ getOn(): Promise; getHue(): Promise; getSaturation(): Promise; getBrightness(): Promise; /** * Called to get the light color currently set on the device in HSV format. * Since this can only return a single color, the function must get just the first LED's * color and make the assumption that the others match it. * If the computer/SDK server is off, the light will appear to be off, not unresponsive. */ getLedsHsv(): Promise; /** Called to get whether the light is on or not. */ getLedsOn(): Promise; /** * Handle "SET" requests from HomeKit * These are sent when the user changes the state of an accessory, for example, changing the Brightness */ setOn(value: CharacteristicValue): Promise; setHue(value: CharacteristicValue): Promise; setSaturation(value: CharacteristicValue): Promise; setBrightness(value: CharacteristicValue): Promise; /** * Called to send the new light colors to the device when the accessory state is changed in a set handler. * This sets all LED's on the device to the same color. */ updateLeds(togglingPower?: boolean): Promise; } //# sourceMappingURL=platformAccessory.d.ts.map