import { DomoticzApiConnector } from '../index'; import { EDZ_DEVICE_HUMIDITY, EDZ_HUMIDITY, EDZ_DEVICE, EDZ_SWITCH_COMMAND, IdzDevice, IdzResult } from '../types'; declare class DeviceManager { domoticzApi: DomoticzApiConnector; constructor(domoticzApi: DomoticzApiConnector); /** * Get all devices, including the hidden ones */ items(): Promise; /** * Get all devices idx, names, and statuses without details * @returns */ itemsList(): Promise; /** * Get a specific device using the device identifier Idx * @param {number} idx */ getByIdx(idx: number): Promise; /** * Retrieve all devices of a specified type * @param {EDZ_DEVICE} filter * @param {string} orderBy */ getByType(filter: EDZ_DEVICE, orderBy?: string): Promise; /** * Return devices marked as *favorites* */ getFavorites(): Promise; /** * Action a Light/Switch * @param {number} idx * @param {EDZ_SWITCH_COMMAND} command "On|Off" */ switch(idx: number, command?: EDZ_SWITCH_COMMAND): Promise>; /** * Ask Domoticz to toggle a Light/Switch * @param {number} idx */ toggle(idx: number): Promise>; /** * Rename the device identified by idx * @param {number} idx * @param {string} name */ rename(idx: number, name: string): Promise>; /** * Set/Remove the protection on a device identified by idx * @param {number} idx * @param {boolean} enable */ protect(idx: number, enable?: boolean): Promise>; /** * Set the new temperature * * @param {number} idx * @param {number} temperature * @returns */ updateTemperature(idx: number, temperature: number): Promise>; /** * Set the humidity datas of a device * * @param {number} idx Domoticz Device ID * @param {number} humidityPercent Ex: 45 * @param {EDZ_HUMIDITY} humidityState [0: Normal, 1: Confortable, 2: Dry, 3: Wet] * @returns */ updateHumidity(idx: number, humidityPercent: number, humidityState: EDZ_HUMIDITY): Promise | null>; /** * Set the barometer pressure and define the barometer forecast. * * @param {number} idx * @param {int} barometer Atmospheric Pressure * @param {deviceHumidityType} deviceHumidityType use a deviceHumidityGeneralType (if device.Type is 'General'), or deviceHumidityType otherwise. * * @returns */ updateBarometer(idx: number, barometer: number, deviceHumidityType: EDZ_DEVICE_HUMIDITY): Promise>; /** * Generic update of a devices * * @param {number} idx * @param {string} sValue * @param {string} nValue * @returns */ updateDevice(idx: number, svalue: string, nvalue?: string): Promise>; } export { DeviceManager };