Custom off/on button

Hi all,
do you can help me to create this group of button off/on?
immagine

I’m thinking of placing two buttons side by side, but I’m not sure how to handle the rounded corners or the design. Any advice on how to achieve this?

Thanks in advance for your help!