| For my kids, I have a virtual light switch in HomeKit called "Shower Is Safe". It's pinned to the top of the Home app. I use the Home Assistant integration to fetch this data and run some calculations on the past few minutes of lightning activity. Since the API returns lightning strike time and bearing from a given location, I can (in combination with wind direction) determine if the lightning is approaching or receding. If it's approaching and less than 30 minutes away (or if any strike is within 20 miles in any direction), it turns off the light switch. It then waits until it's been receding for at least 15 minutes (and with no more detections within 20 miles) before switching "Shower is Safe" back on. I can (and do) override it if I notice it's potentially hazardous to shower. |