/** * Heater Cooler Service Handler * * Implements the HomeKit HeaterCooler service for HP-series Dyson devices. * Supports heating control with target temperature. */ import type { API, Logging, PlatformAccessory, Service } from 'homebridge'; import type { DysonLinkDevice } from '../../devices/dysonLinkDevice.js'; /** * Configuration for HeaterCoolerService */ export interface HeaterCoolerServiceConfig { accessory: PlatformAccessory; device: DysonLinkDevice; api: API; log: Logging; /** Primary service to link this service to */ primaryService?: Service; } /** * HeaterCoolerService handles the HeaterCooler HomeKit service * * Maps HomeKit characteristics to Dyson device state: * - Active (0/1) ↔ isOn (boolean) * - CurrentHeaterCoolerState (INACTIVE/IDLE/HEATING/COOLING) * - TargetHeaterCoolerState (AUTO/HEAT/COOL) ↔ heatingEnabled * - CurrentTemperature ↔ temperature * - HeatingThresholdTemperature ↔ targetTemperature */ export declare class HeaterCoolerService { private readonly service; private readonly device; private readonly log; private readonly api; private readonly boundHandleStateChange; private readonly CURRENT_STATE; private readonly TARGET_STATE; constructor(config: HeaterCoolerServiceConfig); /** * Get the underlying HomeKit service */ getService(): Service; /** * Clean up event listeners */ destroy(): void; /** * Handle Active GET request * Returns 1 (ACTIVE) or 0 (INACTIVE) */ private handleActiveGet; /** * Handle Active SET request * @param value - 1 (ACTIVE) or 0 (INACTIVE) */ private handleActiveSet; /** * Handle CurrentHeaterCoolerState GET request * Returns current operational state */ private handleCurrentStateGet; /** * Handle TargetHeaterCoolerState GET request * Always returns HEAT since that's the only supported mode * On/off is controlled via Active characteristic */ private handleTargetStateGet; /** * Handle CurrentTemperature GET request * Returns current room temperature in Celsius */ private handleCurrentTemperatureGet; /** * Handle HeatingThresholdTemperature GET request * Returns target temperature in Celsius */ private handleHeatingThresholdGet; /** * Handle HeatingThresholdTemperature SET request * @param value - Target temperature in Celsius */ private handleHeatingThresholdSet; /** * Convert Dyson temperature (Kelvin × 10) to Celsius * * @param kelvinTimes10 - Temperature in Kelvin × 10 * @returns Temperature in Celsius, or default if invalid */ private convertTemperature; /** * Convert Dyson target temperature (Kelvin × 10) to Celsius * * @param kelvinTimes10 - Target temperature in Kelvin × 10 * @returns Temperature in Celsius, or default if invalid */ private convertTargetTemperature; /** * 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=heaterCoolerService.d.ts.map