homebridge-tsvesync
Version:
Homebridge plugin for VeSync devices including Levoit air purifiers, humidifiers, and Etekcity smart outlets
118 lines • 3.59 kB
TypeScript
import { PlatformAccessory } from 'homebridge';
import { BaseAccessory } from './base.accessory';
import { TSVESyncPlatform } from '../platform';
import { DeviceCapabilities, VeSyncHumidifier } from '../types/device.types';
export declare class HumidifierAccessory extends BaseAccessory {
protected readonly device: VeSyncHumidifier;
private capabilities;
private isHumidDual200S;
private isHumid200S;
private isHumid200300S;
private isHumid1000S;
private isSuperior6000S;
private lightService?;
private temperatureService?;
private filterService?;
private _lastCommandedMode;
private _lastCommandedModeTime;
constructor(platform: TSVESyncPlatform, accessory: PlatformAccessory, device: VeSyncHumidifier);
/**
* Detect if the device is a HumidDual200S (or regional variant LUH-D301S)
*/
private detectHumidDual200S;
/**
* Detect if the device is a Humid200S
*/
private detectHumid200S;
/**
* Detect if the device is a Humid200300S
*/
private detectHumid200300S;
/**
* Detect if the device is a Humid1000S
*/
private detectHumid1000S;
/**
* Detect if the device is a Superior6000S
*/
private detectSuperior6000S;
/**
* Convert a VeSync mode string to a HomeKit TargetHumidifierDehumidifierState value.
*
* For Dual200S the mapping is swapped so that VeSync "auto" (which needs a
* humidity target) lands on HomeKit state 1 (HUMIDIFIER / "Humidity" in the
* Home app) where Apple shows the humidity slider, and VeSync "manual"
* (fixed mist, no target) lands on state 0 ("Auto", no slider).
*/
private modeToTargetState;
/**
* Convert a HomeKit TargetHumidifierDehumidifierState value to a VeSync mode.
* Inverse of modeToTargetState.
*/
private targetStateToMode;
protected setupService(): void;
/**
* Set up night light service for devices that support it
*/
private setupNightLightService;
/**
* Set up temperature sensor service for Superior6000S
*/
private setupTemperatureService;
/**
* Get temperature for Superior6000S
*/
private getTemperature;
/**
* Set up filter maintenance service for Superior6000S
*/
private setupFilterService;
/**
* Get filter change indication for Superior6000S
*/
private getFilterChangeIndication;
/**
* Get filter life level for Superior6000S
*/
private getFilterLifeLevel;
/**
* Get night light on state
*/
private getNightLightOn;
/**
* Set night light on state
*/
private setNightLightOn;
/**
* Get night light brightness
*/
private getNightLightBrightness;
/**
* Set night light brightness
*/
private setNightLightBrightness;
/**
* Update device states based on the latest details
*/
protected updateDeviceSpecificStates(details: any): Promise<void>;
private applyDeviceStatesToHomeKit;
protected getDeviceCapabilities(): DeviceCapabilities;
private getActive;
private setActive;
private getRotationSpeed;
private setTargetState;
private handleSetRotationSpeed;
/**
* Helper method to update a characteristic value for a specific service
*/
/**
* Get target humidity level
*/
private getTargetHumidity;
/**
* Set target humidity level
*/
private setTargetHumidity;
private updateServiceCharacteristicValue;
}
//# sourceMappingURL=humidifier.accessory.d.ts.map