HydrawiseController.js 662 B

12345678910111213141516171819202122232425
  1. 'use strict';
  2. /**
  3. * @author Martijn Dierckx
  4. */
  5. /** Class representing a Hydrawise controller */
  6. class HydrawiseController {
  7. /**
  8. * Create a new instance of a HydrawiseController
  9. * @param {object} options - Options object containing all parameters
  10. * @param {Hydrawise} options.apiBinding - The API binding which can be used to execute commands on the zone
  11. */
  12. constructor(options) {
  13. this.id = options.id;
  14. this.name = options.name;
  15. this.serialNumber = options.serialNumber;
  16. this.lastContactWithCloud = options.lastContactWithCloud;
  17. this.status = options.status;
  18. }
  19. }
  20. module.exports = options => {
  21. return new HydrawiseController(options);
  22. };