Skip to content

Commit

Permalink
Fix Onkyo zone volume (#119949)
Browse files Browse the repository at this point in the history
  • Loading branch information
arturpragacz authored Jun 19, 2024
1 parent bae008b commit 42b62ec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions homeassistant/components/onkyo/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ def update(self) -> None:
del self._attr_extra_state_attributes[ATTR_PRESET]

self._attr_is_volume_muted = bool(mute_raw[1] == "on")
# AMP_VOL/MAX_RECEIVER_VOL*(MAX_VOL/100)
# AMP_VOL / (MAX_RECEIVER_VOL * (MAX_VOL / 100))
self._attr_volume_level = volume_raw[1] / (
self._receiver_max_volume * self._max_volume / 100
)
Expand Down Expand Up @@ -511,9 +511,9 @@ def update(self) -> None:
elif ATTR_PRESET in self._attr_extra_state_attributes:
del self._attr_extra_state_attributes[ATTR_PRESET]
if self._supports_volume:
# AMP_VOL/MAX_RECEIVER_VOL*(MAX_VOL/100)
self._attr_volume_level = (
volume_raw[1] / self._receiver_max_volume * (self._max_volume / 100)
# AMP_VOL / (MAX_RECEIVER_VOL * (MAX_VOL / 100))
self._attr_volume_level = volume_raw[1] / (
self._receiver_max_volume * self._max_volume / 100
)

@property
Expand Down

0 comments on commit 42b62ec

Please sign in to comment.