My fish are not trained but they have learnt the lighting routine.
I usually get up and about at 4am every day and put the very low intensity blue lighting on in the aquariums, the fish just start getting their act together without being spooked by the usual bright white lighting that comes with the aquariums. About an hour later the lighting changes to very low intensity purple, every time I change the light to purple they all start to mingle under the feed flap....they literally stop whatever they are doing and congregate uder the flap. I feed them and once all 5 aquariums are sorted I then go to the full very low intensity white lighting (its around 6am). Then around the 2pm I change the lighting to low intensity blue and they all start finding their spots for the night, lights off at 3pm and thats it til 4am the next day.
The Danio's and Cories get a bit hyper zoomies after lights out for an hour or two but the rest settle down for the night under the plants, in the caves or in the holes they dug when under afternoon blue lighting.
I close the curtains at 4pm and rarely, if ever, use table lamps and those I do use are enclosed so the fish are not disturbed too much and they are all used to the TV in the lounge and bedroom and sleep through it fine.
Their activty levels are entirely governed by the lighting colouring and timings.