Tasmota Bitshake electricity meter and template glitches

Hi, I’m trying to use a Bitshake sensor for our electricity meter to measure the overall power consumption. Everything works so far, but the values for ‘power’ and ‘in’ are glitching with extreme numbers. It gives values of 24.000.000.000 W and beyond for the actual ‘power’. The ‘in’ falls down to zero.

So I tried to take care of the with a template that just cuts those values, but it does not work. The real ‘power’ and the template have the same peaks. Does anyone have an idea what went wrong?

The template:

{% if states('sensor.tasmota_norax_power') | float(0) > 100000 or states('sensor.tasmota_norax_power') == 'unavailable' %}
{{ states('sensor.stromverbrauch_aktuell') }}
{% else %}
{{ states('sensor.tasmota_norax_power') }}
{% endif %}

I also tried float and int:

{% if states('sensor.tasmota_norax_power') | float(0) > 100000 or states('sensor.tasmota_norax_power') == 'unavailable' %}
{{ states('sensor.stromverbrauch_aktuell') | float(0) }}
{% else %}
{{ states('sensor.tasmota_norax_power') | float(0) }}
{% endif %}

Example peak:

Ok, I think the problem is, that I can not call the template itself. Everything works when I put a ‘0’ in the else case. But that doesn’t help for the problem.
Is there a way to get the last value of the template? I tried the this.state command but it doesn’t seem to work in templates?!

If somebody ever has the same problem: use an automation put a senseful number filter in it and if its good give the value in an input_value helper.