Use enums in risco (#62042)

This commit is contained in:
Robert Hillis 2021-12-16 08:41:20 -05:00 committed by GitHub
parent 0dc5ae6dca
commit 7506b12277
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 6 deletions

View file

@ -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)