From d5fe0fcee005e131485bdbe419c60e5492c4a47f Mon Sep 17 00:00:00 2001 From: Robert Hillis Date: Thu, 16 Dec 2021 08:34:10 -0500 Subject: [PATCH] Use enums in rfxtrx (#62039) --- homeassistant/components/rfxtrx/binary_sensor.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/homeassistant/components/rfxtrx/binary_sensor.py b/homeassistant/components/rfxtrx/binary_sensor.py index d7c0ea306d8..10342fd826a 100644 --- a/homeassistant/components/rfxtrx/binary_sensor.py +++ b/homeassistant/components/rfxtrx/binary_sensor.py @@ -6,8 +6,7 @@ import logging import RFXtrx as rfxtrxmod from homeassistant.components.binary_sensor import ( - DEVICE_CLASS_MOTION, - DEVICE_CLASS_SMOKE, + BinarySensorDeviceClass, BinarySensorEntity, BinarySensorEntityDescription, ) @@ -61,23 +60,23 @@ SENSOR_STATUS_OFF = [ SENSOR_TYPES = ( BinarySensorEntityDescription( key="X10 Security Motion Detector", - device_class=DEVICE_CLASS_MOTION, + device_class=BinarySensorDeviceClass.MOTION, ), BinarySensorEntityDescription( key="KD101 Smoke Detector", - device_class=DEVICE_CLASS_SMOKE, + device_class=BinarySensorDeviceClass.SMOKE, ), BinarySensorEntityDescription( key="Visonic Powercode Motion Detector", - device_class=DEVICE_CLASS_MOTION, + device_class=BinarySensorDeviceClass.MOTION, ), BinarySensorEntityDescription( key="Alecto SA30 Smoke Detector", - device_class=DEVICE_CLASS_SMOKE, + device_class=BinarySensorDeviceClass.SMOKE, ), BinarySensorEntityDescription( key="RM174RF Smoke Detector", - device_class=DEVICE_CLASS_SMOKE, + device_class=BinarySensorDeviceClass.SMOKE, ), )