Use Enums in zoneminder (#61975)

This commit is contained in:
Robert Hillis 2021-12-15 19:07:12 -05:00 committed by GitHub
parent 62f411fccc
commit b0f5e7dabf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,6 @@
"""Support for ZoneMinder binary sensors.""" """Support for ZoneMinder binary sensors."""
from homeassistant.components.binary_sensor import ( from homeassistant.components.binary_sensor import (
DEVICE_CLASS_CONNECTIVITY, BinarySensorDeviceClass,
BinarySensorEntity, BinarySensorEntity,
) )
@ -38,7 +38,7 @@ class ZMAvailabilitySensor(BinarySensorEntity):
@property @property
def device_class(self): def device_class(self):
"""Return the class of this device, from component DEVICE_CLASSES.""" """Return the class of this device, from component DEVICE_CLASSES."""
return DEVICE_CLASS_CONNECTIVITY return BinarySensorDeviceClass.CONNECTIVITY
def update(self): def update(self):
"""Update the state of this sensor (availability of ZoneMinder).""" """Update the state of this sensor (availability of ZoneMinder)."""