homebridge-kef-speaker
Version:
Homebridge plugin for KEF wireless speakers (LS50 Wireless II, LSX II, LS60)
44 lines (43 loc) • 1.62 kB
TypeScript
import type { API, Characteristic, DynamicPlatformPlugin, Logging, PlatformAccessory, PlatformConfig, Service } from 'homebridge';
import { KefSpeakerAccessory } from './platformAccessory.js';
import { type PlatformConfig as KefPlatformConfig } from './settings.js';
/**
* KEF LSX II Platform
* This class is the main constructor for the KEF speaker plugin
*/
export declare class KefLsxIIPlatform implements DynamicPlatformPlugin {
readonly log: Logging;
readonly config: PlatformConfig & KefPlatformConfig;
readonly api: API;
readonly Service: typeof Service;
readonly Characteristic: typeof Characteristic;
readonly accessories: Map<string, PlatformAccessory>;
readonly discoveredCacheUUIDs: string[];
private readonly speakerAccessories;
constructor(log: Logging, config: PlatformConfig & KefPlatformConfig, 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;
/**
* Discover and register speaker devices
*/
discoverDevices(): Promise<void>;
/**
* Setup individual speaker
*/
private setupSpeaker;
/**
* Setup night mode scheduling
*/
private setupNightMode;
/**
* Get speaker accessory by UUID
*/
getSpeakerAccessory(uuid: string): KefSpeakerAccessory | undefined;
/**
* Get all speaker accessories
*/
getAllSpeakerAccessories(): KefSpeakerAccessory[];
}