MQTT light switch that сonsistently on few lamps

I have chandelier with 6 lamp.
I need configure switch(button?) that will switch on one more lamp each time -
first click - 1 lamp on
second click - 2 lamps on

sixth click 6 lamps on
seventh click - all off

Lamps are controlled by MQTT topic.
To switch lamp on I have to send lamps number in payload.
Or 0 to switch all lamps off.

I don’t have any idea how to do it.
Please help me.

I can’t think how to do it with a button, but would an input_slider UI do? Slide the input to the number of lights you want on.

You would then need an automation to send the correct MQTT messages for each input level.

Look like I need! Thank you!