@shadman-a/homebridge-my-ac
Version:
A Homebridge plugin for controlling/monitoring LG ThinQ devices via LG ThinQ platform.
42 lines (41 loc) • 1.77 kB
TypeScript
import { API, DynamicPlatformPlugin, PlatformAccessory, PlatformConfig, Service, Characteristic, Logging } from 'homebridge';
import { ThinQ } from './lib/ThinQ.js';
import { EventEmitter } from 'events';
import Characteristics from './characteristics/index.js';
import { AccessoryContext } from './baseDevice.js';
/**
* LGThinQHomebridgePlatform
* This class serves as the main entry point for the Homebridge plugin. It handles
* configuration parsing, device discovery, and accessory registration.
*/
export declare class LGThinQHomebridgePlatform implements DynamicPlatformPlugin {
readonly log: Logging;
readonly config: PlatformConfig;
readonly api: API;
readonly Service: typeof Service;
readonly Characteristic: typeof Characteristic;
readonly customCharacteristics: ReturnType<typeof Characteristics>;
readonly accessories: PlatformAccessory<AccessoryContext>[];
readonly ThinQ: ThinQ;
readonly events: EventEmitter;
private readonly intervalTime;
private readonly enable_thinq1;
readonly CustomServices: any;
readonly CustomCharacteristics: any;
constructor(log: Logging, config: PlatformConfig, api: API);
/**
* Invoked when Homebridge restores cached accessories from disk at startup.
* This method sets up event handlers for characteristics and updates respective values.
*
* @param accessory - The cached accessory to configure.
*/
configureAccessory(accessory: PlatformAccessory): void;
/**
* Discovers devices from the ThinQ API and registers them as Homebridge accessories.
*/
discoverDevices(): Promise<void>;
/**
* Starts monitoring devices for updates using MQTT or polling.
*/
protected startMonitor(): Promise<void>;
}