From 646da7a9b77d089b85f25da06ab5938c9f7609cf Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Wed, 8 Dec 2021 21:17:03 +0100 Subject: [PATCH] Use new EntityCategory enum in airthings (#61260) Co-authored-by: epenet --- homeassistant/components/airthings/sensor.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/airthings/sensor.py b/homeassistant/components/airthings/sensor.py index 7f3d3693a4b..a753a0b213f 100644 --- a/homeassistant/components/airthings/sensor.py +++ b/homeassistant/components/airthings/sensor.py @@ -15,14 +15,13 @@ from homeassistant.const import ( CONCENTRATION_MICROGRAMS_PER_CUBIC_METER, CONCENTRATION_PARTS_PER_BILLION, CONCENTRATION_PARTS_PER_MILLION, - ENTITY_CATEGORY_DIAGNOSTIC, PERCENTAGE, PRESSURE_MBAR, SIGNAL_STRENGTH_DECIBELS, TEMP_CELSIUS, ) from homeassistant.core import HomeAssistant -from homeassistant.helpers.entity import DeviceInfo +from homeassistant.helpers.entity import DeviceInfo, EntityCategory from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.update_coordinator import ( CoordinatorEntity, @@ -59,7 +58,7 @@ SENSORS: dict[str, SensorEntityDescription] = { key="battery", device_class=SensorDeviceClass.BATTERY, native_unit_of_measurement=PERCENTAGE, - entity_category=ENTITY_CATEGORY_DIAGNOSTIC, + entity_category=EntityCategory.DIAGNOSTIC, name="Battery", ), "co2": SensorEntityDescription( @@ -92,7 +91,7 @@ SENSORS: dict[str, SensorEntityDescription] = { device_class=SensorDeviceClass.SIGNAL_STRENGTH, name="RSSI", entity_registry_enabled_default=False, - entity_category=ENTITY_CATEGORY_DIAGNOSTIC, + entity_category=EntityCategory.DIAGNOSTIC, ), "pm1": SensorEntityDescription( key="pm1",