From 16e152b7972504ce952ce150b4def0ce11a49993 Mon Sep 17 00:00:00 2001 From: Dave T <17680170+davet2001@users.noreply.github.com> Date: Thu, 16 Dec 2021 22:26:23 +0000 Subject: [PATCH] Use DeviceClass Enums in axis tests (#62096) --- tests/components/axis/test_binary_sensor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/components/axis/test_binary_sensor.py b/tests/components/axis/test_binary_sensor.py index 2429ec61855..0fe862263ff 100644 --- a/tests/components/axis/test_binary_sensor.py +++ b/tests/components/axis/test_binary_sensor.py @@ -2,8 +2,8 @@ from homeassistant.components.axis.const import DOMAIN as AXIS_DOMAIN from homeassistant.components.binary_sensor import ( - DEVICE_CLASS_MOTION, DOMAIN as BINARY_SENSOR_DOMAIN, + BinarySensorDeviceClass, ) from homeassistant.const import STATE_OFF, STATE_ON from homeassistant.setup import async_setup_component @@ -63,9 +63,9 @@ async def test_binary_sensors(hass, mock_rtsp_event): pir = hass.states.get(f"{BINARY_SENSOR_DOMAIN}.{NAME}_pir_0") assert pir.state == STATE_OFF assert pir.name == f"{NAME} PIR 0" - assert pir.attributes["device_class"] == DEVICE_CLASS_MOTION + assert pir.attributes["device_class"] == BinarySensorDeviceClass.MOTION vmd4 = hass.states.get(f"{BINARY_SENSOR_DOMAIN}.{NAME}_vmd4_profile_1") assert vmd4.state == STATE_ON assert vmd4.name == f"{NAME} VMD4 Profile 1" - assert vmd4.attributes["device_class"] == DEVICE_CLASS_MOTION + assert vmd4.attributes["device_class"] == BinarySensorDeviceClass.MOTION