There are a few ways to do it. The simplest is to limit the time and duration that the outlet is allowed to be ON.
[ATO]
Fallback OFF
Set OFF
If Switch5 CLOSED Then ON
If Time 23:00 to 22:00 Then OFF
This keeps the outlet OFF from 11:00pm to 10:00pm the next day, so it can only come ON if the switch is CLOSED and the time is between 10:00pm and 11:00pm.
If you want the ATO to come on at any time, but limit it to 1 hr, it is a bit more complex. You need to create a virtual outlet.
[ATO_Limit]
If Switch5 CLOSED Then ON
Defer 60:00 Then ON
[ATO]
Fallback OFF
Set OFF
If Switch5 CLOSED Then ON
If Outlet ATO_Limit = ON Then OFF
The ATO_Limit outlet must first be set to Manual OFF, then AUTO. This will stay in the OFF state until Switch5 is CLOSED. Since Switch5 is CLOSED, the ATO will be ON. The Defer in ATO_Limit will act as a countdown timer. After an hour, ATO_Limit will be ON and this will cause ATO to be OFF. This will then require ATO_Limit be set to Manual OFF > AUTO to reset.
Todd