--- Quote Start ---
Pauliman, you don't need the x01 function. if the signal is driven 'Z' (from the master) and 'H' (from test bench) the simulator will translate it as '1' there is a table that defines which value "wins" in every conflict. in your case 'H' simulates the pull up resistor.
in any case you wrote x01 as part of your code in the first post, and 'x' is also for simulation and test benches only.
--- Quote End ---
You still need the to_x01 function, given what Pauliman said he is doing in his testbench.
'Z' driven with 'H' gives 'H'
if input = '1' then - would fail in simulation.
if to_X01(input) = '1' then -would pass.
Its only when you drive '1' and 'H' that you get '1'.
You also have to be careful, because 'H' driven against '0' gives '0'.