Rain detector in minecraft with commands

I need to know is there a way to detect if it is raining, but purely with commands (/stats, /testfor, any possible way, hit me I can take it), without the use of cauldrons, soil, fire blocks, etc. They all are too unreliable. I need it to be instant since I want to perform constant actions while it rains and stop immediately when it doesn't.


Solution 1:

Didn't find any designs online after searching for like an hour and now found the solution after thinking about it for 10 minutes.

If someone needs that kind of a detector: I'm testing the {Fire:} NBT tag on armor stands.

enter image description here

Forgot to add that armor stands are being spawned with NBT tag {Fire:32767,Invulnerable:1} with no blocks above them. 32767 is not the value needed, it could be any value from 2 and above, and when you should test for a value 1 smaller then what you choose, I just used it while testing different idea earlier.

The comparator outputs a redstone signal when it is not raining very accurately and turns off when it starts raining.

Edit: /testfor actually does output a signal, for some reason it didn't when I was testing, so you don't need the kill command block at the end.