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