UNPKG

homebridge-programmable-http-switch

Version:

A Homebridge plugin that allows users to create Stateless Programmable Switches which can be controlled using a HTTP API.

25 lines (24 loc) 797 B
import { Logging } from 'homebridge'; import ProgrammableHTTPSwitchAccessory from './ProgrammableHTTPSwitchAccessory'; import { Config, Action } from './types'; export default class Server { private log; private config; private server; private accessories; constructor(log: Logging, config: Config); start: () => void; setAccessories: (accessories: { [key: string]: ProgrammableHTTPSwitchAccessory; }) => void; setState: (accessoryIdentifier: string, buttonIdentifier: string, action: Action) => void; private accessory; private getAccessories; private getAccessory; private buttons; private button; private getButtons; private getButton; private putButton; action: (action: string | number) => Action | undefined; }