UNPKG

homebridge-tahoma

Version:

Sample Platform plugin for TaHoma and Cozytouch services (Somfy,Atlantic,Thermor,Sauter): https://github.com/dubocr/homebridge-tahoma

54 lines 2.06 kB
import { CharacteristicValue, Logger, PlatformAccessory, Service } from 'homebridge'; import { Device, State, Command, Action } from 'overkiz-client'; import { Platform } from './Platform'; export default abstract class Mapper { protected readonly platform: Platform; protected readonly accessory: PlatformAccessory; protected readonly device: Device; protected log: Logger; private postponeTimer; private debounceTimer; protected stateless: boolean; private executionId; private actionPromise; protected expectedStates: Array<string>; constructor(platform: Platform, accessory: PlatformAccessory, device: Device); build(): void; /** * Helper methods */ protected applyConfig(config: any): void; protected registerService(type: any, subtype?: string): Service; private translate; protected debounce(task: any, immediate?: Array<CharacteristicValue>): (value: CharacteristicValue) => Promise<void>; protected postpone(task: any, ...args: any[]): void; protected executeCommands(commands: Command | Array<Command> | undefined, standalone?: boolean): Promise<Action>; private delay; protected requestStatesUpdate(defer?: number): Promise<void>; /** * Logging methods */ protected debug(...args: any[]): void; protected info(...args: any[]): void; protected warn(...args: any[]): void; protected error(...args: any[]): void; protected registerServices(): Array<Service>; protected onStatesChanged(states: Array<State>, init?: boolean): void; get isIdle(): boolean; cancelExecution(): Promise<void>; /** * Abstract methods to be implemented */ /** * Build the main device service * @return the main service */ protected abstract registerMainService(): Service; /** * Triggered when device state change * @param name State name * @param value State value */ protected abstract onStateChanged(name: string, value: any): any; } //# sourceMappingURL=Mapper.d.ts.map