diff --git a/homeassistant/components/homematicip_cloud/binary_sensor.py b/homeassistant/components/homematicip_cloud/binary_sensor.py index 5fe9605f80c5..a4698c6e5d18 100644 --- a/homeassistant/components/homematicip_cloud/binary_sensor.py +++ b/homeassistant/components/homematicip_cloud/binary_sensor.py @@ -562,7 +562,7 @@ class HomematicipFullFlushLockControllerGlassBreak( ): """Representation of the HomematicIP full flush lock controller glass state.""" - _attr_device_class = BinarySensorDeviceClass.PROBLEM + _attr_device_class = BinarySensorDeviceClass.GLASS_BREAK def __init__(self, hap: HomematicipHAP, device) -> None: """Initialize the full flush lock controller glass break sensor.""" diff --git a/tests/components/homematicip_cloud/test_binary_sensor.py b/tests/components/homematicip_cloud/test_binary_sensor.py index ddf03a299dbd..5122063c6eea 100644 --- a/tests/components/homematicip_cloud/test_binary_sensor.py +++ b/tests/components/homematicip_cloud/test_binary_sensor.py @@ -10,6 +10,7 @@ from homematicip.base.enums import ( ) import pytest +from homeassistant.components.binary_sensor import BinarySensorDeviceClass from homeassistant.components.homematicip_cloud.binary_sensor import ( ATTR_ACCELERATION_SENSOR_MODE, ATTR_ACCELERATION_SENSOR_NEUTRAL_POSITION, @@ -30,7 +31,7 @@ from homeassistant.components.homematicip_cloud.entity import ( ATTR_RSSI_DEVICE, ATTR_SABOTAGE, ) -from homeassistant.const import STATE_OFF, STATE_ON, STATE_UNKNOWN +from homeassistant.const import ATTR_DEVICE_CLASS, STATE_OFF, STATE_ON, STATE_UNKNOWN from homeassistant.core import HomeAssistant from homeassistant.helpers import entity_registry as er @@ -69,6 +70,9 @@ async def test_hmip_full_flush_lock_controller_binary_sensors( "HmIP-FLC", ) assert glass_state.state == STATE_ON + assert ( + glass_state.attributes[ATTR_DEVICE_CLASS] == BinarySensorDeviceClass.GLASS_BREAK + ) assert hmip_device is not None await async_manipulate_test_data(hass, hmip_device, "lockState", "UNLOCKED")