Skip to content

Commit

Permalink
add fakegato-schedule for thermostat schedules
Browse files Browse the repository at this point in the history
  • Loading branch information
tobekas committed Nov 27, 2019
1 parent 00aed89 commit e8e1464
Show file tree
Hide file tree
Showing 3 changed files with 559 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
package-lock.json
node_modules
9 changes: 9 additions & 0 deletions fakegato-history.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,15 @@ const TYPE_ENERGY = 'energy',

var homebridge;
var Characteristic, Service;
var FakeGatoSchedule;


module.exports = function (pHomebridge) {
if (pHomebridge && !homebridge) {
homebridge = pHomebridge;
Characteristic = homebridge.hap.Characteristic;
Service = homebridge.hap.Service;
FakeGatoSchedule = require('./fakegato-schedule')(homebridge);
}


Expand Down Expand Up @@ -843,6 +846,12 @@ module.exports = function (pHomebridge) {
callback(null, val);
}

addThermoSchedule(service) {
let scheduler = new FakeGatoSchedule('thermo', this.log);
scheduler.registerScheduleEvents(service);
return scheduler;
}

}

FakeGatoHistoryService.UUID = 'E863F007-079E-48FF-8F27-9C2605A29F52';
Expand Down
Loading

0 comments on commit e8e1464

Please sign in to comment.