UNPKG

homebridge-samsung-window-ac

Version:
113 lines (112 loc) 3.84 kB
import type { CharacteristicValue, PlatformAccessory } from 'homebridge'; import type { SamsungWindowACPlatform } from './platform.js'; /** * Platform Accessory * An instance of this class is created for each accessory your platform registers * Each accessory may expose multiple services of different service types. */ export declare class SamsungWindowACAccessory { private readonly platform; private readonly accessory; private service; private humidityService; /** * These are used to track the state of the air conditioner */ private acStates; /** * Cache for device status to reduce API calls */ private statusCache; private readonly CACHE_DURATION; /** * Individual characteristic caches to avoid unnecessary API calls */ private characteristicCaches; private readonly CHARACTERISTIC_CACHE_DURATION; /** * Convert Samsung AC mode to HomeKit mode */ private samsungModeToHomeKit; /** * Convert HomeKit mode to Samsung AC mode */ private homeKitModeToSamsung; /** * Clear all characteristic caches when device state changes */ private clearCharacteristicCaches; /** * Update specific characteristic cache with new value */ private updateCharacteristicCache; /** * Check if device physical state has changed (on/off) */ private checkPhysicalStateChange; /** * Get device status with caching */ private getDeviceStatus; constructor(platform: SamsungWindowACPlatform, accessory: PlatformAccessory); /** * Handle "SET" requests from HomeKit for Active */ setActive(value: CharacteristicValue): Promise<void>; /** * Handle "GET" requests from HomeKit for Active */ getActive(): Promise<CharacteristicValue>; /** * Handle "GET" requests from HomeKit for CurrentHeatingCoolingState */ getCurrentHeatingCoolingState(): Promise<CharacteristicValue>; /** * Handle "SET" requests from HomeKit for TargetHeatingCoolingState */ setTargetHeatingCoolingState(value: CharacteristicValue): Promise<void>; /** * Handle "GET" requests from HomeKit for TargetHeatingCoolingState */ getTargetHeatingCoolingState(): Promise<CharacteristicValue>; /** * Handle "GET" requests from HomeKit for CurrentTemperature */ getCurrentTemperature(): Promise<CharacteristicValue>; /** * Handle "SET" requests from HomeKit for TargetTemperature */ setTargetTemperature(value: CharacteristicValue): Promise<void>; /** * Handle "GET" requests from HomeKit for TargetTemperature */ getTargetTemperature(): Promise<CharacteristicValue>; /** * Handle "SET" requests from HomeKit for CoolingThresholdTemperature */ setCoolingThresholdTemperature(value: CharacteristicValue): Promise<void>; /** * Handle "GET" requests from HomeKit for CoolingThresholdTemperature */ getCoolingThresholdTemperature(): Promise<CharacteristicValue>; /** * Handle "SET" requests from HomeKit for HeatingThresholdTemperature */ setHeatingThresholdTemperature(value: CharacteristicValue): Promise<void>; /** * Handle "GET" requests from HomeKit for HeatingThresholdTemperature */ getHeatingThresholdTemperature(): Promise<CharacteristicValue>; /** * Handle "SET" requests from HomeKit for TemperatureDisplayUnits */ setTemperatureDisplayUnits(value: CharacteristicValue): Promise<void>; /** * Handle "GET" requests from HomeKit for TemperatureDisplayUnits */ getTemperatureDisplayUnits(): Promise<CharacteristicValue>; /** * Handle "GET" requests from HomeKit for CurrentHumidity */ getCurrentHumidity(): Promise<CharacteristicValue>; }