From f691b0a1da1915ccfc02dab4d5dbdec9f9f5146f Mon Sep 17 00:00:00 2001 From: Robert Hillis Date: Thu, 16 Dec 2021 03:09:28 -0500 Subject: [PATCH] Use enums in withings (#61987) --- homeassistant/components/withings/binary_sensor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/withings/binary_sensor.py b/homeassistant/components/withings/binary_sensor.py index 25ed695e8ff..b0af5051124 100644 --- a/homeassistant/components/withings/binary_sensor.py +++ b/homeassistant/components/withings/binary_sensor.py @@ -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: