mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 01:37:08 +00:00
Fix HomeKit Controller device class for CO Sensors (#69949)
This commit is contained in:
parent
f6a3598070
commit
ad5d7a845b
@ -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."""
|
||||
|
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user