diff --git a/homeassistant/components/jellyfin/icons.json b/homeassistant/components/jellyfin/icons.json new file mode 100644 index 00000000000..6dcfa4b2706 --- /dev/null +++ b/homeassistant/components/jellyfin/icons.json @@ -0,0 +1,9 @@ +{ + "entity": { + "sensor": { + "watching": { + "default": "mdi:television-play" + } + } + } +} diff --git a/homeassistant/components/jellyfin/sensor.py b/homeassistant/components/jellyfin/sensor.py index 0f1afd30e9b..df503d14378 100644 --- a/homeassistant/components/jellyfin/sensor.py +++ b/homeassistant/components/jellyfin/sensor.py @@ -42,8 +42,8 @@ def _count_now_playing(data: JellyfinDataT) -> int: SENSOR_TYPES: dict[str, JellyfinSensorEntityDescription] = { "sessions": JellyfinSensorEntityDescription( key="watching", + translation_key="watching", name=None, - icon="mdi:television-play", native_unit_of_measurement="Watching", value_fn=_count_now_playing, ) diff --git a/tests/components/jellyfin/test_sensor.py b/tests/components/jellyfin/test_sensor.py index 733cb795271..e1377d81100 100644 --- a/tests/components/jellyfin/test_sensor.py +++ b/tests/components/jellyfin/test_sensor.py @@ -27,7 +27,7 @@ async def test_watching( assert state assert state.attributes.get(ATTR_DEVICE_CLASS) is None assert state.attributes.get(ATTR_FRIENDLY_NAME) == "JELLYFIN-SERVER" - assert state.attributes.get(ATTR_ICON) == "mdi:television-play" + assert state.attributes.get(ATTR_ICON) is None assert state.attributes.get(ATTR_STATE_CLASS) is None assert state.attributes.get(ATTR_UNIT_OF_MEASUREMENT) == "Watching" assert state.state == "3"