mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-06-26 02:38:47 +02:00
Fixed binary sensor grouping
This commit is contained in:
parent
b026c18cbc
commit
42ad216802
1 changed files with 4 additions and 1 deletions
|
@ -203,6 +203,9 @@ class MikrotikControllerBinarySensor(BinarySensorEntity):
|
|||
self._data = mikrotik_controller.data[SENSOR_TYPES[sensor][ATTR_PATH]]
|
||||
self._type = SENSOR_TYPES[sensor]
|
||||
self._attr = SENSOR_TYPES[sensor][ATTR_ATTR]
|
||||
else:
|
||||
self._type = {}
|
||||
self._attr = None
|
||||
|
||||
self._device_class = None
|
||||
self._state = None
|
||||
|
@ -244,7 +247,7 @@ class MikrotikControllerBinarySensor(BinarySensorEntity):
|
|||
DOMAIN,
|
||||
"serial-number",
|
||||
self._ctrl.data["routerboard"]["serial-number"],
|
||||
"switch",
|
||||
"sensor",
|
||||
self._type[ATTR_GROUP],
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue