@george.talusan/eufy-robovac-js 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/RoboVac.js +10 -0
- package/package.json +1 -1
package/lib/RoboVac.js
CHANGED
|
@@ -372,6 +372,16 @@ class RoboVac extends EventEmitter
|
|
|
372
372
|
return this.set({ [COMMAND.goHome]: flag });
|
|
373
373
|
}
|
|
374
374
|
|
|
375
|
+
goingHome() {
|
|
376
|
+
if (!this.dps) {
|
|
377
|
+
throw new Error('no data points available yet');
|
|
378
|
+
}
|
|
379
|
+
if (!this.dps.hasOwnProperty(COMMAND.goHome)) {
|
|
380
|
+
throw new Error('RoboVac does not support this command');
|
|
381
|
+
}
|
|
382
|
+
return this.dps[COMMAND.goHome];
|
|
383
|
+
}
|
|
384
|
+
|
|
375
385
|
volume() {
|
|
376
386
|
if (!this.dps) {
|
|
377
387
|
throw new Error('no data points available yet');
|