domoticz-api-linker
Version:
Domoticz API Javascript Bridge Connector
25 lines (24 loc) • 825 B
TypeScript
import { DomoticzApiConnector } from '../connectors/DomoticzApiConnector';
import { EDZ_SWITCH_COMMAND, IdzResult, IdzScene } from '../types';
declare class SceneManager {
domoticzApi: DomoticzApiConnector;
constructor(domoticzApi: DomoticzApiConnector);
/**
* Get all the Domoticz"s scenes
*/
items(): Promise<IdzScene[]>;
/**
* Switch a state into a specific state
*
* @param {number} idx : Domoticz index of the device
* @param {EDZ_SWITCH_COMMAND} command : string of the state, ex: 'Off'
*/
switch(idx: number, command: EDZ_SWITCH_COMMAND): Promise<IdzResult<null>>;
/**
* Toggle a device (ex: On/Off
*
* @param {number} idx : Domoticz index of the device
*/
toggle(idx: number): Promise<IdzResult<null>>;
}
export { SceneManager };