You mean like Blitzortung?
https://github.com/mrk-its/homeassistant-blitzortung
https://community.home-assistant.io/t/blitzortung-showing-thunder-on-map/214560/14
I have built sensors on this that tell me when it’s in a defined distance. I’m sure this would work for your use case too.