Use connectivity device class constant in various integrations (#39972)
This commit is contained in:
1 parent
6751a38b8e
commit
3d4ef8cfe1
10 files changed
+55
-28
No files matched your search
@@ -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)."""
|
||||
|
||||
Reference in new issue
Block a user