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."""
from homeassistant.components.binary_sensor import (
DEVICE_CLASS_CONNECTIVITY,
BinarySensorDeviceClass,
BinarySensorEntity,
)
@ -38,7 +38,7 @@ class ZMAvailabilitySensor(BinarySensorEntity):
@property
def device_class(self):
"""Return the class of this device, from component DEVICE_CLASSES."""
return DEVICE_CLASS_CONNECTIVITY
return BinarySensorDeviceClass.CONNECTIVITY
def update(self):
"""Update the state of this sensor (availability of ZoneMinder)."""