/** * Temperature Service Handler * * Implements the HomeKit TemperatureSensor service for Dyson devices. * Converts Dyson temperature format (Kelvin × 10) to Celsius. */ import type { API, Logging, PlatformAccessory, Service } from 'homebridge'; import type { DysonDevice } from '../../devices/dysonDevice.js'; /** * Configuration for TemperatureService */ export interface TemperatureServiceConfig { accessory: PlatformAccessory; device: DysonDevice; api: API; log: Logging; /** Temperature offset in Celsius (can be positive or negative) */ temperatureOffset?: number; /** Use Fahrenheit for logging (HomeKit always uses Celsius internally) */ useFahrenheit?: boolean; /** Primary service to link this service to */ primaryService?: Service; } /** * TemperatureService handles the TemperatureSensor HomeKit service * * Maps HomeKit characteristics to Dyson device state: * - CurrentTemperature (Celsius) ↔ temperature (Kelvin × 10) */ export declare class TemperatureService { private readonly service; private readonly device; private readonly log; private readonly api; private readonly temperatureOffset; private readonly useFahrenheit; private readonly boundHandleStateChange; constructor(config: TemperatureServiceConfig); /** * Get the underlying HomeKit service */ getService(): Service; /** * Clean up event listeners */ destroy(): void; /** * Handle CurrentTemperature GET request * Returns temperature in Celsius (HomeKit standard) */ private handleTemperatureGet; /** * Log temperature in configured unit */ private logTemperature; /** * Convert Dyson temperature (Kelvin × 10) to Celsius with offset * * @param kelvinTimes10 - Temperature in Kelvin × 10 (e.g., 2950 = 295K = 21.85°C) * @returns Temperature in Celsius with offset applied, or default if invalid */ private convertTemperature; /** * Handle device state changes * Updates HomeKit characteristic to reflect current device state */ private handleStateChange; /** * Update characteristic from current device state * Call this after connecting to sync HomeKit with device */ updateFromState(): void; } //# sourceMappingURL=temperatureService.d.ts.map