From f2ae7c0b929e51a3789fccc4a993c4a30f5d89ee Mon Sep 17 00:00:00 2001 From: Dave T <17680170+davet2001@users.noreply.github.com> Date: Wed, 22 Dec 2021 09:01:00 +0000 Subject: [PATCH] Use new enums in mfi tests (#62516) * Use new enums in mfi tests * Code review: swap == for is --- tests/components/mfi/test_sensor.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/components/mfi/test_sensor.py b/tests/components/mfi/test_sensor.py index 17d8df958ef..ea67ab6f427 100644 --- a/tests/components/mfi/test_sensor.py +++ b/tests/components/mfi/test_sensor.py @@ -8,7 +8,8 @@ import requests import homeassistant.components.mfi.sensor as mfi import homeassistant.components.sensor as sensor_component -from homeassistant.const import DEVICE_CLASS_TEMPERATURE, TEMP_CELSIUS +from homeassistant.components.sensor import SensorDeviceClass +from homeassistant.const import TEMP_CELSIUS from homeassistant.setup import async_setup_component PLATFORM = mfi @@ -134,7 +135,7 @@ async def test_uom_temp(port, sensor): """Test the UOM temperature.""" port.tag = "temperature" assert sensor.unit_of_measurement == TEMP_CELSIUS - assert sensor.device_class == DEVICE_CLASS_TEMPERATURE + assert sensor.device_class is SensorDeviceClass.TEMPERATURE async def test_uom_power(port, sensor):