mirror of
https://github.com/home-assistant/core.git
synced 2025-07-26 22:57:17 +00:00
Remove deprecated channel views attribute from Twitch (#129008)
This commit is contained in:
parent
165a00896e
commit
8253cfd21d
@ -27,7 +27,6 @@ class TwitchUpdate:
|
|||||||
|
|
||||||
name: str
|
name: str
|
||||||
followers: int
|
followers: int
|
||||||
views: int
|
|
||||||
is_streaming: bool
|
is_streaming: bool
|
||||||
game: str | None
|
game: str | None
|
||||||
title: str | None
|
title: str | None
|
||||||
@ -103,7 +102,6 @@ class TwitchCoordinator(DataUpdateCoordinator[dict[str, TwitchUpdate]]):
|
|||||||
data[channel.id] = TwitchUpdate(
|
data[channel.id] = TwitchUpdate(
|
||||||
channel.display_name,
|
channel.display_name,
|
||||||
followers.total,
|
followers.total,
|
||||||
channel.view_count,
|
|
||||||
bool(stream),
|
bool(stream),
|
||||||
stream.game_name if stream else None,
|
stream.game_name if stream else None,
|
||||||
stream.title if stream else None,
|
stream.title if stream else None,
|
||||||
|
@ -23,7 +23,6 @@ ATTR_SUBSCRIPTION_TIER = "subscription_tier"
|
|||||||
ATTR_FOLLOW = "following"
|
ATTR_FOLLOW = "following"
|
||||||
ATTR_FOLLOW_SINCE = "following_since"
|
ATTR_FOLLOW_SINCE = "following_since"
|
||||||
ATTR_FOLLOWING = "followers"
|
ATTR_FOLLOWING = "followers"
|
||||||
ATTR_VIEWS = "views"
|
|
||||||
ATTR_VIEWERS = "viewers"
|
ATTR_VIEWERS = "viewers"
|
||||||
ATTR_STARTED_AT = "started_at"
|
ATTR_STARTED_AT = "started_at"
|
||||||
|
|
||||||
@ -79,7 +78,6 @@ class TwitchSensor(CoordinatorEntity[TwitchCoordinator], SensorEntity):
|
|||||||
channel = self.channel
|
channel = self.channel
|
||||||
resp = {
|
resp = {
|
||||||
ATTR_FOLLOWING: channel.followers,
|
ATTR_FOLLOWING: channel.followers,
|
||||||
ATTR_VIEWS: channel.views,
|
|
||||||
ATTR_GAME: channel.game,
|
ATTR_GAME: channel.game,
|
||||||
ATTR_TITLE: channel.title,
|
ATTR_TITLE: channel.title,
|
||||||
ATTR_STARTED_AT: channel.started_at,
|
ATTR_STARTED_AT: channel.started_at,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user