Custom Switch width Custom status

I hope that I am correct at this point.

Is it somehow possible to create a custom switch with custom status?

The switches usually have the status “on” or “off”, now I want to set the percentage of a progress instead of the “on” or “off”.

What exactly do I have in mind? I use my coffee machine in Home Assistat and have built a switch which sends a certain coffee setting to the coffee machine. The switch automatically goes back to “off” when the program is finished. Now it would be great if I can set the status of the switch to the percentage of progress, so that I don’t have to use another entity on the user interface of Home Assistant.

I have already seen that there is a status bar, but it requires a single card again.

Does anyone know how I can program this?

Greetings