Use enums in risco (#62042)
This commit is contained in:
parent
0dc5ae6dca
commit
7506b12277
2 changed files with 5 additions and 6 deletions
|
@ -1,6 +1,6 @@
|
|||
"""Support for Risco alarm zones."""
|
||||
from homeassistant.components.binary_sensor import (
|
||||
DEVICE_CLASS_MOTION,
|
||||
BinarySensorDeviceClass,
|
||||
BinarySensorEntity,
|
||||
)
|
||||
from homeassistant.helpers import entity_platform
|
||||
|
@ -72,8 +72,8 @@ class RiscoBinarySensor(BinarySensorEntity, RiscoEntity):
|
|||
|
||||
@property
|
||||
def device_class(self):
|
||||
"""Return the class of this sensor, from DEVICE_CLASSES."""
|
||||
return DEVICE_CLASS_MOTION
|
||||
"""Return the class of this sensor, from BinarySensorDeviceClass."""
|
||||
return BinarySensorDeviceClass.MOTION
|
||||
|
||||
async def _bypass(self, bypass):
|
||||
alarm = await self._risco.bypass_zone(self._zone_id, bypass)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue