MQTT ceiling fan config question

Hi All,

I’m trying to configure 4 relays for a ceiling fan in my bedroom with 3 speeds and a light switch.

I’m able to configure everything from home assistant to the Raspberry using MQTT with the help of a lot of forum topics here.

But, does someone knows if it’s possible to require a switch in off state before the pressed switch goes to On state?

This is to prevent 2 relays being in On state, which will result in a dead fan.

If the items cannot be used together, I would use an input_select or even an input_slider as the ui, rather than three separate switches.