Police say several shots have been fired at a home for asylum seekers in western Germany and one resident was lightly injured.

Police in Offenbach, near Frankfurt, said it wasn't immediately who was responsible for the incident in the early hours of Monday or what the motive was.

They said several shots were fired at a window of the building in the town of Dreiech at around 2.30 a.m. and one hit a 23-year-old asylum seeker who was sleeping. He was taken to a hospital, but was able to leave shortly afterward.

Germany saw around a million refugees and other migrants arrive last year. While Germans have generally been welcoming, there have been arson attacks, assaults and other crimes against refugee shelters.