Skip to content
Snippets Groups Projects
Unverified Commit 25d69741 authored by epenet's avatar epenet Committed by GitHub
Browse files

Migrate balboa tests to use unit system (#140371)

parent d2124db3
No related branches found
No related tags found
No related merge requests found
...@@ -26,10 +26,11 @@ from homeassistant.components.climate import ( ...@@ -26,10 +26,11 @@ from homeassistant.components.climate import (
HVACAction, HVACAction,
HVACMode, HVACMode,
) )
from homeassistant.const import ATTR_TEMPERATURE, Platform, UnitOfTemperature from homeassistant.const import ATTR_TEMPERATURE, Platform
from homeassistant.core import HomeAssistant, State from homeassistant.core import HomeAssistant, State
from homeassistant.exceptions import ServiceValidationError from homeassistant.exceptions import ServiceValidationError
from homeassistant.helpers import entity_registry as er from homeassistant.helpers import entity_registry as er
from homeassistant.util.unit_system import US_CUSTOMARY_SYSTEM
from . import client_update, init_integration from . import client_update, init_integration
...@@ -97,11 +98,10 @@ async def test_spa_temperature_unit( ...@@ -97,11 +98,10 @@ async def test_spa_temperature_unit(
hass: HomeAssistant, client: MagicMock, integration: MockConfigEntry hass: HomeAssistant, client: MagicMock, integration: MockConfigEntry
) -> None: ) -> None:
"""Test temperature unit conversions.""" """Test temperature unit conversions."""
with patch.object( hass.config.units = US_CUSTOMARY_SYSTEM
hass.config.units, "temperature_unit", UnitOfTemperature.FAHRENHEIT
): state = await _patch_spa_settemp(hass, client, 0, 15.4)
state = await _patch_spa_settemp(hass, client, 0, 15.4) assert state.attributes.get(ATTR_TEMPERATURE) == 15.0
assert state.attributes.get(ATTR_TEMPERATURE) == 15.0
async def test_spa_hvac_modes( async def test_spa_hvac_modes(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment