1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-27 22:34:47 +00:00

Replace the usage of unit constants by enumerations in Tests [a-e] (#85932)

This commit is contained in:
Michael
2023-01-15 14:44:01 +01:00
committed by GitHub
parent b20eb54800
commit 2850583085
17 changed files with 164 additions and 122 deletions

View File

@@ -26,7 +26,7 @@ from homeassistant.components.media_player import (
)
import homeassistant.components.vacuum as vacuum
from homeassistant.config import async_process_ha_core_config
from homeassistant.const import STATE_UNKNOWN, TEMP_FAHRENHEIT
from homeassistant.const import STATE_UNKNOWN, UnitOfTemperature
from homeassistant.core import Context
from homeassistant.helpers import entityfilter
from homeassistant.setup import async_setup_component
@@ -1987,7 +1987,10 @@ async def test_temp_sensor(hass):
device = (
"sensor.test_temp",
"42",
{"friendly_name": "Test Temp Sensor", "unit_of_measurement": TEMP_FAHRENHEIT},
{
"friendly_name": "Test Temp Sensor",
"unit_of_measurement": UnitOfTemperature.FAHRENHEIT,
},
)
appliance = await discovery_test(device, hass)