diff --git a/CHANGELOG.md b/CHANGELOG.md index 1da8613..c24826f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. +## 1.3.8 + +- [FIX] numberOfCommands for volume broken - #261 + ## 1.3.7 - [FIX] change node prerequisite to LTS version (10.20.0 at least) diff --git a/harmonyAsTVKeysTools.js b/harmonyAsTVKeysTools.js index 552be3e..293d04e 100644 --- a/harmonyAsTVKeysTools.js +++ b/harmonyAsTVKeysTools.js @@ -115,7 +115,7 @@ module.exports = { return keysMap; }, - getOverrideCommand: function (platform, command, defaultCommand, defaultNumberToSend = 1) { + getOverrideCommand: function (platform, command, defaultCommand, defaultNumberToSend) { if ( platform.remoteOverrideCommandsList && platform.remoteOverrideCommandsList[platform._currentInputService.activityName] && @@ -127,14 +127,13 @@ module.exports = { let overrideArray = override.split(';'); let device = overrideArray[0]; let cmd = overrideArray[1]; - var numberOfCommands = defaultNumberToSend; + var numberOfCommands = 1; + + if (defaultNumberToSend) numberOfCommands = defaultNumberToSend; if (overrideArray.length > 2) numberOfCommands = overrideArray[2]; let commandToSend = platform.harmonyBase.deviceCommands[[device, cmd]]; - platform.log( - '(' + platform.name + ')' + 'INFO - TEST - ' + commandToSend + '-' + numberOfCommands - ); if (commandToSend) { commandToSend = commandToSend + '|' + numberOfCommands; @@ -167,6 +166,8 @@ module.exports = { } } + defaultCommand = defaultCommand + '|' + defaultNumberToSend; + return defaultCommand; }, }; diff --git a/package.json b/package.json index e817a7f..9dbe40d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "homebridge-harmony", - "version": "1.3.7", + "version": "1.3.8", "author": "Nicolas Dujardin", "description": "Publish your harmony activities as homekit accessories", "main": "index.js",