homebridge-soma-shades
Version:
A homebridge plugin for SOMA Smart Shades
33 lines • 1.4 kB
TypeScript
import { API, DynamicPlatformPlugin, Logger, PlatformAccessory, PlatformConfig, Service, Characteristic } from 'homebridge';
import noble from '@abandonware/noble';
export interface SOMAShadesDeviceConfig {
name: string;
id: string;
}
export interface SOMAShadesPlatformConfig extends PlatformConfig {
discoverDelay: number;
devices: Array<SOMAShadesDeviceConfig>;
}
/**
* 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 SOMAShadesPlatform implements DynamicPlatformPlugin {
readonly log: Logger;
readonly config: PlatformConfig;
readonly api: API;
readonly Service: typeof Service;
readonly Characteristic: typeof Characteristic;
readonly accessories: PlatformAccessory[];
private discoveredAll;
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): void;
discoverDevices(): boolean;
addAccessory(deviceConfig: SOMAShadesDeviceConfig, peripheral: noble.Peripheral): void;
}
//# sourceMappingURL=platform.d.ts.map