mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Fix incorrect co device class usage in GIOS (#84379)
This commit is contained in:
parent
370e458f2a
commit
92beab82e2
@ -72,7 +72,6 @@ SENSOR_TYPES: tuple[GiosSensorEntityDescription, ...] = (
|
|||||||
GiosSensorEntityDescription(
|
GiosSensorEntityDescription(
|
||||||
key=ATTR_CO,
|
key=ATTR_CO,
|
||||||
name="CO",
|
name="CO",
|
||||||
device_class=SensorDeviceClass.CO,
|
|
||||||
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
|
native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
),
|
),
|
||||||
|
@ -60,7 +60,7 @@ async def test_sensor(hass):
|
|||||||
assert state.state == "252"
|
assert state.state == "252"
|
||||||
assert state.attributes.get(ATTR_ATTRIBUTION) == ATTRIBUTION
|
assert state.attributes.get(ATTR_ATTRIBUTION) == ATTRIBUTION
|
||||||
assert state.attributes.get(ATTR_STATION) == "Test Name 1"
|
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_STATE_CLASS) == SensorStateClass.MEASUREMENT
|
||||||
assert (
|
assert (
|
||||||
state.attributes.get(ATTR_UNIT_OF_MEASUREMENT)
|
state.attributes.get(ATTR_UNIT_OF_MEASUREMENT)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user