From 7eb61b748e9d56d80cd7e85086318f854bb655e6 Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Mon, 4 Mar 2024 15:45:36 +0100 Subject: [PATCH] Add icon translations to PurpleAir (#112192) --- homeassistant/components/purpleair/icons.json | 24 +++++++++++++++++++ homeassistant/components/purpleair/sensor.py | 6 ----- 2 files changed, 24 insertions(+), 6 deletions(-) create mode 100644 homeassistant/components/purpleair/icons.json diff --git a/homeassistant/components/purpleair/icons.json b/homeassistant/components/purpleair/icons.json new file mode 100644 index 00000000000..683d5b31b14 --- /dev/null +++ b/homeassistant/components/purpleair/icons.json @@ -0,0 +1,24 @@ +{ + "entity": { + "sensor": { + "pm0_3_count_concentration": { + "default": "mdi:blur" + }, + "pm0_5_count_concentration": { + "default": "mdi:blur" + }, + "pm1_0_count_concentration": { + "default": "mdi:blur" + }, + "pm10_0_count_concentration": { + "default": "mdi:blur" + }, + "pm5_0_count_concentration": { + "default": "mdi:blur" + }, + "pm2_5_count_concentration": { + "default": "mdi:blur" + } + } + } +} diff --git a/homeassistant/components/purpleair/sensor.py b/homeassistant/components/purpleair/sensor.py index 50dbb47a285..eee4583ca11 100644 --- a/homeassistant/components/purpleair/sensor.py +++ b/homeassistant/components/purpleair/sensor.py @@ -52,7 +52,6 @@ SENSOR_DESCRIPTIONS = [ key="pm0.3_count_concentration", translation_key="pm0_3_count_concentration", entity_registry_enabled_default=False, - icon="mdi:blur", native_unit_of_measurement=CONCENTRATION_PARTICLES_PER_100_MILLILITERS, state_class=SensorStateClass.MEASUREMENT, value_fn=lambda sensor: sensor.pm0_3_um_count, @@ -61,7 +60,6 @@ SENSOR_DESCRIPTIONS = [ key="pm0.5_count_concentration", translation_key="pm0_5_count_concentration", entity_registry_enabled_default=False, - icon="mdi:blur", native_unit_of_measurement=CONCENTRATION_PARTICLES_PER_100_MILLILITERS, state_class=SensorStateClass.MEASUREMENT, value_fn=lambda sensor: sensor.pm0_5_um_count, @@ -70,7 +68,6 @@ SENSOR_DESCRIPTIONS = [ key="pm1.0_count_concentration", translation_key="pm1_0_count_concentration", entity_registry_enabled_default=False, - icon="mdi:blur", native_unit_of_measurement=CONCENTRATION_PARTICLES_PER_100_MILLILITERS, state_class=SensorStateClass.MEASUREMENT, value_fn=lambda sensor: sensor.pm1_0_um_count, @@ -86,7 +83,6 @@ SENSOR_DESCRIPTIONS = [ key="pm10.0_count_concentration", translation_key="pm10_0_count_concentration", entity_registry_enabled_default=False, - icon="mdi:blur", native_unit_of_measurement=CONCENTRATION_PARTICLES_PER_100_MILLILITERS, state_class=SensorStateClass.MEASUREMENT, value_fn=lambda sensor: sensor.pm10_0_um_count, @@ -102,7 +98,6 @@ SENSOR_DESCRIPTIONS = [ key="pm2.5_count_concentration", translation_key="pm2_5_count_concentration", entity_registry_enabled_default=False, - icon="mdi:blur", native_unit_of_measurement=CONCENTRATION_PARTICLES_PER_100_MILLILITERS, state_class=SensorStateClass.MEASUREMENT, value_fn=lambda sensor: sensor.pm2_5_um_count, @@ -118,7 +113,6 @@ SENSOR_DESCRIPTIONS = [ key="pm5.0_count_concentration", translation_key="pm5_0_count_concentration", entity_registry_enabled_default=False, - icon="mdi:blur", native_unit_of_measurement=CONCENTRATION_PARTICLES_PER_100_MILLILITERS, state_class=SensorStateClass.MEASUREMENT, value_fn=lambda sensor: sensor.pm5_0_um_count,