Use new DeviceClass enums in abode (#61244)

Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
epenet 2021-12-08 19:58:01 +01:00 committed by GitHub
parent d03b73eb23
commit 40828e221e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 10 deletions

View file

@ -2,7 +2,7 @@
import abodepy.helpers.constants as CONST
from homeassistant.components.binary_sensor import (
DEVICE_CLASS_WINDOW,
BinarySensorDeviceClass,
BinarySensorEntity,
)
@ -42,5 +42,5 @@ class AbodeBinarySensor(AbodeDevice, BinarySensorEntity):
def device_class(self):
"""Return the class of the binary sensor."""
if self._device.get_value("is_window") == "1":
return DEVICE_CLASS_WINDOW
return BinarySensorDeviceClass.WINDOW
return self._device.generic_type