Skip to content

Commit

Permalink
Merge pull request #186 from NebzHB/beta
Browse files Browse the repository at this point in the history
Update to beta
  • Loading branch information
NebzHB authored Oct 31, 2023
2 parents 33891d3 + 1cf23ab commit f5ca7cb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
11 changes: 7 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
'use strict';

let Access, Accessory, Service, Characteristic, AdaptiveLightingController, UUIDGen;
const fs = require('fs');
const inherits = require('util').inherits;
const myLogger = require('./lib/myLogger').myLogger;
const debug = {};
Expand Down Expand Up @@ -59,7 +60,11 @@ function JeedomPlatform(logger, config, api) {
DEV_DEBUG = true;
}
this.debugLevel = config.debugLevel || debug.ERROR;
this.log = myLogger.createMyLogger(this.debugLevel,logger,api.user.storagePath()+'/../../../../log/');
let logPath = api.user.storagePath()+'/../../../../log/';
if (!fs.existsSync(logPath)) {
logPath = '/tmp/';
}
this.log = myLogger.createMyLogger(this.debugLevel,logger,logPath);
this.log('debugLevel:'+this.debugLevel);
this.myPlugin = config.myPlugin;
this.adaptiveEnabled = config.adaptiveEnabled;
Expand Down Expand Up @@ -4761,8 +4766,6 @@ JeedomPlatform.prototype.getAccessoryValue = function(characteristic, service, i
returnValue = cmd.currentValue;
if(service.infos.power && service.infos.power.unite && service.infos.power.unite.toLowerCase() == 'kw') {
returnValue = Math.round(cmd.currentValue*1000);
} else {
returnValue = cmd.currentValue;
}
if(that.fakegato && service.eqLogic && service.eqLogic.hasLogging) {
service.eqLogic.loggingService.addEntry({
Expand Down Expand Up @@ -5782,7 +5785,7 @@ function RegisterCustomCharacteristics() {
format : Characteristic.Formats.UINT16,
unit : 'Watts',
maxValue : 100000,
minValue : 0,
minValue : -100000,
minStep : 1,
perms : [Characteristic.Perms.READ, Characteristic.Perms.NOTIFY],
});
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@nebz/homebridge-jeedom",
"version": "v1.6.1",
"cust_serial": "0008",
"cust_serial": "0009",
"description": "Homebridge plugin for Jeedom ",
"main": "index.js",
"private":true,
Expand Down Expand Up @@ -29,9 +29,9 @@
"fakegato-history": "NebzHB/fakegato-history#master"
},
"devDependencies": {
"@babel/core": ">=7.23.0",
"@babel/core": ">=7.23.2",
"@babel/eslint-parser": "^7.22.15",
"eslint": "^8.50.0"
"eslint": "^8.52.0"
},
"author": "Nebz <[email protected]>",
"license": "GPL-2.0",
Expand Down

0 comments on commit f5ca7cb

Please sign in to comment.