mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 17:27:52 +00:00
Add icon translations to YouTube (#112365)
* Add icon translations to YouTube * Add icon translations to YouTube
This commit is contained in:
parent
a26e52aa0c
commit
afdb7d15ca
12
homeassistant/components/youtube/icons.json
Normal file
12
homeassistant/components/youtube/icons.json
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"entity": {
|
||||
"sensor": {
|
||||
"latest_upload": {
|
||||
"default": "mdi:youtube"
|
||||
},
|
||||
"subscribers": {
|
||||
"default": "mdi:youtube-subscription"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -45,7 +45,6 @@ SENSOR_TYPES = [
|
||||
YouTubeSensorEntityDescription(
|
||||
key="latest_upload",
|
||||
translation_key="latest_upload",
|
||||
icon="mdi:youtube",
|
||||
available_fn=lambda channel: channel[ATTR_LATEST_VIDEO] is not None,
|
||||
value_fn=lambda channel: channel[ATTR_LATEST_VIDEO][ATTR_TITLE],
|
||||
entity_picture_fn=lambda channel: channel[ATTR_LATEST_VIDEO][ATTR_THUMBNAIL],
|
||||
@ -57,7 +56,6 @@ SENSOR_TYPES = [
|
||||
YouTubeSensorEntityDescription(
|
||||
key="subscribers",
|
||||
translation_key="subscribers",
|
||||
icon="mdi:youtube-subscription",
|
||||
native_unit_of_measurement="subscribers",
|
||||
available_fn=lambda _: True,
|
||||
value_fn=lambda channel: channel[ATTR_SUBSCRIBER_COUNT],
|
||||
|
@ -4,7 +4,6 @@
|
||||
'attributes': ReadOnlyDict({
|
||||
'entity_picture': 'https://i.ytimg.com/vi/wysukDrMdqU/maxresdefault.jpg',
|
||||
'friendly_name': 'Google for Developers Latest upload',
|
||||
'icon': 'mdi:youtube',
|
||||
'published_at': datetime.datetime(2023, 5, 11, 0, 20, 46, tzinfo=datetime.timezone.utc),
|
||||
'video_id': 'wysukDrMdqU',
|
||||
}),
|
||||
@ -20,7 +19,6 @@
|
||||
'attributes': ReadOnlyDict({
|
||||
'entity_picture': 'https://yt3.ggpht.com/fca_HuJ99xUxflWdex0XViC3NfctBFreIl8y4i9z411asnGTWY-Ql3MeH_ybA4kNaOjY7kyA=s800-c-k-c0x00ffffff-no-rj',
|
||||
'friendly_name': 'Google for Developers Subscribers',
|
||||
'icon': 'mdi:youtube-subscription',
|
||||
'unit_of_measurement': 'subscribers',
|
||||
}),
|
||||
'context': <ANY>,
|
||||
@ -34,7 +32,6 @@
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'friendly_name': 'Google for Developers Latest upload',
|
||||
'icon': 'mdi:youtube',
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'sensor.google_for_developers_latest_upload',
|
||||
@ -48,7 +45,6 @@
|
||||
'attributes': ReadOnlyDict({
|
||||
'entity_picture': 'https://yt3.ggpht.com/fca_HuJ99xUxflWdex0XViC3NfctBFreIl8y4i9z411asnGTWY-Ql3MeH_ybA4kNaOjY7kyA=s800-c-k-c0x00ffffff-no-rj',
|
||||
'friendly_name': 'Google for Developers Subscribers',
|
||||
'icon': 'mdi:youtube-subscription',
|
||||
'unit_of_measurement': 'subscribers',
|
||||
}),
|
||||
'context': <ANY>,
|
||||
|
Loading…
x
Reference in New Issue
Block a user