I use my thermostat to handle that, and override as needed from HA. The other thing I do, if it’s a cloud api, is make the change, wait a period of time that’s reasonable for the update to occur, and check the state. If state is not what I want it to be, set again, wait a random back off and check again. There’s a service you can call to update an entity, too.
Homeassistant, as far as I’ve been able to figure out, doesn’t do desired states natively. You can’t declare “from 19-21h I want it to be 17°C”. You have to build it yourself.