Disable switch using automation

Hey there sorry, couldn’t find exact match of what I need:
I have automation which switched off my pump. But someone accidentally switches it on from frontend. So I need automation not just to turn switch entity off but also disable it (gray out) unless automation does not switch it on or disabling automation itself.
How do I do that?

install Spook as an Integration and you can use a service called service: homeassistant.disable_device in your automation to disable the device you want