import type { Service } from 'homebridge'; import type { GoveePlatform } from '../platform.js'; import type { GoveePlatformAccessoryWithControl, ExternalUpdateParams } from '../types.js'; import { GoveeDeviceBase } from './base.js'; /** * Light device handler for RGB/CCT lights. * Supports color, brightness, color temperature, and scene modes. */ export declare class LightDevice extends GoveeDeviceBase { private _service; private alController?; private cusChar; private readonly alShift; private readonly brightStep; private readonly colourSafeMode; private readonly minKelvin; private readonly maxKelvin; private scenes; private hasScenes; private musicService?; private musicConf?; private cacheMusicSensitivity; private cacheMusicHue; private cacheMusicSat; private cacheBright; private cacheBrightRaw; private cacheHue; private cacheSat; private cacheR; private cacheG; private cacheB; private cacheKelvin; private cacheMired; private cacheScene; private debounceBright; private debounceColour; private debounceCT; constructor(platform: GoveePlatform, accessory: GoveePlatformAccessoryWithControl); get service(): Service; init(): void; /** * Drop the legacy subtype-less Switch service. This cannot go through * `removeServiceIfExists`, which matches on UUID alone and so would delete the first * `gv-scene-*` tile instead — re-adding it later shifts its instance id and breaks the * name, room and automations the user bound to it. */ private removeLegacySwitchService; /** * Get the main lightbulb service, adding it if needed. * * Both this service and the music tile are Lightbulbs, and `getService()` matches on * UUID alone, so the main service is identified by having no subtype. hap-nodejs also * refuses to add a second subtype-less service of a UUID that is already present, so * any other Lightbulb has to stand aside whenever this one is added — `setupMusicMode` * recreates the music tile immediately afterwards. */ private ensureMainLightbulb; private setupSceneCharacteristics; /** * Wire up the original fixed slots (`scene`, `diyMode`, `musicMode`, …), each of * which is a hand-pasted code bound to a custom Eve characteristic or a switch. */ private setupLegacySceneSlots; /** * Wire up scenes picked from the Govee scene library. These are unbounded in number, * so each gets its own switch service rather than a custom characteristic. */ private setupLibraryScenes; /** * Drop switch services for scenes the user has since removed from the config. * Without this they would linger in HomeKit as dead tiles. */ private pruneStaleSceneServices; private setupSceneAsSwitch; private setupSceneAsEve; /** * Live music mode, exposed as its own lightbulb service so that sensitivity and * colour are adjustable from HomeKit instead of frozen into a pasted code: * On toggles music mode, Brightness is the microphone sensitivity, and Hue and * Saturation set the colour used when auto-colour is off. */ private setupMusicMode; private internalMusicUpdate; /** * Clear every scene indicator, optionally leaving one on. Used whenever the active * mode changes so HomeKit does not show two modes active at once. */ private resetSceneIndicators; private setupColourModeCharacteristic; private setupLightbulbCharacteristics; private setupAdaptiveLighting; private internalStateUpdate; private internalBrightnessUpdate; private internalColourUpdate; private internalCTUpdate; private internalSceneUpdate; externalUpdate(params: ExternalUpdateParams): void; private handleExternalColourUpdate; } export default LightDevice;