Add icon translations to Airthings BLE (#108401)

pull/108316/head^2
Joost Lekkerkerker 2024-01-19 20:11:19 +01:00 committed by GitHub
parent 51dca66908
commit 94b39941e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 18 additions and 5 deletions

View File

@ -0,0 +1,18 @@
{
"entity": {
"sensor": {
"radon_1day_avg": {
"default": "mdi:radioactive"
},
"radon_longterm_avg": {
"default": "mdi:radioactive"
},
"radon_1day_level": {
"default": "mdi:radioactive"
},
"radon_longterm_level": {
"default": "mdi:radioactive"
}
}
}
}

View File

@ -52,24 +52,20 @@ SENSORS_MAPPING_TEMPLATE: dict[str, SensorEntityDescription] = {
translation_key="radon_1day_avg",
native_unit_of_measurement=VOLUME_BECQUEREL,
state_class=SensorStateClass.MEASUREMENT,
icon="mdi:radioactive",
),
"radon_longterm_avg": SensorEntityDescription(
key="radon_longterm_avg",
translation_key="radon_longterm_avg",
native_unit_of_measurement=VOLUME_BECQUEREL,
state_class=SensorStateClass.MEASUREMENT,
icon="mdi:radioactive",
),
"radon_1day_level": SensorEntityDescription(
key="radon_1day_level",
translation_key="radon_1day_level",
icon="mdi:radioactive",
),
"radon_longterm_level": SensorEntityDescription(
key="radon_longterm_level",
translation_key="radon_longterm_level",
icon="mdi:radioactive",
),
"temperature": SensorEntityDescription(
key="temperature",
@ -107,7 +103,6 @@ SENSORS_MAPPING_TEMPLATE: dict[str, SensorEntityDescription] = {
device_class=SensorDeviceClass.VOLATILE_ORGANIC_COMPOUNDS_PARTS,
native_unit_of_measurement=CONCENTRATION_PARTS_PER_BILLION,
state_class=SensorStateClass.MEASUREMENT,
icon="mdi:cloud",
),
"illuminance": SensorEntityDescription(
key="illuminance",