Get historic variable value

How is it possible to get the historic value of a variable in HomeyScript?

I have a numeric variable and I want to know what its value was two weeks ago.

I can see the value in the graphs of insights but I cannot reproduce the value in HomeyScript.