homebridge-august
Version:
The August plugin allows you to access your August & Yale device(s) from HomeKit.
91 lines • 4.22 kB
TypeScript
import type { API, DynamicPlatformPlugin, Logging, PlatformAccessory } from 'homebridge';
import type { AugustPlatformConfig, device, devicesConfig, options } from './settings.js';
import August from 'august-yale';
/**
* 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 AugustPlatform implements DynamicPlatformPlugin {
accessories: PlatformAccessory[];
readonly api: API;
readonly log: Logging;
config: AugustPlatformConfig;
platformConfig: AugustPlatformConfig;
platformLogging: options['logging'];
platformRefreshRate: options['refreshRate'];
platformPushRate: options['pushRate'];
platformUpdateRate: options['updateRate'];
registeringDevice: boolean;
debugMode: boolean;
version: string;
augustConfig: August;
constructor(log: Logging, config: AugustPlatformConfig, 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): Promise<void>;
/**
* Verify the config passed to the plugin is valid
*/
verifyConfig(): Promise<void>;
/**
* This method looks to see if session is already Validate, if not then sends a validateCode and saves the installId.
* After validateCode is saved to the config user must restart homebridge
* this process then looks to see if session is already validated and if the validateCode in config;
* if isValidated is false then it will validate iwth the validateCode and save isValidated as true in the config.json file
* will also make the validateCode undefined
*/
validated(): Promise<void>;
augustCredentials(): Promise<void>;
pluginConfig(): Promise<{
pluginConfig: any;
currentConfig: any;
}>;
/**
* This method is used to discover the your location and devices.
*/
discoverDevices(): Promise<void>;
private Lock;
registerDevice(device: device & devicesConfig): Promise<boolean>;
externalOrPlatform(device: device & devicesConfig, accessory: PlatformAccessory): Promise<void>;
externalAccessory(accessory: PlatformAccessory): Promise<void>;
unregisterPlatformAccessories(existingAccessory: PlatformAccessory, device: device & devicesConfig): Promise<void>;
getPlatformLogSettings(): Promise<void>;
getPlatformRateSettings(): Promise<void>;
getPlatformConfigSettings(): Promise<void>;
/**
* Asynchronously retrieves the version of the plugin from the package.json file.
*
* This method reads the package.json file located in the parent directory,
* parses its content to extract the version, and logs the version using the debug logger.
* The extracted version is then assigned to the `version` property of the class.
*
* @returns {Promise<void>} A promise that resolves when the version has been retrieved and logged.
*/
getVersion(): Promise<void>;
/**
* Validate and clean a string value for a Name Characteristic.
* @param displayName - The display name of the accessory.
* @param name - The name of the characteristic.
* @param value - The value to be validated and cleaned.
* @returns The cleaned string value.
*/
validateAndCleanDisplayName(displayName: string, name: string, value: string): Promise<string>;
/**
* If device level logging is turned on, log to log.warn
* Otherwise send debug logs to log.debug
*/
infoLog(...log: any[]): Promise<void>;
successLog(...log: any[]): Promise<void>;
debugSuccessLog(...log: any[]): Promise<void>;
warnLog(...log: any[]): Promise<void>;
debugWarnLog(...log: any[]): Promise<void>;
errorLog(...log: any[]): Promise<void>;
debugErrorLog(...log: any[]): Promise<void>;
debugLog(...log: any[]): Promise<void>;
loggingIsDebug(): Promise<boolean>;
enablingPlatformLogging(): Promise<boolean>;
}
//# sourceMappingURL=platform.d.ts.map