I’d probably use two automations because of the long delay and the possibility of a HA restart that wouldn’t live through that or maybe just try Simple Scheduler Addon
The automation I posted is unaffected by restarts during the time slot. It’s only affected by restarts that occur precisely at any of the six scheduled times.
For example, if Home Assistant is restarted at 06:59:45 and takes 30 seconds to startup, it will fail to trigger the 7:00:00 Time Trigger.
If instead it were to restart at 07:01:00, it will have already turned on the switch at 07:00:00 and the restart will have no affect on the next scheduled Time Trigger (to turn off the switch) at 08:30:00. It’s the use of Time Triggers (for turning the switch on and off), instead of a delay, which makes the automation more robust.
There are other techniques (that I use in my automations) to make it even more failure-resistant; it turns the switch on or off even if Home Assistant was restarted precisely at the scheduled Time Trigger. The technique adds a bit more complexity to the automation but it’s worthwhile if some device must be absolutely, positively turned on/off otherwise it will consume excessive resources (for example, electricity for a pool pump or water for sprinklers).