Fix freedompro tests for ruff B018 (#113583)
This commit is contained in:
parent
dd3101e161
commit
470ef554d7
9 changed files with 75 additions and 60 deletions
|
@ -24,7 +24,7 @@ from homeassistant.util.dt import utcnow
|
|||
|
||||
from .conftest import get_states_response_for_uid
|
||||
|
||||
from tests.common import async_fire_time_changed
|
||||
from tests.common import MockConfigEntry, async_fire_time_changed
|
||||
|
||||
uid = "3WRRJR6RCZQZSND8VP0YTO3YXCSOFPKBMW8T51TU-LQ*TWMYQKL3UVED4HSIIB9GXJWJZBQCXG-9VE-N2IUAIWI"
|
||||
|
||||
|
@ -33,7 +33,7 @@ async def test_climate_get_state(
|
|||
hass: HomeAssistant,
|
||||
entity_registry: er.EntityRegistry,
|
||||
device_registry: dr.DeviceRegistry,
|
||||
init_integration,
|
||||
init_integration: MockConfigEntry,
|
||||
) -> None:
|
||||
"""Test states of the climate."""
|
||||
device = device_registry.async_get_device(identifiers={("freedompro", uid)})
|
||||
|
@ -88,10 +88,11 @@ async def test_climate_get_state(
|
|||
|
||||
|
||||
async def test_climate_set_off(
|
||||
hass: HomeAssistant, entity_registry: er.EntityRegistry, init_integration
|
||||
hass: HomeAssistant,
|
||||
entity_registry: er.EntityRegistry,
|
||||
init_integration: MockConfigEntry,
|
||||
) -> None:
|
||||
"""Test set off climate."""
|
||||
init_integration
|
||||
|
||||
entity_id = "climate.thermostat"
|
||||
state = hass.states.get(entity_id)
|
||||
|
@ -119,10 +120,11 @@ async def test_climate_set_off(
|
|||
|
||||
|
||||
async def test_climate_set_unsupported_hvac_mode(
|
||||
hass: HomeAssistant, entity_registry: er.EntityRegistry, init_integration
|
||||
hass: HomeAssistant,
|
||||
entity_registry: er.EntityRegistry,
|
||||
init_integration: MockConfigEntry,
|
||||
) -> None:
|
||||
"""Test set unsupported hvac mode climate."""
|
||||
init_integration
|
||||
|
||||
entity_id = "climate.thermostat"
|
||||
state = hass.states.get(entity_id)
|
||||
|
@ -143,10 +145,11 @@ async def test_climate_set_unsupported_hvac_mode(
|
|||
|
||||
|
||||
async def test_climate_set_temperature(
|
||||
hass: HomeAssistant, entity_registry: er.EntityRegistry, init_integration
|
||||
hass: HomeAssistant,
|
||||
entity_registry: er.EntityRegistry,
|
||||
init_integration: MockConfigEntry,
|
||||
) -> None:
|
||||
"""Test set temperature climate."""
|
||||
init_integration
|
||||
|
||||
entity_id = "climate.thermostat"
|
||||
state = hass.states.get(entity_id)
|
||||
|
@ -189,10 +192,11 @@ async def test_climate_set_temperature(
|
|||
|
||||
|
||||
async def test_climate_set_temperature_unsupported_hvac_mode(
|
||||
hass: HomeAssistant, entity_registry: er.EntityRegistry, init_integration
|
||||
hass: HomeAssistant,
|
||||
entity_registry: er.EntityRegistry,
|
||||
init_integration: MockConfigEntry,
|
||||
) -> None:
|
||||
"""Test set temperature climate unsupported hvac mode."""
|
||||
init_integration
|
||||
|
||||
entity_id = "climate.thermostat"
|
||||
state = hass.states.get(entity_id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue