/** * Platform Accessory Handler * * Creates and manages Dyson device accessories for Homebridge. * Uses the device catalog to determine device features and creates * appropriate HomeKit services based on device capabilities. */ import type { PlatformAccessory } from 'homebridge'; import type { DysonPureCoolPlatform } from './platform.js'; import { DysonLinkAccessory } from './accessories/dysonLinkAccessory.js'; import type { DysonLinkDevice } from './devices/dysonLinkDevice.js'; /** * DysonPlatformAccessory * * Handles the creation and lifecycle of Dyson device accessories. * Creates the appropriate device instance and accessory handler based * on the device's product type and features. */ export declare class DysonPlatformAccessory { private readonly platform; private readonly accessory; private readonly log; private device?; private accessoryHandler?; /** Retry interval when device is offline (5 minutes) */ private static readonly OFFLINE_RETRY_MS; private offlineRetryTimer?; private isIntentionalDisconnect; constructor(platform: DysonPureCoolPlatform, accessory: PlatformAccessory); /** * Validate device configuration */ private validateConfig; /** * Get credentials from config (supports both field names) */ private getCredentials; /** * Initialize the Dyson device and accessory handler */ private initializeDevice; /** mDNS discovery timeout for IP refresh */ private static readonly MDNS_TIMEOUT; /** * Attach a listener on the device's error event to catch MQTT reconnection exhaustion. * When the MQTT client gives up (device went offline mid-session), schedule a periodic retry. */ private attachDeviceErrorListener; /** * Schedule a connection retry after OFFLINE_RETRY_MS. * Called both after a failed initial connection and after MQTT reconnection exhaustion. */ private scheduleOfflineRetry; /** * Connect to the Dyson device. * If connection fails with cached IP, attempts mDNS rediscovery. * If the device is truly offline, schedules a retry every 5 minutes. */ private connectDevice; /** * Rediscover device IP via mDNS */ private rediscoverDeviceIp; /** * Extract device options from config */ private extractDeviceOptions; /** * Disconnect from the Dyson device */ disconnect(): Promise; /** * Get the device instance */ getDevice(): DysonLinkDevice | undefined; /** * Get the accessory handler */ getAccessoryHandler(): DysonLinkAccessory | undefined; } //# sourceMappingURL=platformAccessory.d.ts.map