This sort of repurposing is how I got the most use out of my Firefox phone (Geeksphone Peak). There's a fork of FirefoxOS called JanOS[1] intended for powering IoTs, which I came across before FirefoxOS pivoted.
I ended up keeping a footbag[2] ontop of the proximity sensor and when it was removed, it would notify my office-mates (via slack) that it was time to stop working and come play some footbag :) Source is on GitHub[3]