Problem with onChange function and millis delays in switch

Hi @ardopool.

This is what your code is expected to do. As the comment says:

The ArduinoCloud.update() function will call the onShowerChange function if the value of the shower Cloud Variable has been changed from the Arduino Cloud dashboard. That is the only time it will call the onShowerChange function.

Maybe you have the impression that the onShowerChange function will also be called automatically after the value of the shower variable is changed internally by the sketch program? This is not so.