Store Datas once a day

Hi,

for general purpose, I need to store a time in a virtual device, like a sensor or other thing.

Does someone know how to do that as I only need to store a value on this device when I need, like a variable.

I know that there is template but don’t know how to push a value in it.

Any help will be appreciate.

Thank you.

Sellig28