homebridge-denon-tv 4.4.2 → 4.4.3

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": "4.4.2",
4
+ "version": "4.4.3",
5
5
  "description": "Homebridge plugin to control Denon/Marantz AV Receivers.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
package/src/denon.js CHANGED
@@ -224,6 +224,12 @@ class DENON extends EventEmitter {
224
224
  //select reference
225
225
  const reference = zoneControl <= 2 ? input : soundMode;
226
226
 
227
+ //update only if value change
228
+ if (power === this.power && reference === this.reference && volume === this.volume && volumeDisplay === this.volumeDisplay && mute === this.mute && pictureMode === this.pictureMode && soundMode === this.soundMode) {
229
+ this.checkState();
230
+ return;
231
+ };
232
+
227
233
  this.power = power;
228
234
  this.reference = reference;
229
235
  this.volume = volume;
@@ -232,7 +238,7 @@ class DENON extends EventEmitter {
232
238
  this.pictureMode = pictureMode;
233
239
  this.soundMode = soundMode;
234
240
 
235
- //emit state
241
+ //emit state changes
236
242
  const emitConnected = !this.connected ? this.emit('message', `Connected.`) : false;
237
243
  this.connected = true;
238
244
  this.emit('stateChanged', power, reference, volume, volumeDisplay, mute, pictureMode);
@@ -83,7 +83,7 @@ class DenonDevice extends EventEmitter {
83
83
  this.volumeControlType = ';';
84
84
  this.mute = true;
85
85
  this.mediaState = false;
86
- this.inputIdentifier = 0;
86
+ this.inputIdentifier = 1;
87
87
  this.supportPictureMode = false;
88
88
  this.pictureMode = 0;
89
89
  this.brightness = 0;