Skip to content

Commit

Permalink
ver. 3.3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
NikDevx committed May 24, 2021
1 parent e404a98 commit c125bb4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"displayName": "Homebridge Philips Air",
"name": "homebridge-philips-air",
"version": "3.3.5",
"version": "3.3.6",
"description": "Homebridge Plugin for Philips Air Purifiers",
"main": "dist/index.js",
"repository": {
Expand Down
5 changes: 3 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const PLUGIN_NAME = 'homebridge-philips-air';
const PLATFORM_NAME = 'philipsAir';
const pathToModule = require.resolve(PLUGIN_NAME);
const pathTopyaircontrol = pathToModule.replace('dist/index.js', 'node_modules/philips-air/pyaircontrol.py');
const pathToSensorFiles = pathToModule.replace('dist/index.js', 'sensor/');

enum CommandType {
Polling = 0,
Expand Down Expand Up @@ -229,7 +230,7 @@ class PhilipsAirPlatform implements DynamicPlatformPlugin {
}
if (purifier.config.logger) {
if (purifier.config.temperature_sensor) {
const logger_temp = fs.createWriteStream('/usr/lib/node_modules/homebridge-philips-air/sensor/temp.txt', {
const logger_temp = fs.createWriteStream(pathToSensorFiles + 'temp.txt', {
flags: 'w'
});
if (!error || !stderr || !error && !stderr) {
Expand All @@ -238,7 +239,7 @@ class PhilipsAirPlatform implements DynamicPlatformPlugin {
}
}
if (purifier.config.humidity_sensor) {
const logger_hum = fs.createWriteStream('/usr/lib/node_modules/homebridge-philips-air/sensor/hum.txt', {
const logger_hum = fs.createWriteStream(pathToSensorFiles + 'hum.txt', {
flags: 'w'
});
if (!error || !stderr || !error && !stderr) {
Expand Down

0 comments on commit c125bb4

Please sign in to comment.