Add icon translations to Twitch (#112329)

This commit is contained in:
Joost Lekkerkerker 2024-03-05 21:50:32 +01:00 committed by GitHub
parent cde1273399
commit d369447961
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 3 deletions

View file

@ -0,0 +1,9 @@
{
"entity": {
"sensor": {
"channel": {
"default": "mdi:twitch"
}
}
}
}

View file

@ -46,8 +46,6 @@ ATTR_FOLLOW_SINCE = "following_since"
ATTR_FOLLOWING = "followers"
ATTR_VIEWS = "views"
ICON = "mdi:twitch"
STATE_OFFLINE = "offline"
STATE_STREAMING = "streaming"
@ -118,7 +116,7 @@ async def async_setup_entry(
class TwitchSensor(SensorEntity):
"""Representation of a Twitch channel."""
_attr_icon = ICON
_attr_translation_key = "channel"
def __init__(self, channel: TwitchUser, client: Twitch) -> None:
"""Initialize the sensor."""