Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
cyr-ius committed May 27, 2024
1 parent 45a1eb3 commit f1d380d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions custom_components/onkyo/coordinator.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""onkyo coordinators."""

from __future__ import annotations

from datetime import timedelta
Expand Down Expand Up @@ -57,13 +58,14 @@ async def _async_update_data(self) -> dict:
data.update({"main": main})

for zone in self._determine_zones(self.receiver):
data = await self.async_fetch_data_zone(zone)
data.update({zone: data})
other = await self.async_fetch_data_zone(zone)
data.update({zone: other})

return data
except Exception as error:
_LOGGER.debug(error)
raise UpdateFailed from error
else:
return data

async def async_fetch_data(self) -> dict:
"""Fetch all data from api."""
Expand Down Expand Up @@ -163,7 +165,7 @@ async def async_fetch_data_zone(self, zone):
supports_volume = False

if not (volume_raw and mute_raw and current_source_raw):
return
return None

# It's possible for some players to have zones set to HDMI with
# no sound control. In this case, the string `N/A` is returned.
Expand Down Expand Up @@ -193,9 +195,7 @@ async def async_fetch_data_zone(self, zone):

if supports_volume:
# AMP_VOL/MAX_RECEIVER_VOL*(MAX_VOL/100)
volume = (
volume_raw[1] / self.receiver_max_volume * (self.max_volume / 100)
)
volume = volume_raw[1] / self.receiver_max_volume * (self.max_volume / 100)
data.update({"volume": volume})

data.update({"attributes": attributes})
Expand Down

0 comments on commit f1d380d

Please sign in to comment.