From b5f7e149854f85e074d55238e31edc053d98b2c2 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Wed, 8 Dec 2021 19:56:59 +0100 Subject: [PATCH] Use new DeviceClass enums in ads (#61249) Co-authored-by: epenet --- homeassistant/components/ads/binary_sensor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/ads/binary_sensor.py b/homeassistant/components/ads/binary_sensor.py index fda2aae3d5b..0cdec25313f 100644 --- a/homeassistant/components/ads/binary_sensor.py +++ b/homeassistant/components/ads/binary_sensor.py @@ -2,9 +2,9 @@ import voluptuous as vol from homeassistant.components.binary_sensor import ( - DEVICE_CLASS_MOVING, DEVICE_CLASSES_SCHEMA, PLATFORM_SCHEMA, + BinarySensorDeviceClass, BinarySensorEntity, ) from homeassistant.const import CONF_DEVICE_CLASS, CONF_NAME @@ -40,7 +40,7 @@ class AdsBinarySensor(AdsEntity, BinarySensorEntity): def __init__(self, ads_hub, name, ads_var, device_class): """Initialize ADS binary sensor.""" super().__init__(ads_hub, name, ads_var) - self._attr_device_class = device_class or DEVICE_CLASS_MOVING + self._attr_device_class = device_class or BinarySensorDeviceClass.MOVING async def async_added_to_hass(self): """Register device notification."""