homebridge-xbox-tv 4.3.1 → 4.3.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/CHANGELOG.md CHANGED
@@ -18,6 +18,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
18
18
  - For plugin < v4.1.0 use Homebridge UI <= v5.5.0
19
19
  - For plugin >= v4.1.0 use Homebridge UI >= v5.13.0
20
20
 
21
+ ## [4.3.2] - (28.09.2026)
22
+
23
+ ### Changes
24
+
25
+ - fixed: Home Assistant gets all inputs, the HomeKit limit of 85 inputs no longer applies to the source list and the media browser
26
+
21
27
  ## [4.3.1] - (27.09.2026)
22
28
 
23
29
  ### Changes
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "Xbox TV",
3
3
  "name": "homebridge-xbox-tv",
4
- "version": "4.3.1",
4
+ "version": "4.3.2",
5
5
  "description": "Homebridge plugin to control Xbox game consoles.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",
package/src/xboxdevice.js CHANGED
@@ -73,6 +73,7 @@ class XboxDevice extends EventEmitter {
73
73
  //variable
74
74
  this.modelName = 'Xbox';
75
75
  this.inputIdentifier = 1;
76
+ this.haInputs = new Map();
76
77
  this.power = false;
77
78
  this.volume = 0;
78
79
  this.mute = false;
@@ -110,7 +111,7 @@ class XboxDevice extends EventEmitter {
110
111
  break;
111
112
  case 'App': {
112
113
  // Known inputs (also Dashboard, Settings, Television...) are switched the same way as from HomeKit
113
- const input = this.inputsServices?.find(i => i.oneStoreProductId === value);
114
+ const input = this.inputsServices?.find(i => i.oneStoreProductId === value) ?? [...this.haInputs.values()].find(i => i.oneStoreProductId === value);
114
115
  if (input) {
115
116
  await this.setInput(input);
116
117
  set = true;
@@ -250,6 +251,10 @@ class XboxDevice extends EventEmitter {
250
251
  const inputOneStoreProductId = input.oneStoreProductId;
251
252
  const inputVisibility = this.savedInputsTargetVisibility[inputReference] ?? 0;
252
253
 
254
+ // Home Assistant gets all inputs, the HomeKit limit of 85 does not apply
255
+ if (remove) this.haInputs.delete(inputReference);
256
+ else this.haInputs.set(inputReference, { reference: inputReference, name: sanitizedName, oneStoreProductId: inputOneStoreProductId, titleId: inputTitleId, isGame: input.isGame, contentType });
257
+
253
258
  if (remove) {
254
259
  const svc = this.inputsServices.find(s => s.reference === inputReference);
255
260
  if (svc) {
@@ -333,7 +338,8 @@ class XboxDevice extends EventEmitter {
333
338
 
334
339
  // Only one time run
335
340
  if (updated) await this.displayOrder();
336
- if (updated) this.haPublishConfig();
341
+ // Home Assistant also gets the inputs over the HomeKit limit, publishConfig skips an unchanged config
342
+ this.haPublishConfig();
337
343
 
338
344
  return true;
339
345
  } catch (error) {
@@ -1045,7 +1051,7 @@ class XboxDevice extends EventEmitter {
1045
1051
  if (!this.ha) return;
1046
1052
 
1047
1053
  try {
1048
- const sources = (this.inputsServices ?? []).map(input => ({ id: input.oneStoreProductId, name: input.name }));
1054
+ const sources = [...this.haInputs.values()].map(input => ({ id: input.oneStoreProductId, name: input.name }));
1049
1055
  await this.ha.publishConfig({ sources });
1050
1056
  await this.haUpdateState();
1051
1057
  } catch (error) {
@@ -1057,7 +1063,9 @@ class XboxDevice extends EventEmitter {
1057
1063
  if (!this.ha) return;
1058
1064
 
1059
1065
  try {
1060
- const input = this.inputsServices?.find(input => input.identifier === this.inputIdentifier);
1066
+ // The running app, also one over the HomeKit limit
1067
+ const match = (input) => input.reference === this.reference || (this.titleId && input.titleId === this.titleId);
1068
+ const input = this.inputsServices?.find(match) ?? [...this.haInputs.values()].find(match) ?? this.inputsServices?.find(input => input.identifier === this.inputIdentifier);
1061
1069
  await this.ha.updateState({
1062
1070
  power: this.power,
1063
1071
  state: this.power ? (this.playState ? 'playing' : 'on') : 'off',
@@ -1158,6 +1166,7 @@ class XboxDevice extends EventEmitter {
1158
1166
  .setCharacteristic(Characteristic.FirmwareRevision, info.firmwareRevision);
1159
1167
  })
1160
1168
  .on('stateChanged', async (power, titleId, reference, volume, mute, playState) => {
1169
+ this.titleId = titleId;
1161
1170
  const input = this.inputsServices?.find(input => input.reference === reference || input.titleId === titleId) ?? false;
1162
1171
  const inputIdentifier = input ? input.identifier : this.inputIdentifier;
1163
1172