Use enums in withings (#61987)

pull/62011/head
Robert Hillis 2021-12-16 03:09:28 -05:00 committed by GitHub
parent 98c2c8c2d1
commit f691b0a1da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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: