homebridge-xbox-tv 3.5.8 → 3.5.9
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 +1 -1
- package/src/xboxdevice.js +6 -4
package/package.json
CHANGED
package/src/xboxdevice.js
CHANGED
|
@@ -774,7 +774,7 @@ class XboxDevice extends EventEmitter {
|
|
|
774
774
|
});
|
|
775
775
|
this.volumeService.getCharacteristic(Characteristic.On)
|
|
776
776
|
.onGet(async () => {
|
|
777
|
-
const state = !this.mute;
|
|
777
|
+
const state = this.power ? !this.mute : false;
|
|
778
778
|
return state;
|
|
779
779
|
})
|
|
780
780
|
.onSet(async (state) => {
|
|
@@ -798,7 +798,7 @@ class XboxDevice extends EventEmitter {
|
|
|
798
798
|
});
|
|
799
799
|
this.volumeServiceFan.getCharacteristic(Characteristic.On)
|
|
800
800
|
.onGet(async () => {
|
|
801
|
-
const state = !this.mute;
|
|
801
|
+
const state = this.power ? !this.mute : false;
|
|
802
802
|
return state;
|
|
803
803
|
})
|
|
804
804
|
.onSet(async (state) => {
|
|
@@ -1063,14 +1063,16 @@ class XboxDevice extends EventEmitter {
|
|
|
1063
1063
|
.updateCharacteristic(Characteristic.Volume, volume)
|
|
1064
1064
|
.updateCharacteristic(Characteristic.Mute, mute);
|
|
1065
1065
|
if (this.volumeService) {
|
|
1066
|
+
const muteV = this.power ? !mute : false;
|
|
1066
1067
|
this.volumeService
|
|
1067
1068
|
.updateCharacteristic(Characteristic.Brightness, volume)
|
|
1068
|
-
.updateCharacteristic(Characteristic.On,
|
|
1069
|
+
.updateCharacteristic(Characteristic.On, muteV);
|
|
1069
1070
|
};
|
|
1070
1071
|
if (this.volumeServiceFan) {
|
|
1072
|
+
const muteV = this.power ? !mute : false;
|
|
1071
1073
|
this.volumeServiceFan
|
|
1072
1074
|
.updateCharacteristic(Characteristic.RotationSpeed, volume)
|
|
1073
|
-
.updateCharacteristic(Characteristic.On,
|
|
1075
|
+
.updateCharacteristic(Characteristic.On, muteV);
|
|
1074
1076
|
};
|
|
1075
1077
|
};
|
|
1076
1078
|
|