One of my favourite things about my Home Assistant lightning alerts is that they don’t require any additional hardware. You don’t need a dedicated lightning detector, weather station or any other physical sensor. If you’re already running Home Assistant, you can set this up for free!
I use the Blitzortung integration to detect nearby lightning strikes and have two automations configured to notify me through Alexa and the Home Assistant app on my iPhone.
I’ve published both automations as reusable Home Assistant blueprints on GitHub, so you can easily set them up yourself and choose how you’d like to receive notifications.
How Home Assistant Lightning Alerts Work
The Blitzortung integration uses data from a network of lightning detection stations to provide information about nearby lightning strikes.
The integration provides three sensors that we’ll use:
- Distance: The distance of the latest lightning strike in kilometers.
- Azimuth: The direction of the lightning strike in degrees.
- Counter: The number of detected lightning strikes within the configured detection radius.
In my setup, I’ve configured a detection radius of 20 km and a time window of 120 minutes.
Since hundreds of lightning strikes can occur during a single thunderstorm, I don’t particularly want a notification for every single one. In fact, my integration recorded 293 strikes within 20 km of my home during a single hour in August!
As such, I’ve split my lightning notifications into two separate automations.
| Lightning distance | Notification behaviour |
|---|---|
| Between 1 and 15 km | Initial notification, followed by a two-hour cooldown |
| Less than 1 km | Up to three notifications per hour-long window |
| Greater than 15 km | No notification |
Both automations allow you to customize these thresholds.
Setting Up Home Assistant Lightning Alerts
You’ll need Home Assistant 2024.10 or newer and the Blitzortung custom integration installed and configured before proceeding. Make sure the integration reports distances in kilometers and its detection radius is at least as large as your desired notification radius.
If you’re new to Home Assistant, I’ve also written a guide on installing Home Assistant on Proxmox.
1. Import the Automation Blueprints
I’ve made both blueprints available in the TechOpt.io GitHub repository:
- Lightning distance band — Import into Home Assistant
- Lightning close strikes — Import into Home Assistant
Simply click the import links above and follow the prompts to add each blueprint to your Home Assistant instance.
Alternatively, you can manually import them by navigating to Settings > Automations & Scenes > Blueprints > Import Blueprint and pasting the corresponding GitHub file URLs.
2. Create Helpers for the Close Lightning Automation
The second automation requires two helpers to keep track of how many notifications it has sent and when the notification window started.
Navigate to Settings > Devices & Services > Helpers > Create Helper.
Create a Number helper with the following settings:
| Setting | Value |
|---|---|
| Name | Lightning under 1km count |
| Minimum | 0 |
| Maximum | 3 |
| Step size | 1 |
| Display mode | Input field |
Next, create a Date and/or Time helper named Lightning under 1km window start. Make sure it includes both a date and a time.

3. Configure the Lightning Distance Band Automation
Navigate back to your blueprints and select Lightning distance band to create an automation.
Select the distance and azimuth sensors provided by the Blitzortung integration.
I’m using the following settings, which are also the blueprint defaults:
- Inner edge: 1 km
- Outer edge: 15 km
- Cooldown: 2 hours
The automation sends a notification when the reported distance first enters this range from farther away or from an unknown state. It then ignores subsequent triggers for two hours.

4. Configure the Close Lightning Strikes Automation
Create another automation using the Lightning close strikes blueprint.
Select the Blitzortung distance, azimuth and strike counter sensors, as well as the two helpers we created earlier.
I’m using the following settings:
- Close radius: 1 km
- Alerts per window: 3
- Window: 60 minutes
The first close lightning strike starts a 60-minute window. After three notifications, the automation stops notifying me until that window expires.
If you change the distance thresholds, make sure the close radius matches the inner edge of the first automation. Additionally, if you increase the notification limit, increase the maximum value of your Number helper accordingly.

5. Configure Your Lightning Notifications
Both blueprints automatically generate a notification title and message, which you can reference in your notification actions using the following templates:
Title: {{ title }}
Message: {{ message }}
For example, a notification might look like this:
Lightning nearby
Lightning strike 900 meters southwest of home.
Under the Notification section of each automation, add whichever notification actions you’d like to use. You could send a mobile notification, create a persistent notification in Home Assistant, or even send an email.
Once you’ve configured your notification actions, save both automations and ensure they’re enabled.
How I Receive Lightning Notifications in My Smart Home
Similarly to my low battery notifications in Home Assistant, I use multiple notification methods for my lightning alerts.
I’ve configured both automations to call my centralized notification script, which handles how and where notifications get delivered.
In this case, I classify the notifications as urgent, meaning:
- I receive a time-sensitive push notification through the Home Assistant app on my iPhone.
- If I’m home, Alexa announces the distance and direction of the lightning strike throughout my home.
- During bedtime, only my iPhone receives the notification.
Of course, you don’t need to replicate my notification script. You can configure the notification actions directly within each automation.
Remarks
- Restarting Home Assistant clears the two-hour cooldown of the distance band automation.
- Internet connectivity and the availability of lightning detection data are required. These notifications shouldn’t replace official severe weather alerts.
The flexibility of these Home Assistant lightning alerts is what makes them particularly useful to me. They require no additional hardware, can use whichever notification methods you already have configured, and won’t bombard you with notifications throughout an entire thunderstorm!








Leave a Reply