It could be issuing a command in the same way you do the first, but probably most lights just support switching them on/off right now, and won't take a delay argument.
So, if you can't just do the same you were doing, how do you do it? If there's some kind of local support, you can issue a delay command to some device in the network that will switch the lights on, but you still need to be able to control that action as the user might want to cancel or adjust the delay too.
If the execution need to happen remotely because there's no local support, then you don't even know that you'll be able to reach the device in 5 minutes (Internet down, router not letting random connections in). And keeping this request queued needs some infra in the server side too together with the necessary APIs to allow adjusting and cancelling requests.