Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
simont77 committed Apr 15, 2018
1 parent 9906312 commit 09c4079
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1332,7 +1332,7 @@ class MHPowerMeter {
callback(null);
});

if (config.storage == 'fs')
if (this.config.storage == 'fs')
this.powerLoggingService = new LegrandMyHome.FakeGatoHistoryService("energy", this,{storage: 'fs'});
else
this.powerLoggingService = new LegrandMyHome.FakeGatoHistoryService("energy", this,{storage: 'googleDrive', path: 'homebridge'});
Expand Down Expand Up @@ -1414,7 +1414,7 @@ class MHDryContact {
switch (this.type) {
case 'Contact':
this.dryContactService = new Service.ContactSensor(this.name);
if (config.storage == 'fs')
if (this.config.storage == 'fs')
this.LoggingService = new LegrandMyHome.FakeGatoHistoryService("door", this,{storage: 'fs'});
else
this.LoggingService = new LegrandMyHome.FakeGatoHistoryService("door", this,{storage: 'googleDrive', path: 'homebridge'});
Expand Down Expand Up @@ -1466,7 +1466,7 @@ class MHDryContact {
return [service, this.dryContactService];
case 'Motion':
this.dryContactService = new Service.MotionSensor(this.name);
if (config.storage == 'fs')
if (this.config.storage == 'fs')
this.LoggingService = new LegrandMyHome.FakeGatoHistoryService("motion", this,{storage: 'fs'});
else
this.LoggingService = new LegrandMyHome.FakeGatoHistoryService("motion", this,{storage: 'googleDrive', path: 'homebridge'});
Expand Down

0 comments on commit 09c4079

Please sign in to comment.