Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to beta #186

Merged
merged 8 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading