From 421014bf8dbb80dec553cb0655b226d188a95800 Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker <joostlek@outlook.com> Date: Wed, 6 Mar 2024 06:31:22 +0100 Subject: [PATCH] Add icon translations to Tradfri (#112319) --- homeassistant/components/tradfri/icons.json | 12 ++++++++++++ homeassistant/components/tradfri/sensor.py | 2 -- 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 homeassistant/components/tradfri/icons.json diff --git a/homeassistant/components/tradfri/icons.json b/homeassistant/components/tradfri/icons.json new file mode 100644 index 00000000000..5bacebb3595 --- /dev/null +++ b/homeassistant/components/tradfri/icons.json @@ -0,0 +1,12 @@ +{ + "entity": { + "sensor": { + "aqi": { + "default": "mdi:air-filter" + }, + "filter_life_remaining": { + "default": "mdi:clock-outline" + } + } + } +} diff --git a/homeassistant/components/tradfri/sensor.py b/homeassistant/components/tradfri/sensor.py index 7f04b8aff03..da7e5336ba5 100644 --- a/homeassistant/components/tradfri/sensor.py +++ b/homeassistant/components/tradfri/sensor.py @@ -91,7 +91,6 @@ SENSOR_DESCRIPTIONS_FAN: tuple[TradfriSensorEntityDescription, ...] = ( translation_key="aqi", state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER, - icon="mdi:air-filter", value=_get_air_quality, ), TradfriSensorEntityDescription( @@ -99,7 +98,6 @@ SENSOR_DESCRIPTIONS_FAN: tuple[TradfriSensorEntityDescription, ...] = ( translation_key="filter_life_remaining", state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfTime.HOURS, - icon="mdi:clock-outline", value=_get_filter_time_left, ), )