Enable Ruff SIM117 (#86783)

This commit is contained in:
Franck Nijhof 2023-01-27 11:52:49 +01:00 committed by GitHub
parent 57cf11f067
commit a79885ceaf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 441 additions and 453 deletions

View file

@ -75,14 +75,13 @@ async def test_entity_failed_service_calls(
with patch(
"homeassistant.components.sensibo.util.SensiboClient.async_set_ac_state_property",
side_effect=p_error,
):
with pytest.raises(HomeAssistantError):
await hass.services.async_call(
CLIMATE_DOMAIN,
SERVICE_SET_FAN_MODE,
{ATTR_ENTITY_ID: state.entity_id, ATTR_FAN_MODE: "low"},
blocking=True,
)
), pytest.raises(HomeAssistantError):
await hass.services.async_call(
CLIMATE_DOMAIN,
SERVICE_SET_FAN_MODE,
{ATTR_ENTITY_ID: state.entity_id, ATTR_FAN_MODE: "low"},
blocking=True,
)
state = hass.states.get("climate.hallway")
assert state.attributes["fan_mode"] == "low"