homebridge-poolcontroller-clocklear
Version:
A (semi) private Homebridge plugin for my custom Pool Controller app
36 lines (35 loc) • 1.54 kB
TypeScript
import { API, DynamicPlatformPlugin, Logging, PlatformAccessory, PlatformConfig, Service, Characteristic } from 'homebridge';
import { PoolControllerClient } from './poolControllerClient.js';
interface PoolControllerConfig {
url: string;
apiKey: string;
relays: string[];
asyncUpdates?: boolean;
}
/**
* HomebridgePlatform
* This class is the main constructor for your plugin, this is where you should
* parse the user config and discover/register accessories with Homebridge.
*/
export declare class PoolControllerHomebridgePlatform implements DynamicPlatformPlugin {
readonly log: Logging;
readonly config: PlatformConfig & PoolControllerConfig;
readonly api: API;
readonly Service: typeof Service;
readonly Characteristic: typeof Characteristic;
readonly accessories: PlatformAccessory[];
readonly client: PoolControllerClient;
constructor(log: Logging, config: PlatformConfig & PoolControllerConfig, api: API);
/**
* This function is invoked when homebridge restores cached accessories from disk at startup.
* It should be used to set up event handlers for characteristics and update respective values.
*/
configureAccessory(accessory: PlatformAccessory): 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(): Promise<void>;
}
export {};