I talked to the tv in the haunted house in Pokemon pearl but nothing happened. What do i do?

In order to catch Rotom, the Pokemon who inhabits that television, it is required that the time of day is in the nocturnal period, otherwise Rotom willl not appear. For future reference, Rotom is at level 15 but that has no impact on how difficult he is to catch so I strongly advise you bring several ultra balls or a master ball if you happen to have one.