Very cool! I created something similar for Casio F-91W. It also uses XState. The benefit of specifying a machine in XState, is that one can embed Stately editor to visualize the states and their transitions.

https://github.com/dundalek/casio-f91w-fsm