Help with solving Engery Spike with availability_template: kindly requested

Hello together,

I am desparetely trying to solve my energy spikes I get from mqtt sensors.
There are a couple of solutions mentioned, which I tried all, but it doesnt seem to work.
The way I understood it an “availability_template” statement behind the value template should filter out all values which does not meet the condition.
So I tried the following in the mqtt: section:

- state_topic: energy/growatt
    value_template: "{{ value_json['values']['pvgridvoltage'] | int / 10 }}" 
    availability_template: "{{ value_json['values']['pvgridvoltage'] < 3000 }}"

alternatively I tried the following:

- state_topic: energy/growatt
    value_template: "{{ value_json['values']['pvenergytoday'] | int / 10 }}" 
    availability_template: "{{ value_json['values']['pvenergytoday'] < ['500']}}"

but if I change the values in the availibility_template under the actuals I found out, that it is not filtered.

I kindly request you help to point me in the rigth direction and I assume a lot of people would profit from that, because there tons of unsanswered request for help regarding that subject.

Thanks upfront!

Finally solved the issue with the help of another forum member