Hi,
I’m trying to get a template sensor working for my oekofen pellet heater to convert my pellet usage into gas for the energy meter.
The state template I use:
{{ states(‘sensor.pellet_usage_today’) | float(default=0.0) | multiply(4.8) | round(1) }}
it works okay BUT the sensor keeps reporting wrong values that mess my whole energy calcualtion up:
I tried to fix it by limiting the value of the template sensor which is kinda pointless because I would need to limit the increase of a single step not the daily usage.
My stupid attempt to fix it:
{% set x = (states(‘sensor.pellet_usage_today’) | float(default=0.0) | multiply(4.8) | round(1)) %}
{{ ([0, x, 100]|sort)[1] }}
So does anybody have an idea how to filter those errors out?
Thanks a lot
Cheers
Nana