homebridge-ecobee-status
Version:
Homebridge plugin to control Ecobee thermostat Home/Away/Sleep status through HomeKit security system interface
16 lines • 595 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.updateHomebridgeConfig = updateHomebridgeConfig;
const fs_1 = require("fs");
function updateHomebridgeConfig(homebridge, update) {
const configPath = homebridge.user.configPath();
const config = (0, fs_1.readFileSync)(configPath).toString();
const updatedConfig = update(config);
if (config !== updatedConfig) {
(0, fs_1.writeFileSync)(configPath, updatedConfig);
//console.log('updated config');
return true;
}
return false;
}
//# sourceMappingURL=config.js.map