diff --git a/homeassistant/components/homekit_controller/binary_sensor.py b/homeassistant/components/homekit_controller/binary_sensor.py index 91c1c47d47e..5efd0915cb0 100644 --- a/homeassistant/components/homekit_controller/binary_sensor.py +++ b/homeassistant/components/homekit_controller/binary_sensor.py @@ -63,7 +63,7 @@ class HomeKitSmokeSensor(HomeKitEntity, BinarySensorEntity): class HomeKitCarbonMonoxideSensor(HomeKitEntity, BinarySensorEntity): """Representation of a Homekit BO sensor.""" - _attr_device_class = BinarySensorDeviceClass.GAS + _attr_device_class = BinarySensorDeviceClass.CO def get_characteristic_types(self) -> list[str]: """Define the homekit characteristics the entity is tracking.""" diff --git a/tests/components/homekit_controller/test_binary_sensor.py b/tests/components/homekit_controller/test_binary_sensor.py index d83beb07df3..ff9877b2e44 100644 --- a/tests/components/homekit_controller/test_binary_sensor.py +++ b/tests/components/homekit_controller/test_binary_sensor.py @@ -114,7 +114,7 @@ async def test_carbon_monoxide_sensor_read_state(hass, utcnow): state = await helper.poll_and_get_state() assert state.state == "on" - assert state.attributes["device_class"] == BinarySensorDeviceClass.GAS + assert state.attributes["device_class"] == BinarySensorDeviceClass.CO def create_occupancy_sensor_service(accessory):