Glad it is working for you. The pauses may not be required for you, but works well for me.
All in a day’s work! LOL
Side note: I think it is important to keep in line 28:
and
IF bulb's level is greater than 25%
to keep the code clean & streamlined with no potential loop