The versatile weapon property says (PHB, p. 147):
Versatile. This weapon can be used with one or two hands. A damage value in parentheses appears with the property–the damage when the weapon is used with two hands to make a melee attack.
A weapon with the versatile property, such as a longsword or a quarterstaff, can be wielded with one or two hands. Does it consume any part of the action economy to switch between using one or two hands on your turn?
Intuitively I'd say no, I imagine it costs absolutely nothing, but I can imagine, at worst, there being arguments for it costing your "free object interaction" (PHB, p. 190). Which is it?
To give a concrete example, if we imagine that a PC's turn starts with a longsword in one hand and a spellcasting focus in the other; they spend their bonus action casting a spell with their focus, and then spend their free object interaction putting that focus away. With only their action left, can they now attack with their longsword using it as a versatile weapon (i.e. dealing 1d10 damage instead of 1d8)?
(Below are some related Q&As, but not specific to versatile weapons, sadly).
The accepted answer to a related Q&A (thanks @NautArch) suggests that:
Taking your hand off the weapon should not require any action expenditure - you are just letting go of it, same as if you dropped it.
You can then use your free object interaction to restore your grip after casting.
The reasoning for the first case makes sense, but the second case isn't backed up by anything, although I can see the logic behind it.
The errata posted in that answer, to me, suggests that it would in fact cost nothing to grip the weapon with a second hand, almost like it's "part of the attack", similar to how the Ammunition weapon property works, but again, this is logic, not RAW.
See also, the "following round" scenario of this question (thanks @Medix2), which involves sheathing a shortsword and attacking with a longbow that requires two hands. This is almost exactly the same scenario as the one I detailed above.
The most upvotes answer suggests:
There is also no indication in the rules that you must use any sort of object interaction to allow the use of your longbow for an attack as long as it is equipped. The two-handed property only specifies that the weapon requires two hands to use, and we have functional use of both. Any interaction with the weapon with both of our hands would fall under the domain of our attack action.
As with the above related question, is there any way to back this up? (I know it's difficult to back up a claim of "there is also no indication in the rules", but still...)