Adding a Lightning Sensor to Home Assistant
This weekend I tried out the Blitzortung.org Lighting Detector custom component. Super easy to install via HACS and a great addition to my Home Assistant configuration.
For a while now, I’ve wanted to add a lightning alarm to my Smart Home in order to build an audio and text notification for when lightning was near. In Florida, most of the public parks have lightning alerts so why not configure something for the house.
I’ve been tracking this task since Jun 2018 and until now, there just weren’t many good options other than running your own hardware weather station. The WorldWide Lightning Network was almost a good fit but as soon as the integration popped up, the service was deprecated.
This brings us to this weekend when I installed the Blitzortung.org component. This thing is great. Totally free to use and (at least in Florida), incredibly reliable.
Using the component, I am able to generate a sensor to track when there are lightning strikes within a certain distance of the house. I am tracking the number of strikes within 2.5 miles of the house in my code.
Once Home Assistant knows about the strike, I am able to generate a text to speech alert to broadcast over the house, send out some iOS push notifications to the phones and tweet out some stats on @BearStoneHA. We also use the information to turn on the living room lights since most of the time when there is a storm approaching, it starts to get pretty dark in the house from the cloud coverage.
If you would like to see more of the details, check out the video below:
Stay Safe out there!