diff --git a/homeassistant/components/twitch/icons.json b/homeassistant/components/twitch/icons.json new file mode 100644 index 00000000000..54b07caf5f8 --- /dev/null +++ b/homeassistant/components/twitch/icons.json @@ -0,0 +1,9 @@ +{ + "entity": { + "sensor": { + "channel": { + "default": "mdi:twitch" + } + } + } +} diff --git a/homeassistant/components/twitch/sensor.py b/homeassistant/components/twitch/sensor.py index 05fd3fa3e71..c1af382ff86 100644 --- a/homeassistant/components/twitch/sensor.py +++ b/homeassistant/components/twitch/sensor.py @@ -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."""