From 223be9c788a6264f11bac45cb5a3ef87e4416353 Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Tue, 5 Mar 2024 08:44:04 +0100 Subject: [PATCH] Add icon translations to QBittorrent (#112193) --- homeassistant/components/qbittorrent/icons.json | 12 ++++++++++++ homeassistant/components/qbittorrent/sensor.py | 2 -- 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 homeassistant/components/qbittorrent/icons.json diff --git a/homeassistant/components/qbittorrent/icons.json b/homeassistant/components/qbittorrent/icons.json new file mode 100644 index 00000000000..bb458c751e1 --- /dev/null +++ b/homeassistant/components/qbittorrent/icons.json @@ -0,0 +1,12 @@ +{ + "entity": { + "sensor": { + "download_speed": { + "default": "mdi:cloud-download" + }, + "upload_speed": { + "default": "mdi:cloud-upload" + } + } + } +} diff --git a/homeassistant/components/qbittorrent/sensor.py b/homeassistant/components/qbittorrent/sensor.py index 78e8ba59d44..9e9f7626857 100644 --- a/homeassistant/components/qbittorrent/sensor.py +++ b/homeassistant/components/qbittorrent/sensor.py @@ -64,7 +64,6 @@ SENSOR_TYPES: tuple[QBittorrentSensorEntityDescription, ...] = ( QBittorrentSensorEntityDescription( key=SENSOR_TYPE_DOWNLOAD_SPEED, translation_key="download_speed", - icon="mdi:cloud-download", device_class=SensorDeviceClass.DATA_RATE, native_unit_of_measurement=UnitOfDataRate.BYTES_PER_SECOND, suggested_display_precision=2, @@ -76,7 +75,6 @@ SENSOR_TYPES: tuple[QBittorrentSensorEntityDescription, ...] = ( QBittorrentSensorEntityDescription( key=SENSOR_TYPE_UPLOAD_SPEED, translation_key="upload_speed", - icon="mdi:cloud-upload", device_class=SensorDeviceClass.DATA_RATE, native_unit_of_measurement=UnitOfDataRate.BYTES_PER_SECOND, suggested_display_precision=2,