Homekit timer using Automations
There are several threads dealing with this issue but most involve using tedious shortcuts that need an iOS device present. The purpose is to automatically turn an accessory off after a certain time has expired.
You can create an automation to detect when an accessory (eg a fan) is turned on and take action but that action cannot be to turn the accessory off after a certain time.
To get around this try creating an automation that detects when the fan is turned on and then turns another accessory on (such as an unused outlet or a light) and set that accessory to turn off after a certain time (up to 4 hours).
Now create a new automation that detects when the light is turned off and then turns the fan off.
Apple TV 4K (2nd generation)