Temporarily or dynamically disable an entity

Came across this problem recently after installing smart blinds which I want to prevent by all means from being closed if the window is open. Best method I found is to disable the entity using the homeassistant.disable_entity service that the Spook custom component registers.