I am trying to describe the states of all my units connected to the Raspberry Pi. I have several buttons, magnets, reed switches, LEDs, and other. This is a game and it has few phases. I want to describe states of each element for each phase and conditions to pass from one phase to another. I tried to use a state diagram, but there no states for elements. May be somebody has an example or the name of this diagram?