mirror of
https://github.com/home-assistant/core.git
synced 2025-07-10 23:07:09 +00:00
Use new enums in sleepiq (#62203)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
19fc15c3ac
commit
340ffc96dc
@ -1,6 +1,6 @@
|
|||||||
"""Support for SleepIQ sensors."""
|
"""Support for SleepIQ sensors."""
|
||||||
from homeassistant.components.binary_sensor import (
|
from homeassistant.components.binary_sensor import (
|
||||||
DEVICE_CLASS_OCCUPANCY,
|
BinarySensorDeviceClass,
|
||||||
BinarySensorEntity,
|
BinarySensorEntity,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -40,9 +40,9 @@ class IsInBedBinarySensor(SleepIQSensor, BinarySensorEntity):
|
|||||||
return self._state is True
|
return self._state is True
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def device_class(self):
|
def device_class(self) -> BinarySensorDeviceClass:
|
||||||
"""Return the class of this sensor."""
|
"""Return the class of this sensor."""
|
||||||
return DEVICE_CLASS_OCCUPANCY
|
return BinarySensorDeviceClass.OCCUPANCY
|
||||||
|
|
||||||
def update(self):
|
def update(self):
|
||||||
"""Get the latest data from SleepIQ and updates the states."""
|
"""Get the latest data from SleepIQ and updates the states."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user