First they do not have keys to individual dwelling units. Secondly if they are responding to an alarm and have every reason to believe there is a fire or personal emergency they do have right of entry. You can not argue the castle doctrine if you shoot a fireman or EMT who gains entry to your dwelling in a reported emergency.
If there was an emergency then I expect that any castle doctrine PATRIOT would expect and help responders as long as they don’t expand their responsibilities.
If unexpected people break down my door in the middle of the night when I know I have no crimminal activity I will be trying to miss my dogs as I defend myself.
If police ask questions I will be sure to try to help. If they break into my home like a home invaader, I will try to send them to hell.And, if they can break into my home and I pay their salary. I should be able to break into their home on and charge them if the service is constitutional.