From 92beab82e2aa1a43f5a517a2351cffca5418bed2 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Wed, 21 Dec 2022 22:47:39 +0100 Subject: [PATCH] Fix incorrect co device class usage in GIOS (#84379) --- homeassistant/components/gios/sensor.py | 1 - tests/components/gios/test_sensor.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/homeassistant/components/gios/sensor.py b/homeassistant/components/gios/sensor.py index aa528f3d1d3..feb3f90a313 100644 --- a/homeassistant/components/gios/sensor.py +++ b/homeassistant/components/gios/sensor.py @@ -72,7 +72,6 @@ SENSOR_TYPES: tuple[GiosSensorEntityDescription, ...] = ( GiosSensorEntityDescription( key=ATTR_CO, name="CO", - device_class=SensorDeviceClass.CO, native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER, state_class=SensorStateClass.MEASUREMENT, ), diff --git a/tests/components/gios/test_sensor.py b/tests/components/gios/test_sensor.py index 4cdb7208dd3..f7475b1ef0f 100644 --- a/tests/components/gios/test_sensor.py +++ b/tests/components/gios/test_sensor.py @@ -60,7 +60,7 @@ async def test_sensor(hass): assert state.state == "252" assert state.attributes.get(ATTR_ATTRIBUTION) == ATTRIBUTION assert state.attributes.get(ATTR_STATION) == "Test Name 1" - assert state.attributes.get(ATTR_DEVICE_CLASS) == SensorDeviceClass.CO + assert state.attributes.get(ATTR_DEVICE_CLASS) is None assert state.attributes.get(ATTR_STATE_CLASS) == SensorStateClass.MEASUREMENT assert ( state.attributes.get(ATTR_UNIT_OF_MEASUREMENT)