Logic not recording automation?

I am working in a plugin in which a slider (not in the apvts) alters the value of a parameter in the apvts as follows:


tmp = juce::Random::getSystemRandom().nextFloat();
juce::Value param = apvts.getParameterAsValue("PARAMETER");
param = tmp;

Everything works perfectly and dandy in every DAW, including Logic, BUT when I try to record automation, Logic completely ignores the changes (other DAWs seem to work fine).

What am I doing wrong?