Use shorthand attributes in Isy994 (#100209)
parent
6e6680dc4d
commit
54c034185f
|
@ -249,7 +249,8 @@ class ISYBinarySensorEntity(ISYNodeEntity, BinarySensorEntity):
|
|||
) -> None:
|
||||
"""Initialize the ISY binary sensor device."""
|
||||
super().__init__(node, device_info=device_info)
|
||||
self._device_class = force_device_class
|
||||
# This was discovered by parsing the device type code during init
|
||||
self._attr_device_class = force_device_class
|
||||
|
||||
@property
|
||||
def is_on(self) -> bool | None:
|
||||
|
@ -258,14 +259,6 @@ class ISYBinarySensorEntity(ISYNodeEntity, BinarySensorEntity):
|
|||
return None
|
||||
return bool(self._node.status)
|
||||
|
||||
@property
|
||||
def device_class(self) -> BinarySensorDeviceClass | None:
|
||||
"""Return the class of this device.
|
||||
|
||||
This was discovered by parsing the device type code during init
|
||||
"""
|
||||
return self._device_class
|
||||
|
||||
|
||||
class ISYInsteonBinarySensorEntity(ISYBinarySensorEntity):
|
||||
"""Representation of an ISY Insteon binary sensor device.
|
||||
|
|
Loading…
Reference in New Issue