From 340ffc96dc8493aedff7a5ee34bf026e463d2039 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Sun, 19 Dec 2021 13:15:09 +0100 Subject: [PATCH] Use new enums in sleepiq (#62203) Co-authored-by: epenet --- homeassistant/components/sleepiq/binary_sensor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/sleepiq/binary_sensor.py b/homeassistant/components/sleepiq/binary_sensor.py index cfbd6f576be..9a9aeb6374d 100644 --- a/homeassistant/components/sleepiq/binary_sensor.py +++ b/homeassistant/components/sleepiq/binary_sensor.py @@ -1,6 +1,6 @@ """Support for SleepIQ sensors.""" from homeassistant.components.binary_sensor import ( - DEVICE_CLASS_OCCUPANCY, + BinarySensorDeviceClass, BinarySensorEntity, ) @@ -40,9 +40,9 @@ class IsInBedBinarySensor(SleepIQSensor, BinarySensorEntity): return self._state is True @property - def device_class(self): + def device_class(self) -> BinarySensorDeviceClass: """Return the class of this sensor.""" - return DEVICE_CLASS_OCCUPANCY + return BinarySensorDeviceClass.OCCUPANCY def update(self): """Get the latest data from SleepIQ and updates the states."""