diff --git a/lib/Onkyo.js b/lib/Onkyo.js index a6dd564..15bd52a 100644 --- a/lib/Onkyo.js +++ b/lib/Onkyo.js @@ -682,7 +682,7 @@ class Onkyo extends EventEmitter { setVolume(volume) { invariant(_.isInteger(volume), 'volume should be an integer'); invariant(volume >= 0 && volume <= 100, 'volume should be between 0-100'); - const volumeHex = volume.toString(16).toUpperCase(); + const volumeHex = volume.toString(16).toUpperCase().padStart(2, '0'); return this.sendRawCommand(`MVL${volumeHex}`) .then(vol => parseInt(vol, 16)); }