homebridge-denon-tv 5.3.6 → 5.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "Denon TV",
3
3
  "name": "homebridge-denon-tv",
4
- "version": "5.3.6",
4
+ "version": "5.3.7",
5
5
  "description": "Homebridge plugin to control Denon/Marantz AV Receivers.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
package/src/mainzone.js CHANGED
@@ -559,7 +559,7 @@ class MainZone extends EventEmitter {
559
559
  })
560
560
  .onSet(async (value) => {
561
561
  try {
562
- value = await this.scaleValue(value, 0, 100, 0, 80);
562
+ value = await this.scaleValue(value, 0, this.volumeMax, 0, 80);
563
563
  value = value < 10 ? `0${value}` : value;
564
564
  const volume = `MV${value}`;
565
565
  await this.denon.send(volume);
@@ -923,7 +923,7 @@ class MainZone extends EventEmitter {
923
923
  .on('stateChanged', async (power, reference, volume, volumeControlType, mute, pictureMode) => {
924
924
  const input = this.inputsConfigured.find(input => input.reference === reference) ?? false;
925
925
  const inputIdentifier = input ? input.identifier : this.inputIdentifier;
926
- const scaledVolume = await this.scaleValue(volume, -80, 0, 0, 100);
926
+ const scaledVolume = await this.scaleValue(volume, -80, 0, 0, this.volumeMax);
927
927
  mute = power ? mute : true;
928
928
  const pictureModeHomeKit = PictureModesConversionToHomeKit[pictureMode] ?? this.pictureMode;
929
929
 
package/src/surround.js CHANGED
@@ -482,7 +482,7 @@ class Surround extends EventEmitter {
482
482
  })
483
483
  .onSet(async (value) => {
484
484
  try {
485
- value = await this.scaleValue(value, 0, 100, 0, 80);
485
+ value = await this.scaleValue(value, 0, this.volumeMax, 0, 80);
486
486
  value = value < 10 ? `0${value}` : value;
487
487
  const volume = `MV${value}`;
488
488
  await this.denon.send(volume);
@@ -788,7 +788,7 @@ class Surround extends EventEmitter {
788
788
  .on('stateChanged', async (power, reference, volume, volumeControlType, mute, pictureMode) => {
789
789
  const input = this.inputsConfigured.find(input => input.reference === reference) ?? false;
790
790
  const inputIdentifier = input ? input.identifier : this.inputIdentifier;
791
- const scaledVolume = await this.scaleValue(volume, -80, 0, 0, 100);
791
+ const scaledVolume = await this.scaleValue(volume, -80, 0, 0, this.volumeMax);
792
792
  mute = power ? mute : true;
793
793
  const pictureModeHomeKit = PictureModesConversionToHomeKit[pictureMode] ?? this.pictureMode;
794
794
 
package/src/zone2.js CHANGED
@@ -482,7 +482,7 @@ class Zone2 extends EventEmitter {
482
482
  })
483
483
  .onSet(async (value) => {
484
484
  try {
485
- value = await this.scaleValue(value, 0, 100, 0, 80);
485
+ value = await this.scaleValue(value, 0, this.volumeMax, 0, 80);
486
486
  value = value < 10 ? `0${value}` : value;
487
487
  const volume = this.masterVolume ? `MV${value}` : `Z2${value}`;
488
488
  await this.denon.send(volume);
@@ -835,7 +835,7 @@ class Zone2 extends EventEmitter {
835
835
  .on('stateChanged', async (power, reference, volume, volumeControlType, mute, pictureMode) => {
836
836
  const input = this.inputsConfigured.find(input => input.reference === reference) ?? false;
837
837
  const inputIdentifier = input ? input.identifier : this.inputIdentifier;
838
- const scaledVolume = await this.scaleValue(volume, -80, 0, 0, 100);
838
+ const scaledVolume = await this.scaleValue(volume, -80, 0, 0, this.volumeMax);
839
839
  mute = power ? mute : true;
840
840
  const pictureModeHomeKit = PictureModesConversionToHomeKit[pictureMode] ?? this.pictureMode;
841
841
 
package/src/zone3.js CHANGED
@@ -482,7 +482,7 @@ class Zone3 extends EventEmitter {
482
482
  })
483
483
  .onSet(async (value) => {
484
484
  try {
485
- value = await this.scaleValue(value, 0, 100, 0, 80);
485
+ value = await this.scaleValue(value, 0, this.volumeMax, 0, 80);
486
486
  value = value < 10 ? `0${value}` : value;
487
487
  const volume = this.masterVolume ? `MV${value}` : `Z3${value}`;
488
488
  await this.denon.send(volume);
@@ -834,7 +834,7 @@ class Zone3 extends EventEmitter {
834
834
  .on('stateChanged', async (power, reference, volume, volumeControlType, mute, pictureMode) => {
835
835
  const input = this.inputsConfigured.find(input => input.reference === reference) ?? false;
836
836
  const inputIdentifier = input ? input.identifier : this.inputIdentifier;
837
- const scaledVolume = await this.scaleValue(volume, -80, 0, 0, 100);
837
+ const scaledVolume = await this.scaleValue(volume, -80, 0, 0, this.volumeMax);
838
838
  mute = power ? mute : true;
839
839
  const pictureModeHomeKit = PictureModesConversionToHomeKit[pictureMode] ?? this.pictureMode;
840
840