homebridge-denon-tv 3.22.1 → 3.22.2
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/index.js +5 -5
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -892,14 +892,14 @@ class denonTvDevice {
|
|
|
892
892
|
};
|
|
893
893
|
|
|
894
894
|
//prepare inputs switch button ervices
|
|
895
|
+
this.inputSwitchButtonServices = [];
|
|
895
896
|
const inputsSwitchesButtons = this.inputsSwitchesButtons;
|
|
896
897
|
const inputsSwitchesButtonsCount = inputsSwitchesButtons.length;
|
|
897
|
-
const availableInputsSwitchesButtonsCount = 80 -
|
|
898
|
+
const availableInputsSwitchesButtonsCount = 80 - this.inputsReference.length;
|
|
898
899
|
const maxInputsSwitchesButtonsCount = availableInputsSwitchesButtonsCount > 0 ? (availableInputsSwitchesButtonsCount > inputsSwitchesButtonsCount ? inputsSwitchesButtonsCount : availableInputsSwitchesButtonsCount) : 0;
|
|
899
900
|
if (!this.getInputsFromDevice) {
|
|
900
901
|
if (maxInputsSwitchesButtonsCount > 0) {
|
|
901
902
|
this.log.debug('prepareSwitchsService');
|
|
902
|
-
this.inputSwitchButtonServices = [];
|
|
903
903
|
for (let i = 0; i < maxInputsSwitchesButtonsCount; i++) {
|
|
904
904
|
//get input index
|
|
905
905
|
const index = inputsSwitchesButtons[i];
|
|
@@ -943,14 +943,14 @@ class denonTvDevice {
|
|
|
943
943
|
};
|
|
944
944
|
|
|
945
945
|
//prepare sonsor services
|
|
946
|
+
this.sensorInputsServices = [];
|
|
946
947
|
const sensorInputs = this.sensorInputs;
|
|
947
948
|
const sensorInputsCount = sensorInputs.length;
|
|
948
|
-
const availableSensorInputsCount = 80 -
|
|
949
|
+
const availableSensorInputsCount = 80 - this.inputsReference.length;
|
|
949
950
|
const maxSensorInputsCount = availableSensorInputsCount > 0 ? (availableSensorInputsCount > sensorInputsCount ? sensorInputsCount : availableSensorInputsCount) : 0;
|
|
950
951
|
if (this.getInputsFromDevice) {
|
|
951
952
|
if (maxSensorInputsCount > 0) {
|
|
952
953
|
this.log.debug('prepareInputSensorServices');
|
|
953
|
-
this.sensorInputsServices = [];
|
|
954
954
|
for (let i = 0; i < maxSensorInputsCount; i++) {
|
|
955
955
|
//get sensor
|
|
956
956
|
const sensorInput = sensorInputs[i];
|
|
@@ -988,7 +988,7 @@ class denonTvDevice {
|
|
|
988
988
|
//check available buttons and possible count (max 80)
|
|
989
989
|
const buttons = this.buttons;
|
|
990
990
|
const buttonsCount = buttons.length;
|
|
991
|
-
const maxbuttonsCount = this.getInputsFromDevice ? this.sensorInputsServices : this.inputSwitchButtonServices;
|
|
991
|
+
const maxbuttonsCount = this.getInputsFromDevice ? this.inputsReference.length + this.sensorInputsServices.length : this.inputsReference.length + this.inputSwitchButtonServices.length;
|
|
992
992
|
const availableButtonsCount = 80 - (maxInputsCount + maxbuttonsCount);
|
|
993
993
|
const maxButtonsCount = availableButtonsCount > 0 ? (availableButtonsCount > buttonsCount ? buttonsCount : availableButtonsCount) : 0;
|
|
994
994
|
if (maxButtonsCount > 0) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "Denon TV",
|
|
3
3
|
"name": "homebridge-denon-tv",
|
|
4
|
-
"version": "3.22.
|
|
4
|
+
"version": "3.22.2",
|
|
5
5
|
"description": "Homebridge plugin (https://github.com/homebridge/homebridge) to control Denon/Marantz AV Receivers.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "grzegorz914",
|