Valve Thermostatic - Custom schedule component

Dear all,
I hope you can help me with some guidelines or hints.
I have some smart thermostats controlled by the custom componenent Schedule.

I would like that when I’m away the temperature is set on a specific temperature. This I guess that is easy with an automation.However I would like that when I’m back the
Temperature is set up as in the Schedule for the given time.

Any suggestion on this?

Thank you!