From 09c4079d4f6b826231cfe9e78df0be73e22798d2 Mon Sep 17 00:00:00 2001 From: simont77 <26008536+simont77@users.noreply.github.com> Date: Sun, 15 Apr 2018 17:42:59 +0200 Subject: [PATCH] fix --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 17b6c46..818b149 100644 --- a/index.js +++ b/index.js @@ -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'}); @@ -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'}); @@ -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'});