homebridge-tsvesync
Version:
Homebridge plugin for VeSync devices including Levoit air purifiers, humidifiers, and Etekcity smart outlets
74 lines • 2.33 kB
TypeScript
import { Service, PlatformAccessory, CharacteristicValue } from 'homebridge';
import { TSVESyncPlatform } from '../platform';
import { VeSyncBaseDevice } from 'tsvesync';
import { BaseAccessory } from './base.accessory';
/**
* Air Quality Sensor Accessory
* This is a separate accessory that only provides air quality monitoring
* Used for Core300S, Core400S, Core600S and other devices with AQ sensors
*/
export declare class AirQualitySensorAccessory extends BaseAccessory {
protected service: Service;
private parentDevice;
constructor(platform: TSVESyncPlatform, accessory: PlatformAccessory, device: VeSyncBaseDevice);
/**
* Check if device supports PM2.5 readings
*/
private deviceSupportsPM25;
/**
* Check if device supports PM10 readings
*/
private deviceSupportsPM10;
/**
* Get the current air quality level
*/
getAirQuality(): Promise<CharacteristicValue>;
/**
* Get the current PM2.5 density
*/
getPM25Density(): Promise<CharacteristicValue>;
/**
* Get the current PM10 density
*/
getPM10Density(): Promise<CharacteristicValue>;
/**
* Convert PM2.5 value to HomeKit AirQuality level
* Based on EPA Air Quality Index (AQI) standards
*/
private convertPM25ToAirQuality;
private mapToHomeKitAirQuality;
private readNormalizedAirQualityLevel;
private getDevicePm25;
private normalizeAirQuality;
/**
* Update characteristics from device state
*/
protected updateCharacteristics(): Promise<void>;
/**
* Get device capabilities (required by BaseAccessory)
*/
protected getDeviceCapabilities(): {
hasSpeed: boolean;
hasAirQuality: boolean;
hasChildLock: boolean;
hasBrightness: boolean;
hasHumidity: boolean;
hasWaterLevel: boolean;
hasSwingMode: boolean;
hasColorTemp: boolean;
hasColor: boolean;
};
/**
* Setup the service (required by BaseAccessory)
*/
protected setupService(): void;
/**
* Update device specific states (required by BaseAccessory)
*/
protected updateDeviceSpecificStates(): Promise<void>;
/**
* Identify this accessory
*/
identify(): void;
}
//# sourceMappingURL=air-quality-sensor.accessory.d.ts.map