Hello,
I have to read the meter using MQTT, which starts every 15 minutes. Unfortunately, always the first result with zero and the next the actual kWh values. Is there any way to get rid of zero from the sensor? So far I use sensor filter, but there is necessary to set the minimum value, so there is no zero, but set the lowest value.
Is it somehow possible to set the last non-zero value or not to write at all when it is zero? http://fii.cz/jtzxkn
The problem is that the energy sensor sometimes sends a 0, which then messes up the utility meter value.
And I would like that if sensor.apartment_1_energy is equal to 0, then it should use the previous value of sensor.apartment_1_energy, otherwise, it should use the new value .
Excuse me for reviving this thread, I’m trying to do something very similar but am lost trying because of the math in my template.
My template sensor outputs -10.848 when ‘sensor.vwc_s1’ state = 0. This destroys my graph, because every measurement of that sensor outputs a 0 just a millisecond before it gives the measured value. Could I rewrite the template to ignore any -10.848 value?
Ultimately I would try to only let values between 0.01 and 0.99 come through this template
I have a similar problem, I have a sensor that takes information from the integration, but in every restart , starts with 0 value for a seconds , and after taht recover the last value, in this case if I configure a helper to count the increasing ,this sum the same value twice, How can avoid this 0 when I start de HA, and take as a last value, the value that this sensor had before restart HA.?
Thanks for this topic i am facing the same situation but with zigbee2mqtt i did not find were to put this script in order to avoir this 0 causing wrong data collection.