mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Use Enums in zoneminder (#61975)
This commit is contained in:
parent
62f411fccc
commit
b0f5e7dabf
@ -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)."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user