mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
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
@ -6,7 +6,7 @@ import logging
|
|||||||
from pyeight.eight import EightSleep
|
from pyeight.eight import EightSleep
|
||||||
|
|
||||||
from homeassistant.components.binary_sensor import (
|
from homeassistant.components.binary_sensor import (
|
||||||
DEVICE_CLASS_OCCUPANCY,
|
BinarySensorDeviceClass,
|
||||||
BinarySensorEntity,
|
BinarySensorEntity,
|
||||||
)
|
)
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
@ -61,7 +61,7 @@ class EightHeatSensor(EightSleepBaseEntity, BinarySensorEntity):
|
|||||||
) -> None:
|
) -> None:
|
||||||
"""Initialize the sensor."""
|
"""Initialize the sensor."""
|
||||||
super().__init__(name, coordinator, eight, side, sensor)
|
super().__init__(name, coordinator, eight, side, sensor)
|
||||||
self._attr_device_class = DEVICE_CLASS_OCCUPANCY
|
self._attr_device_class = BinarySensorDeviceClass.OCCUPANCY
|
||||||
assert self._usrobj
|
assert self._usrobj
|
||||||
_LOGGER.debug(
|
_LOGGER.debug(
|
||||||
"Presence Sensor: %s, Side: %s, User: %s",
|
"Presence Sensor: %s, Side: %s, User: %s",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user