Use new BinarySensorDeviceClass in eight_sleep (#61610)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
9784523dfb
commit
704be10561
1 changed files with 2 additions and 2 deletions
|
@ -6,7 +6,7 @@ import logging
|
|||
from pyeight.eight import EightSleep
|
||||
|
||||
from homeassistant.components.binary_sensor import (
|
||||
DEVICE_CLASS_OCCUPANCY,
|
||||
BinarySensorDeviceClass,
|
||||
BinarySensorEntity,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
@ -61,7 +61,7 @@ class EightHeatSensor(EightSleepBaseEntity, BinarySensorEntity):
|
|||
) -> None:
|
||||
"""Initialize the sensor."""
|
||||
super().__init__(name, coordinator, eight, side, sensor)
|
||||
self._attr_device_class = DEVICE_CLASS_OCCUPANCY
|
||||
self._attr_device_class = BinarySensorDeviceClass.OCCUPANCY
|
||||
assert self._usrobj
|
||||
_LOGGER.debug(
|
||||
"Presence Sensor: %s, Side: %s, User: %s",
|
||||
|
|
Loading…
Add table
Reference in a new issue