Use new enums in mfi tests (#62516)

* Use new enums in mfi tests

* Code review: swap == for is
pull/62585/head
Dave T 2021-12-22 09:01:00 +00:00 committed by GitHub
parent a7ef983a31
commit f2ae7c0b92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -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):