Alexa, turn off X in X hours (Dynamic)

Hi,

is there any way to get HA/Alexa to dynamically be able to turn on/off things in X hours?

For example:
Alexa, turn off the AC in 5 hours.
or
Alexa, turn on the porch lights in 3 hours.
(everything entered by voice)

I tried searching but I saw only hardcoded scripts, maybe I’m missing something