@switchbot/homebridge-switchbot
Version:
The SwitchBot plugin allows you to access your SwitchBot device(s) from HomeKit.
37 lines • 1.51 kB
TypeScript
import type { PlatformAccessory } from 'homebridge';
import type { device, hub2ServiceData, hub2Status, hub2WebhookContext, SwitchBotBLE } from 'node-switchbot';
import type { SwitchBotPlatform } from '../platform.js';
import type { devicesConfig } from '../settings.js';
import { Subject } from 'rxjs';
import { deviceBase } from './device.js';
export declare class Hub extends deviceBase {
readonly platform: SwitchBotPlatform;
private LightSensor?;
private HumiditySensor?;
private TemperatureSensor?;
deviceStatus: hub2Status;
webhookContext: hub2WebhookContext;
serviceData: hub2ServiceData;
hubUpdateInProgress: boolean;
doHubUpdate: Subject<void>;
constructor(platform: SwitchBotPlatform, accessory: PlatformAccessory, device: device & devicesConfig);
BLEparseStatus(): Promise<void>;
openAPIparseStatus(): Promise<void>;
parseStatusWebhook(): Promise<void>;
/**
* Asks the SwitchBot API for the latest device information
*/
refreshStatus(): Promise<void>;
BLERefreshStatus(): Promise<void>;
registerPlatformBLE(): Promise<void>;
openAPIRefreshStatus(): Promise<void>;
registerWebhook(): Promise<void>;
/**
* Handle requests to set the value of the "Target Position" characteristic
*/
updateHomeKitCharacteristics(): Promise<void>;
BLERefreshConnection(switchbot: SwitchBotBLE): Promise<void>;
offlineOff(): Promise<void>;
apiError(e: any): Promise<void>;
}
//# sourceMappingURL=hub.d.ts.map