homebridge-tessie
Version:
Connect Homebridge to your Tessie account.
32 lines (31 loc) • 1.5 kB
TypeScript
import { API, Characteristic, DynamicPlatformPlugin, Logging, PlatformAccessory, PlatformConfig, Service } from "homebridge";
import { EnergyContext } from "./energy.js";
import { VehicleContext } from "./vehicle.js";
import { Tessie } from "tesla-fleet-api";
/**
* 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 TeslaFleetApiPlatform implements DynamicPlatformPlugin {
readonly log: Logging;
readonly config: PlatformConfig;
readonly api: API;
readonly Service: typeof Service;
readonly Characteristic: typeof Characteristic;
readonly TeslaFleetApi: Tessie;
readonly hap: API['hap'];
readonly accessories: PlatformAccessory<VehicleContext | EnergyContext>[];
constructor(log: Logging, config: PlatformConfig, 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<VehicleContext | EnergyContext>): 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(): void;
}