Does anyone know of a way to "veto" an action in #HomeAssistant? For example: I ...

@blindcoder@toot.berlin

Does anyone know of a way to "veto" an action in #HomeAssistant?
For example: I click on a switch to turn it off. HA should refuse to do that if a condition is true.
I do not want to replace the switch with an automation.

Is that possible?