@dr_chai/homebridge-airthings
Version:
Connecting all your Airthings devices over bluetooth with zero configuration.
24 lines (23 loc) • 905 B
TypeScript
import { PlatformAccessory } from 'homebridge';
import type AirThingsPlatform 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 default class Wave2Accessory {
private readonly platform;
private readonly accessory;
private RadonSvc;
private TempSvc;
private HumiditySvc;
private lastData;
private readonly device;
/**
* These are just used to create a working example
* You should implement your own code to track the state of your accessory
*/
constructor(platform: AirThingsPlatform, accessory: PlatformAccessory);
calAirQuality: (lastData: WAVE2 | undefined) => number;
getAttr: (type: "radon_lta" | "radon_sta" | "temperature" | "humidity") => () => Promise<number | null>;
}