
Use Blitzortung Lightning Alerts to Protect Your Home with Home Assistant
Summer thunderstorms can arrive quickly, especially in areas where weather conditions change fast. While most Home Assistant users connect Blitzortung lightning data to visual notifications or fun effects like flashing lights, the same data can also be used for practical protection automations.
In this setup, Home Assistant reacts automatically when lightning is detected nearby by:
- Closing smart blinds or shutters
- Turning off outdoor power outlets
- Protecting sensitive devices from surges
- Reducing the risk of water damage from sudden storms
This creates a simple but effective layer of automation-driven storm protection that works entirely locally once configured.
If you already use Blitzortung in Home Assistant for notifications or warning lights, this is a natural next step.
Why Use Lightning-Based Automations?
Lightning detection is one of the earliest indicators of an approaching thunderstorm. Unlike rain sensors or wind sensors that react after weather conditions change, lightning activity often appears several minutes before the storm reaches your home.
That extra time is perfect for preventive actions such as:
- Closing roof windows
- Retracting awnings
- Shutting blinds to protect interiors from sudden rain
- Disconnecting outdoor electronics
- Turning off garden lighting circuits
- Disabling power to robotic lawn mowers
Because Blitzortung data updates continuously, the automation can react much faster than manual intervention.
Components Used
The exact hardware depends on your smart home setup, but the overall concept remains the same.
1. Home Assistant
The core automation platform where all logic runs.
Home Assistant handles:
- Lightning sensor entities
- Distance calculations
- Automations
- Device control
2. Blitzortung Integration
The Blitzortung integration provides real-time lightning strike information from the global Blitzortung.org lightning detection network.
Typical entities include:
- Distance to closest strike
- Strike count
- Last detected lightning
- Lightning direction
Most users configure a radius between 10 km and 50 km depending on how early they want warnings.
3. Smart Blinds or Covers
Any blinds, shutters, or awnings supported by Home Assistant can be used.
Examples include:
- Zigbee blinds
- Z-Wave shutters
- Somfy covers
- Matter-compatible blinds
These usually appear as cover.* entities in Home Assistant.
4. Smart Outdoor Power Outlets
Outdoor outlets are especially vulnerable during thunderstorms.
Good candidates for automatic shutdown include:
- Garden lighting
- Pond pumps
- Patio heaters
- Outdoor speakers
- EV charging accessories
- Decorative lighting
Using smart switches allows Home Assistant to disconnect power automatically when lightning approaches.
Recommended Lightning Thresholds
The ideal distance depends on your environment and local weather patterns.
| Lightning Distance | Suggested Action |
|---|---|
| 30 km | Send warning notification |
| 20 km | Close blinds and shutters |
| 15 km | Turn off outdoor outlets |
| 10 km | Trigger aggressive storm mode |
In practice, 15–20 km works very well for protective automations because it provides enough reaction time without causing excessive false alarms.
Example Automation Scenario
In this example:
- Lightning is detected within 20 km
- Outdoor power outlets turn off
- Smart blinds close automatically
- A notification is sent to mobile devices
The automation only triggers if the lightning distance sensor reports a value below 20 km.
Example YAML Automation
alias: Storm Protection - Lightning Alert
description: >
Automatically closes blinds and disables outdoor power
when lightning is detected nearby.
trigger:
- platform: numeric_state
entity_id: sensor.blitzortung_lightning_distance
below: 20
condition: []
action:
- service: cover.close_cover
target:
entity_id:
- cover.living_room_blinds
- cover.kitchen_blinds
- cover.office_blinds
- service: switch.turn_off
target:
entity_id:
- switch.outdoor_power_left
- switch.outdoor_power_right
- switch.garden_lighting
- service: notify.mobile_app_pixel_9
data:
title: "Lightning Detected"
message: >
Lightning detected within 20 km.
Outdoor outlets disabled and blinds closed.
mode: single
Adding a Cooldown Timer
One challenge with weather automations is preventing repeated triggers during active storms.
A cooldown timer helps avoid constant notifications or repeated commands to covers and switches.
You can accomplish this using an input_boolean or by adding a condition based on the automation’s last triggered time.
Example condition:
condition:
- condition: template
value_template: >
{{ (now() - this.attributes.last_triggered).total_seconds() > 1800 }}
This limits the automation to once every 30 minutes.
Optional Enhancements
Once the basic automation works, there are many ways to extend it.
Automatically Restore Power After the Storm
You can create a second automation that restores outdoor outlets when no lightning has been detected for a certain period.
Example logic:
- No strikes within 20 km for 60 minutes
- Restore outdoor switches
- Reopen blinds if desired
Create a Dedicated Storm Mode
Some users prefer a complete storm protection mode.
This could include:
- Pausing robotic lawn mowers
- Disabling irrigation systems
- Closing skylights
- Turning on indoor ambient lighting
- Increasing UPS monitoring
- Sending spoken announcements through smart speakers
A Home Assistant helper like input_boolean.storm_mode works very well for this approach.
Combine with Rain and Wind Sensors
Lightning detection becomes even more powerful when combined with additional weather sensors.
For example:
| Sensor | Purpose |
|---|---|
| Rain sensor | Detect incoming precipitation |
| Wind sensor | Protect awnings and blinds |
| Lightning distance | Early storm warning |
| Weather forecast | Predict severe weather |
This creates a much smarter weather automation system.
Reliability Considerations
Lightning detection is not perfect. Blitzortung relies on a distributed network of volunteer receivers, so detection accuracy varies slightly depending on region.
Still, it performs extremely well for home automation purposes.
A few practical recommendations:
- Avoid extremely small trigger distances
- Use cooldown timers
- Test automations during real storms
- Make sure covers can safely close automatically
- Avoid disconnecting critical equipment unintentionally
You should also ensure outdoor smart outlets are rated for outdoor use and installed according to local electrical regulations.
Energy and Safety Benefits
Although the primary goal is protection, these automations can also reduce unnecessary energy usage.
For example:
- Patio heaters consuming 2–3 kWh can automatically shut down before storms
- Decorative outdoor lighting can be disabled automatically
- EV charging accessories can be disconnected during unstable weather
Closing blinds during severe summer weather may also help reduce indoor heat gain, especially in rooms exposed to direct sunlight.
Using automation in this way improves both convenience and resilience.
Final Thoughts
Blitzortung integrations are often used for fun visual effects or notifications, but they are also extremely useful for practical home protection.
By combining lightning detection with smart blinds and outdoor switches, Home Assistant can respond to storms automatically long before you even hear thunder.
The result is a smarter and safer home that reacts instantly to changing weather conditions.
And because everything runs inside Home Assistant, the entire system remains highly customizable and privacy-friendly.
Some of the links in this article are "affiliate links", a link with a special tracking code. This means if you click on an affiliate link and purchase the item, we will receive an affiliate commission. The price of the item is the same whether it is an affiliate link or not. Regardless, we only recommend products or services we believe will add value to our readers. By using the affiliate links, you are helping support our Website, and we genuinely appreciate your support.