Skip to content

Commit

Permalink
Clean up device class based entity translations in Community.Sensors (h…
Browse files Browse the repository at this point in the history
  • Loading branch information
frenck authored Jun 27, 2023
1 parent 3c015f8 commit c225c46
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
5 changes: 0 additions & 5 deletions homeassistant/components/luftdaten/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,18 @@
SENSORS: tuple[SensorEntityDescription, ...] = (
SensorEntityDescription(
key="temperature",
translation_key="temperature",
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
device_class=SensorDeviceClass.TEMPERATURE,
state_class=SensorStateClass.MEASUREMENT,
),
SensorEntityDescription(
key="humidity",
translation_key="humidity",
native_unit_of_measurement=PERCENTAGE,
device_class=SensorDeviceClass.HUMIDITY,
state_class=SensorStateClass.MEASUREMENT,
),
SensorEntityDescription(
key="pressure",
translation_key="pressure",
native_unit_of_measurement=UnitOfPressure.PA,
device_class=SensorDeviceClass.PRESSURE,
state_class=SensorStateClass.MEASUREMENT,
Expand All @@ -60,14 +57,12 @@
),
SensorEntityDescription(
key="P1",
translation_key="pm10",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
device_class=SensorDeviceClass.PM10,
state_class=SensorStateClass.MEASUREMENT,
),
SensorEntityDescription(
key="P2",
translation_key="pm25",
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
device_class=SensorDeviceClass.PM25,
state_class=SensorStateClass.MEASUREMENT,
Expand Down
17 changes: 1 addition & 16 deletions homeassistant/components/luftdaten/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,7 @@
},
"entity": {
"sensor": {
"humidity": {
"name": "[%key:component::sensor::entity_component::humidity::name%]"
},
"pressure": {
"name": "[%key:component::sensor::entity_component::pressure::name%]"
},
"pressure_at_sealevel": { "name": "Pressure at sealevel" },
"pm10": {
"name": "[%key:component::sensor::entity_component::pm10::name%]"
},
"pm25": {
"name": "[%key:component::sensor::entity_component::pm25::name%]"
},
"temperature": {
"name": "[%key:component::sensor::entity_component::temperature::name%]"
}
"pressure_at_sealevel": { "name": "Pressure at sealevel" }
}
}
}

0 comments on commit c225c46

Please sign in to comment.