The obvious answer to this is don't answer the door
Don't engage, as soon as you see it's police walk away and put on some headphones.
Never talk to police if you can avoid it. Yea they may be coming in, but they'll need a warrant or you'll probably be walking.
And if it's a recreational state it must be hard to get probable cause for a warrant without seeing some very specific things. A lot of their options go out the window. Especially if smell isn't limited
Any debris with THC or a dog hit would be useless yea? So they've got to see you with plant counts over the limit to convince a judge doing his job...Again presumably
Here is a great talk that has probably been posted here and every other site related to controlled substances in the english speaking world.
https://www.youtube.com/watch?v=d-7o9xYp7eE
Now the nuances of having a medical grow may change things. But as a general principle just forcing them to get a warrant and saying nothing is almost always the most sound legal strategy