homebridge-programmable-http-switch
Version:
A Homebridge plugin that allows users to create Stateless Programmable Switches which can be controlled using a HTTP API.
16 lines (15 loc) • 623 B
TypeScript
import { HAP, AccessoryPlugin, Service, Logging } from 'homebridge';
import { AccessoryConfig, ButtonConfig, Action } from './types';
export default class ProgrammableHTTPSwitchAccessory implements AccessoryPlugin {
name: string;
private config;
private log;
private hap;
private programmableSwitchServices;
private informationService;
constructor(log: Logging, config: AccessoryConfig, hap: HAP);
getServices: () => Service[];
identify: () => void;
createService: (button: ButtonConfig, index: number) => Service;
setState: (buttonIdentifier: string, action: Action) => void;
}