Check to see if an invalid state can be set in here and cause the ESP32 to crash.
Check to see if an invalid state can be set in here and cause the ESP32 to crash.