Why is this not an acceptable spawn location?
As far as I know, you need to have a door for a house to register as a house, and no "open" spaces or gaps in the outer walls. If you look to the left of the building you're in, you have a small gap on the floor where you have the bed. Try to cover it and, theoretically, it should work.