mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-06-26 02:38:47 +02:00
Added Device_class for firmware update binary sensor, fixes #137
This commit is contained in:
parent
72f8f1bc64
commit
86a4dd358f
1 changed files with 8 additions and 0 deletions
|
@ -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."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue