Skip to content

Commit 5e4ce46

Browse files
authored
Use absolute humidity device class in Airq (home-assistant#148568)
1 parent 155fc13 commit 5e4ce46

File tree

4 files changed

+3
-12
lines changed

4 files changed

+3
-12
lines changed

homeassistant/components/airq/const.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@
66
CONF_CLIP_NEGATIVE: Final = "clip_negatives"
77
DOMAIN: Final = "airq"
88
MANUFACTURER: Final = "CorantGmbH"
9-
CONCENTRATION_GRAMS_PER_CUBIC_METER: Final = "g/m³"
109
ACTIVITY_BECQUEREL_PER_CUBIC_METER: Final = "Bq/m³"
1110
UPDATE_INTERVAL: float = 10.0

homeassistant/components/airq/icons.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
"health_index": {
55
"default": "mdi:heart-pulse"
66
},
7-
"absolute_humidity": {
8-
"default": "mdi:water"
9-
},
107
"oxygen": {
118
"default": "mdi:leaf"
129
},

homeassistant/components/airq/sensor.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
SensorStateClass,
1515
)
1616
from homeassistant.const import (
17+
CONCENTRATION_GRAMS_PER_CUBIC_METER,
1718
CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
1819
CONCENTRATION_MILLIGRAMS_PER_CUBIC_METER,
1920
CONCENTRATION_PARTS_PER_BILLION,
@@ -28,10 +29,7 @@
2829
from homeassistant.helpers.update_coordinator import CoordinatorEntity
2930

3031
from . import AirQConfigEntry, AirQCoordinator
31-
from .const import (
32-
ACTIVITY_BECQUEREL_PER_CUBIC_METER,
33-
CONCENTRATION_GRAMS_PER_CUBIC_METER,
34-
)
32+
from .const import ACTIVITY_BECQUEREL_PER_CUBIC_METER
3533

3634
_LOGGER = logging.getLogger(__name__)
3735

@@ -195,7 +193,7 @@ class AirQEntityDescription(SensorEntityDescription):
195193
),
196194
AirQEntityDescription(
197195
key="humidity_abs",
198-
translation_key="absolute_humidity",
196+
device_class=SensorDeviceClass.ABSOLUTE_HUMIDITY,
199197
native_unit_of_measurement=CONCENTRATION_GRAMS_PER_CUBIC_METER,
200198
state_class=SensorStateClass.MEASUREMENT,
201199
value=lambda data: data.get("humidity_abs"),

homeassistant/components/airq/strings.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,6 @@
9393
"health_index": {
9494
"name": "Health index"
9595
},
96-
"absolute_humidity": {
97-
"name": "Absolute humidity"
98-
},
9996
"hydrogen": {
10097
"name": "Hydrogen"
10198
},

0 commit comments

Comments
 (0)