diff --git a/accessories/aircon.js b/accessories/aircon.js index 9e656da1..70c4f1d5 100644 --- a/accessories/aircon.js +++ b/accessories/aircon.js @@ -412,7 +412,7 @@ class AirConAccessory extends BroadlinkRMAccessory { const { config, debug, host, log, name } = this; const { temperatureFilePath } = config; - if (debug) log(`${name} updateTemperatureFromFile reading file: ${temperatureFilePath}`); + if (debug) log(`\x1b[33m[DEBUG]\x1b[0m ${name} updateTemperatureFromFile reading file: ${temperatureFilePath}`); fs.readFile(temperatureFilePath, 'utf8', (err, temperature) => { @@ -428,11 +428,11 @@ class AirConAccessory extends BroadlinkRMAccessory { return; } - if (debug) log(`${name} updateTemperatureFromFile (file content: ${temperature.trim()})`); + if (debug) log(`\x1b[33m[DEBUG]\x1b[0m ${name} updateTemperatureFromFile (file content: ${temperature.trim()})`); temperature = parseFloat(temperature); - if (debug) log(`${name} updateTemperatureFromFile (parsed temperature: ${temperature})`); + if (debug) log(`\x1b[33m[DEBUG]\x1b[0m ${name} updateTemperatureFromFile (parsed temperature: ${temperature})`); this.onTemperature(temperature); }); diff --git a/helpers/sendData.js b/helpers/sendData.js index cb3452be..24d9c3cb 100644 --- a/helpers/sendData.js +++ b/helpers/sendData.js @@ -8,9 +8,9 @@ module.exports = ({ host, hexData, log, name, debug }) => { // Check for pronto code if (hexData.substring(0, 4) === '0000') { - if (debug) log(`${name} sendHex (Converting Pronto code "${hexData}" to Broadlink code)`); + if (debug) log(`\x1b[33m[DEBUG]\x1b[0m ${name} sendHex (Converting Pronto code "${hexData}" to Broadlink code)`); hexData = convertProntoCode(hexData) - if (debug) log(`${name} sendHex (Pronto code successfuly converted: "${hexData}")`); + if (debug) log(`\x1b[33m[DEBUG]\x1b[0m ${name} sendHex (Pronto code successfuly converted: "${hexData}")`); if (!hexData) return log(`\x1b[31m[ERROR] \x1b[0m${name} sendData (A Pronto code was detected however its conversion to a Broadlink code failed.)`);