Virtual values are generating numbers even from missing values - ruins the graph scaling
I am using D280 sensor to measure Dew point in the room.
For this, I made a virtual value to show in a graph:
(243.04 * (Math.log(d.T2/100) + ( (17.625*d.T1) / (243.04+d.T1) ))) / (17.625 - (Math.log(d.T2/100) +( (17.625*d.T1) / (243.04+d.T1) )))
However, my device sometimes loses signal for a minute or two. Which shows as nothing on a graph of temperature, because that is a direct measurement. That is ok.
What is not OK is, that the virtual values work even with missing numbers - and display zero in graph, which both ruins the scaling and is incorrect.
How can I fix this? Something to do with IsNaN() in the virtual value definition? But how to assign NaN as output? (presuming that using NaN will not display itself in the graph.
Image with details here:
https://i.imgur.com/zeMn3Vi.png
Thanks
Сервис поддержки клиентов работает на платформе UserEcho
In your case, it is better not to use a virtual value, and transfer the formula to the widget settings, in the Arithmetic operation section, select f (x)
In this case, there should be holes in the graph if there is no data.
And more advice. Sometimes the sensor itself falls off and the data can be -80.
To prevent the chart from falling over, you can add a check.
As for the virtual value, if there is no data, then we will think which is better, leave zero or generate a NaN