The man in question was drunk at the time when, at the end of July 2018, he aimed a loaded rifle at an open window and fired.
A car passing on the road outside was hit in the side of the shot.
No one was injured.
The incident occurred in a small town in Jämtland.
When the police arrived at the scene, it was discovered that the man had a large number of weapons in his home.
He did not have a license for several of them, even though they were required to have a license.
The man is sentenced to one year in prison for two cases of gun crime and causing danger to another.