Correct position for buttonState in my FSM
You should also introduce a button state to have the FSM working as a FSM

 bool buttonState = false;


in the loop you check for the press/release and change the state:

if (digitalRead(buttonPin) == LOW &amp;&amp; buttonState == true) buttonState == false;
if (digitalRead(buttonPin) == HIGH &amp;&amp; buttonState == false) buttonState == true;


inside your function you only go for buttonState eg

statusType noLightFunction() {
if (buttonState == false) {  // Button is NOT pressed

    return (yellowLight);

  } else {       // Button is pressed

    return (whiteLight);
  }
}


The button acts as a toogle switch as long as you keep it pressed (or released) nothing will change only the state changes caise an action to happen. I personally use "speaking" vars I still know years later so instead of
buttonState I use buttonIsPressed but thats flavour