From 23baf6e02a319fc9edf654578f620e8b189b6e70 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Mon, 20 Dec 2021 16:53:50 +0100 Subject: [PATCH] Use new enums in syncthru (#62399) Co-authored-by: epenet --- homeassistant/components/syncthru/binary_sensor.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/syncthru/binary_sensor.py b/homeassistant/components/syncthru/binary_sensor.py index 18780e9225e..e3c8317df3d 100644 --- a/homeassistant/components/syncthru/binary_sensor.py +++ b/homeassistant/components/syncthru/binary_sensor.py @@ -4,8 +4,7 @@ from __future__ import annotations from pysyncthru import SyncThru, SyncthruState from homeassistant.components.binary_sensor import ( - DEVICE_CLASS_CONNECTIVITY, - DEVICE_CLASS_PROBLEM, + BinarySensorDeviceClass, BinarySensorEntity, ) from homeassistant.const import CONF_NAME @@ -77,7 +76,7 @@ class SyncThruBinarySensor(CoordinatorEntity, BinarySensorEntity): class SyncThruOnlineSensor(SyncThruBinarySensor): """Implementation of a sensor that checks whether is turned on/online.""" - _attr_device_class = DEVICE_CLASS_CONNECTIVITY + _attr_device_class = BinarySensorDeviceClass.CONNECTIVITY def __init__(self, syncthru, name): """Initialize the sensor.""" @@ -93,7 +92,7 @@ class SyncThruOnlineSensor(SyncThruBinarySensor): class SyncThruProblemSensor(SyncThruBinarySensor): """Implementation of a sensor that checks whether the printer works correctly.""" - _attr_device_class = DEVICE_CLASS_PROBLEM + _attr_device_class = BinarySensorDeviceClass.PROBLEM def __init__(self, syncthru, name): """Initialize the sensor."""