Forráskód Böngészése

Rename one zone property

Miroslav Abrahám 5 hónapja
szülő
commit
3308887b0c
3 módosított fájl, 14 hozzáadás és 14 törlés
  1. 8 8
      README.md
  2. 3 3
      src/Hydrawise.ts
  3. 3 3
      src/HydrawiseZone.ts

+ 8 - 8
README.md

@@ -73,14 +73,14 @@ myHydrawise.getControllers()
 This will return an array of HydrawiseZone objects containing the following info:
 
 ```js
-{number}  relayID              - The unique relay number known to the Hydrawise cloud
-{number}  zone                 - The local zone/relay number
-{string}  name                 - The name of the zone
-{Date}    nextRunAt            - The date & time of the next scheduled run 
-{number}  nextRunDuration      - Run time in seconds of the next run defined by nextRunAt
-{boolean} isSuspended          - Returns true when the zoneis currently suspended
-{boolean} isRunning            - Returns true when the zone is actively running
-{number}  remainingRunningTime - Remaining run time in seconds when isRunning = true
+{number}  relayID          - The unique relay number known to the Hydrawise cloud
+{number}  zone             - The local zone/relay number
+{string}  name             - The name of the zone
+{Date}    nextRunAt        - The date & time of the next scheduled run 
+{number}  nextRunDuration  - Run time in seconds of the next run defined by nextRunAt
+{boolean} isSuspended      - Returns true when the zoneis currently suspended
+{boolean} isRunning        - Returns true when the zone is actively running
+{number}  remainingRunTime - Remaining run time in seconds when isRunning = true
 ```
 
 ### Run a command on a zone

+ 3 - 3
src/Hydrawise.ts

@@ -288,7 +288,7 @@ export class Hydrawise {
 							nextRunDuration: z.run || z.run_seconds,
 							isSuspended: z.suspended !== undefined && z.suspended == 1,
 							isRunning: false,
-							remainingRunningTime: 0
+							remainingRunTime: 0
 						};
 
 						// Link controller to the zones if it was provided when calling the method
@@ -308,14 +308,14 @@ export class Hydrawise {
 							});
 							if(runningZone != undefined && runningZone != null) {
 								zone.isRunning = true;
-								zone.remainingRunningTime = runningZone.time_left;
+								zone.remainingRunTime = runningZone.time_left;
 							}
 						}
 
 						// Running? (cloud connection)
 						if(z.time == 1) {
 							zone.isRunning = true;
-							zone.remainingRunningTime = z.run;
+							zone.remainingRunTime = z.run;
 						}
 						
 						zones.push(new HydrawiseZone(zone));

+ 3 - 3
src/HydrawiseZone.ts

@@ -16,7 +16,7 @@ export class HydrawiseZone {
 	public nextRunDuration: number;
 	public isSuspended: boolean;
 	public isRunning: boolean;
-	public remainingRunningTime: number;
+	public remainingRunTime: number;
 	public controller: HydrawiseController;
 
 	/**
@@ -30,7 +30,7 @@ export class HydrawiseZone {
 	 * @param {number} options.nextRunDuration - Run time in seconds of the next run defined by nextRunAt
 	 * @param {boolean} options.isSuspended - Returns true when the zoneis currently suspended
 	 * @param {boolean} options.isRunning - Returns true when the zone is actively running
-	 * @param {number} options.remainingRunningTime - Remaining run time in seconds when isRunning = true
+	 * @param {number} options.remainingRunTime - Remaining run time in seconds when isRunning = true
 	 * @param {HydrawiseController} [options.controller] - The controller linked to the zone
 	 */
 	constructor(options: any) {
@@ -42,7 +42,7 @@ export class HydrawiseZone {
 		this.nextRunDuration = options.nextRunDuration;
 		this.isSuspended = options.isSuspended;
 		this.isRunning = options.isRunning;
-		this.remainingRunningTime = options.remainingRunningTime;
+		this.remainingRunTime = options.remainingRunTime;
 		this.controller = options.controller;
 	}