mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Add icon translations to Twitch (#112329)
This commit is contained in:
parent
cde1273399
commit
d369447961
9
homeassistant/components/twitch/icons.json
Normal file
9
homeassistant/components/twitch/icons.json
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"entity": {
|
||||||
|
"sensor": {
|
||||||
|
"channel": {
|
||||||
|
"default": "mdi:twitch"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -46,8 +46,6 @@ ATTR_FOLLOW_SINCE = "following_since"
|
|||||||
ATTR_FOLLOWING = "followers"
|
ATTR_FOLLOWING = "followers"
|
||||||
ATTR_VIEWS = "views"
|
ATTR_VIEWS = "views"
|
||||||
|
|
||||||
ICON = "mdi:twitch"
|
|
||||||
|
|
||||||
STATE_OFFLINE = "offline"
|
STATE_OFFLINE = "offline"
|
||||||
STATE_STREAMING = "streaming"
|
STATE_STREAMING = "streaming"
|
||||||
|
|
||||||
@ -118,7 +116,7 @@ async def async_setup_entry(
|
|||||||
class TwitchSensor(SensorEntity):
|
class TwitchSensor(SensorEntity):
|
||||||
"""Representation of a Twitch channel."""
|
"""Representation of a Twitch channel."""
|
||||||
|
|
||||||
_attr_icon = ICON
|
_attr_translation_key = "channel"
|
||||||
|
|
||||||
def __init__(self, channel: TwitchUser, client: Twitch) -> None:
|
def __init__(self, channel: TwitchUser, client: Twitch) -> None:
|
||||||
"""Initialize the sensor."""
|
"""Initialize the sensor."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user