Skip to content

Commit

Permalink
Fix YouTube coordinator bug (#95492)
Browse files Browse the repository at this point in the history
Fix coordinator bug
  • Loading branch information
joostlek committed Jun 29, 2023
1 parent 33c7cdc commit b86b41e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion homeassistant/components/youtube/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ async def _get_channels(self, service: Resource) -> list[dict[str, Any]]:
channels = self.config_entry.options[CONF_CHANNELS]
while received_channels < len(channels):
# We're slicing the channels in chunks of 50 to avoid making the URI too long
end = min(received_channels + 50, len(channels) - 1)
end = min(received_channels + 50, len(channels))
channel_request: HttpRequest = service.channels().list(
part="snippet,statistics",
id=",".join(channels[received_channels:end]),
Expand Down

0 comments on commit b86b41e

Please sign in to comment.