Use connectivity device class constant in various integrations (#39972)

This commit is contained in:
springstan 2020-09-12 20:21:57 +02:00 committed by GitHub
parent 6751a38b8e
commit 3d4ef8cfe1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 55 additions and 28 deletions

View file

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