diff --git a/custom_components/mikrotik_router/binary_sensor.py b/custom_components/mikrotik_router/binary_sensor.py index ba1a363..18dc00b 100644 --- a/custom_components/mikrotik_router/binary_sensor.py +++ b/custom_components/mikrotik_router/binary_sensor.py @@ -261,6 +261,14 @@ class MikrotikControllerBinarySensor(BinarySensorEntity): """Return the state attributes.""" return self._attrs + @property + def device_class(self) -> Optional[str]: + """Return the device class.""" + if ATTR_DEVICE_CLASS in self._type: + return self._type[ATTR_DEVICE_CLASS] + + return None + @property def unique_id(self) -> str: """Return a unique id for this entity."""