First of all, welcome to minecraft pi edition! Looking at your posts so far, i'd say you guys are probably having a blast with the python api. If you'd be willing to share some of your creations that would be great!
Now, I personally dont know how to solve your bed issue, but you might have a better chance of getting an answer by posting in our (un)official discord. We've been building a community there for almost a year now, and there's even mods for bugfixes, and servers to play on.
if you're interested here's the link: https://discord.gg/tnzF5AWS9K