Heating with variable

Hi

I’ve just setup by first Home assistant and wonted to know if it’s possible to get ask google to heat a specific room for a variable amount of time.

Something like OK google heat bedroom for # hours

For then Home Assistant to heat the bedroom for # hours

Apologies if this has been answered before but I struggled to find one.