@mshanemc/homebridge-hydrawise
Advanced tools
Comparing version 2.1.4 to 2.1.5
@@ -54,2 +54,20 @@ "use strict"; | ||
}); | ||
// On: Set duration (Since there is no way to push the default run time to Hydrawise, this remains unimplemented) | ||
service | ||
.getCharacteristic(that.platform.api.hap.Characteristic.SetDuration) | ||
.on("set" /* SET */, (value, callback) => { | ||
that.platform.log.debug(`duration requested: ${value}`); | ||
const inMinutes = value / 60; | ||
that.zone | ||
.run(inMinutes) | ||
.then((data) => { | ||
that.platform.log.debug(data); | ||
that.platform.log.info(`Set Duration for ${zone.name} to ${inMinutes} minutes`); | ||
callback(); | ||
}) | ||
.catch((error) => { | ||
that.platform.log.error(error); | ||
callback(); | ||
}); | ||
}); | ||
// On: Active state change | ||
@@ -86,20 +104,2 @@ service | ||
}); | ||
// On: Set duration (Since there is no way to push the default run time to Hydrawise, this remains unimplemented) | ||
service | ||
.getCharacteristic(that.platform.api.hap.Characteristic.SetDuration) | ||
.on("set" /* SET */, (value, callback) => { | ||
that.platform.log.debug(`duration requested: ${value}`); | ||
const inMinutes = value / 60; | ||
that.zone | ||
.run(inMinutes) | ||
.then((data) => { | ||
that.platform.log.debug(data); | ||
that.platform.log.info('Set Duration for ' + zone.name + ' to ' + inMinutes); | ||
callback(); | ||
}) | ||
.catch((error) => { | ||
that.platform.log.error(error); | ||
callback(); | ||
}); | ||
}); | ||
} | ||
@@ -106,0 +106,0 @@ update(zone) { |
{ | ||
"name": "@mshanemc/homebridge-hydrawise", | ||
"version": "2.1.4", | ||
"version": "2.1.5", | ||
"description": "A homebridge plugin that creates sprinkler accessories for all your Hydrawise zones", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
31090