/** * Filter Service Handler * * Implements the HomeKit FilterMaintenance service for Dyson devices. * Provides filter life percentage and change indication for HEPA and carbon filters. */ import type { API, Logging, PlatformAccessory, Service } from 'homebridge'; import type { DysonLinkDevice } from '../../devices/dysonLinkDevice.js'; /** * Configuration for FilterService */ export interface FilterServiceConfig { accessory: PlatformAccessory; device: DysonLinkDevice; api: API; log: Logging; /** Primary service to link this service to */ primaryService?: Service; } /** * FilterService handles the HomeKit FilterMaintenance service * * Maps Dyson filter data to HomeKit characteristics: * - FilterLifeLevel (0-100% based on HEPA filter) * - FilterChangeIndication (1 when filter life <= 10%) */ export declare class FilterService { private readonly service; private readonly device; private readonly log; private readonly api; private readonly boundHandleStateChange; constructor(config: FilterServiceConfig); /** * Get the underlying HomeKit service */ getService(): Service; /** * Clean up event listeners */ destroy(): void; /** * Calculate filter life percentage from hours remaining * * @param hoursRemaining - Hours of filter life remaining * @returns Percentage (0-100) */ private calculateFilterLifePercent; /** * Get the primary filter life (HEPA filter, with carbon as fallback) */ private getPrimaryFilterLife; /** * Handle FilterLifeLevel GET request * Returns 0-100 percentage */ private handleFilterLifeLevelGet; /** * Handle FilterChangeIndication GET request * Returns 1 if filter needs changing, 0 otherwise */ private handleFilterChangeIndicationGet; /** * Handle device state changes * Updates HomeKit characteristics to reflect current device state */ private handleStateChange; /** * Update characteristics from current device state * Call this after connecting to sync HomeKit with device */ updateFromState(): void; } //# sourceMappingURL=filterService.d.ts.map