A man appeared at Calderdale Magistrates’ Court charged with the production of 50 cannabis plants.
Police were called to James Greehy’s home in Pellon Lane, Halifax, in July and found the plants, along with high powered lights and power packs.
The electricity meter in the house had also been bypassed.
Prosecutor Lisa Beadle told the court that Greehy, 32, had seen an opportunity after a friend had given him the plants and that 840 grammes of cannabis could have been produced, with a street value of £7,200.
Greehy pleaded guilty to the charge and was granted unconditional bail.
He will next appear before Bradford Crown Court on October 27.