From 8df0bc9d57c0b0e2c987e4ccaab2d392e9dcf88e Mon Sep 17 00:00:00 2001
From: epenet <6771947+epenet@users.noreply.github.com>
Date: Thu, 9 Dec 2021 09:24:07 +0100
Subject: [PATCH] Use new BinarySensorDeviceClass enum in concord232 (#61335)

Co-authored-by: epenet <epenet@users.noreply.github.com>
---
 .../components/concord232/binary_sensor.py          | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/homeassistant/components/concord232/binary_sensor.py b/homeassistant/components/concord232/binary_sensor.py
index 7fd1d9748b3..3f21489de20 100644
--- a/homeassistant/components/concord232/binary_sensor.py
+++ b/homeassistant/components/concord232/binary_sensor.py
@@ -7,12 +7,9 @@ import requests
 import voluptuous as vol
 
 from homeassistant.components.binary_sensor import (
-    DEVICE_CLASS_MOTION,
-    DEVICE_CLASS_OPENING,
-    DEVICE_CLASS_SAFETY,
-    DEVICE_CLASS_SMOKE,
     DEVICE_CLASSES,
     PLATFORM_SCHEMA,
+    BinarySensorDeviceClass,
     BinarySensorEntity,
 )
 from homeassistant.const import CONF_HOST, CONF_PORT
@@ -89,14 +86,14 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
 def get_opening_type(zone):
     """Return the result of the type guessing from name."""
     if "MOTION" in zone["name"]:
-        return DEVICE_CLASS_MOTION
+        return BinarySensorDeviceClass.MOTION
     if "KEY" in zone["name"]:
-        return DEVICE_CLASS_SAFETY
+        return BinarySensorDeviceClass.SAFETY
     if "SMOKE" in zone["name"]:
-        return DEVICE_CLASS_SMOKE
+        return BinarySensorDeviceClass.SMOKE
     if "WATER" in zone["name"]:
         return "water"
-    return DEVICE_CLASS_OPENING
+    return BinarySensorDeviceClass.OPENING
 
 
 class Concord232ZoneSensor(BinarySensorEntity):