Use enums in satel_integra (#62048)

This commit is contained in:
Robert Hillis 2021-12-16 17:24:46 -05:00 committed by GitHub
parent dce9d551f8
commit 72462b5dd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,6 @@
"""Support for Satel Integra zone states- represented as binary sensors.""" """Support for Satel Integra zone states- represented as binary sensors."""
from homeassistant.components.binary_sensor import ( from homeassistant.components.binary_sensor import (
DEVICE_CLASS_SMOKE, BinarySensorDeviceClass,
BinarySensorEntity, BinarySensorEntity,
) )
from homeassistant.core import callback from homeassistant.core import callback
@ -88,7 +88,7 @@ class SatelIntegraBinarySensor(BinarySensorEntity):
@property @property
def icon(self): def icon(self):
"""Icon for device by its type.""" """Icon for device by its type."""
if self._zone_type == DEVICE_CLASS_SMOKE: if self._zone_type is BinarySensorDeviceClass.SMOKE:
return "mdi:fire" return "mdi:fire"
@property @property