Add LOCF or step option to value_min Statistics


When using “Max age”, the value_min statistic returns false values, because there is no LOCF (last observation carried forward).

If a value stays longer than the maximum age, when a new value replaces it, the latter instantly becomes the minimum value, even if it’s higher than the previous one.

In the graph below :

You can see min_value go to 1, while the last minutes are at 0.