Skip to content

Commit

Permalink
Epoch remove
Browse files Browse the repository at this point in the history
  • Loading branch information
aunefyren committed Jan 31, 2024
1 parent 145b75f commit 15992b9
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions custom_components/bluesound_alt/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@
UPDATE_PRESETS_INTERVAL = timedelta(minutes=30)
UPDATE_SERVICES_INTERVAL = timedelta(minutes=30)

EPOCH_REBUILD_GROUPS_MODULO = 10

PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
{
vol.Optional(CONF_HOSTS): vol.All(
Expand Down Expand Up @@ -370,10 +368,8 @@ async def force_update_sync_status(self, on_updated_cb=None, raise_timeout=False
async def _start_poll_command(self):
"""Loop which polls the status of the player."""
try:
epoch = 0
while True:
await self.async_update_status(epoch)
epoch += 1
await self.async_update_status()

except (asyncio.TimeoutError, ClientError, BluesoundPlayer._TimeoutException):
_LOGGER.info("Node %s:%s is offline, retrying later", self.name, self.port)
Expand Down Expand Up @@ -464,7 +460,7 @@ async def send_bluesound_command(

return data

async def async_update_status(self, epoch):
async def async_update_status(self):
"""Use the poll session to always get the status of the player."""
response = None

Expand Down

0 comments on commit 15992b9

Please sign in to comment.