UNPKG

homebridge-rabbitair

Version:
34 lines (33 loc) 1.34 kB
import type { API, Characteristic, DynamicPlatformPlugin, Logging, PlatformAccessory, PlatformConfig, Service } from 'homebridge'; export interface RabbitAirPlatformConfig extends PlatformConfig { devices?: Array<{ name: string; host: string; token: string; port?: number; }>; } /** * RabbitAirPlatform * This class is the main constructor for the RabbitAir plugin, responsible for * parsing the user config and discovering/registering accessories with Homebridge. */ export declare class RabbitAirPlatform implements DynamicPlatformPlugin { readonly log: Logging; readonly config: RabbitAirPlatformConfig; readonly api: API; readonly Service: typeof Service; readonly Characteristic: typeof Characteristic; readonly accessories: Map<string, PlatformAccessory>; readonly discoveredCacheUUIDs: string[]; constructor(log: Logging, config: RabbitAirPlatformConfig, 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; /** * Discover and register RabbitAir devices from the platform config. */ discoverDevices(): void; }