Sample&hold sensor state at a specific time of day

How can I sample&hold a sensor state at a specific time of day?
None of the build-in components seems to offers that feature.

Any ideas?

I suppose you could make an automation to write the state of the sensor to an input_text, input_number, etc. at a certain time. What are you ultimately trying to accomplish?