UNPKG

homebridge-better-miot

Version:
35 lines 1.49 kB
import { API, DynamicPlatformPlugin, Logger, PlatformAccessory, PlatformConfig, Service, Characteristic } from 'homebridge'; import type { TSupportedDevice } from './accessories/types'; export declare type TDeviceConfig = { address: string; token: string; model: TSupportedDevice; displayName: string; updateIntervalMS?: number; isDisabled?: boolean; }; interface IBetterMiotPlatformConfig extends PlatformConfig { devices: TDeviceConfig[]; } export declare class HomebridgeBetterMiotPlatform implements DynamicPlatformPlugin { readonly log: Logger; readonly api: API; readonly Service: typeof Service; readonly Characteristic: typeof Characteristic; readonly config: IBetterMiotPlatformConfig; readonly accessories: PlatformAccessory<TDeviceConfig>[]; constructor(log: Logger, config: PlatformConfig, api: API); /** * This function is invoked when homebridge restores cached accessories from disk at startup. * It should be used to setup event handlers for characteristics and update respective values. */ configureAccessory(accessory: PlatformAccessory<TDeviceConfig>): void; /** * This is an example method showing how to register discovered accessories. * Accessories must only be registered once, previously created accessories * must not be registered again to prevent "duplicate UUID" errors. */ discoverDevices(): void; } export {}; //# sourceMappingURL=platform.d.ts.map