Awesome SmartApp: Mood Cube (with critical bug)

Thanks for the fast reply. Appreciated.
Had a play around only to later realise that the reason for my failure following that code is that newer sensors don’t have the orientation sensor.