In my tests the restoring of battery level seemed to be extremely sensitive to the delays in the script between stop bme/start bme. The examples in the recipe were for values I found working and are quite conservative. Ie. the longer the delay between restarting bme the more likely it seemed to work.
/sbin/stop bme; /sbin/start bme