1
0

HydrawiseController.d.ts 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /**
  2. * @author Martijn Dierckx
  3. */
  4. import { Hydrawise, HydrawiseZone } from ".";
  5. /** Class representing a Hydrawise controller */
  6. export declare class HydrawiseController {
  7. apiBinding: Hydrawise;
  8. id: number;
  9. name: string;
  10. serialNumber: string;
  11. lastContactWithCloud: Date;
  12. status: string;
  13. /**
  14. * Create a new instance of a HydrawiseController
  15. * @param {object} options - Options object containing all parameters
  16. * @param {Hydrawise} options.apiBinding - The API binding which can be used to execute commands on the zone
  17. * @param {number} options.id - The unique identifier of the controller
  18. * @param {string} options.name - The name of the controller
  19. * @param {string} options.serialNumber - The serial number of the controller
  20. * @param {Date} options.lastContactWithCloud - The last date time the controller was able to contact/sync with the cloud
  21. * @param {string} options.status - The status as returned by the Hydrawise cloud
  22. */
  23. constructor(options: any);
  24. /**
  25. * Retrieves all zones/relays known to the server for this controller
  26. * @return {Promise} A Promise which will be resolved when all zones have been retrieved
  27. */
  28. getZones(): Promise<HydrawiseZone[]>;
  29. /**
  30. * Sends the run command to all the zones/relays of the controller
  31. * @param {number} [duration] - How long should the command be executed
  32. * @return {Promise} A Promise which will be resolved when the command has been executed.
  33. */
  34. runAllZones(duration?: number): Promise<any>;
  35. /**
  36. * Sends the stop command to all the zones/relays of the controller
  37. * @return {Promise} A Promise which will be resolved when the command has been executed.
  38. */
  39. stopAllZones(): Promise<any>;
  40. /**
  41. * Sends the suspend command to all the zones/relays of the controller
  42. * @param {number} [duration] - How long should the command be executed
  43. * @return {Promise} A Promise which will be resolved when the command has been executed.
  44. */
  45. suspendAllZones(duration?: number): Promise<any>;
  46. }
  47. //# sourceMappingURL=HydrawiseController.d.ts.map