Use new BinarySensorDeviceClass in eight_sleep (#61610)

Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
epenet 2021-12-13 02:15:58 +01:00 committed by GitHub
parent 9784523dfb
commit 704be10561
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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",