Use enums in withings (#61987)
parent
98c2c8c2d1
commit
f691b0a1da
|
@ -2,8 +2,8 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from homeassistant.components.binary_sensor import (
|
||||
DEVICE_CLASS_OCCUPANCY,
|
||||
DOMAIN as BINARY_SENSOR_DOMAIN,
|
||||
BinarySensorDeviceClass,
|
||||
BinarySensorEntity,
|
||||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
|
@ -29,7 +29,7 @@ async def async_setup_entry(
|
|||
class WithingsHealthBinarySensor(BaseWithingsSensor, BinarySensorEntity):
|
||||
"""Implementation of a Withings sensor."""
|
||||
|
||||
_attr_device_class = DEVICE_CLASS_OCCUPANCY
|
||||
_attr_device_class = BinarySensorDeviceClass.OCCUPANCY
|
||||
|
||||
@property
|
||||
def is_on(self) -> bool:
|
||||
|
|
Loading…
Reference in New Issue