homebridge-daikin-smart-ac
Version:
A Homebridge plugin for Daikin Wifi Adapter AC using Local API
21 lines • 737 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const characteristic = {
get: async function () {
await this.daikinAC.getControlInfo();
return this.daikinAC.RotationSpeed;
},
set: async function (value) {
const speed = parseInt(value.toString(), 10);
if (speed !== this.daikinAC.RotationSpeed) {
const prevValue = this.daikinAC.RotationSpeed;
this.daikinAC.RotationSpeed = speed;
const success = await this.daikinAC.saveControlInfo();
if (!success) {
this.daikinAC.RotationSpeed = prevValue;
}
}
}
};
exports.default = characteristic;
//# sourceMappingURL=RotationSpeed.js.map