From 97077898bbee6cce7e6401f1df85741fe808ead2 Mon Sep 17 00:00:00 2001 From: w531t4 <41222371+w531t4@users.noreply.github.com> Date: Sat, 13 Sep 2025 10:39:11 -0400 Subject: [PATCH] Add Twitch entity for self (#150525) Co-authored-by: Joost Lekkerkerker --- homeassistant/components/twitch/coordinator.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/homeassistant/components/twitch/coordinator.py b/homeassistant/components/twitch/coordinator.py index 010a9e90ccc..142c3509e0b 100644 --- a/homeassistant/components/twitch/coordinator.py +++ b/homeassistant/components/twitch/coordinator.py @@ -79,6 +79,7 @@ class TwitchCoordinator(DataUpdateCoordinator[dict[str, TwitchUpdate]]): if not (user := await first(self.twitch.get_users())): raise UpdateFailed("Logged in user not found") self.current_user = user + self.users.append(self.current_user) # Add current_user to users list. async def _async_update_data(self) -> dict[str, TwitchUpdate]: await self.session.async_ensure_token_valid() @@ -95,6 +96,8 @@ class TwitchCoordinator(DataUpdateCoordinator[dict[str, TwitchUpdate]]): user_id=self.current_user.id, first=100 ) } + async for s in self.twitch.get_streams(user_id=[self.current_user.id]): + streams.update({s.user_id: s}) follows: dict[str, FollowedChannel] = { f.broadcaster_id: f async for f in await self.twitch.get_followed_channels(