Describe your approach to managing state machines in a complex wearable device like Oura's sensors and firmware.