[Blueprint] Blitz-Lightning Tracker

:zap: Blitz-LightningTracker

A Home Assistant blueprint that sends rich notifications with maps when lightning strikes nearby. Designed specifically for the Blitzortung Lightning Detector integration.

:sparkles: Features

  • :cloud_with_lightning: Real-time lightning detection - Get notified when strikes occur within your specified distance
  • :round_pushpin: Interactive maps - Static map images in notifications with yellow lightning-themed pins
  • :iphone: Mobile notifications - Works with Home Assistant mobile app
  • :gear: Highly configurable - Customize distance, cooldown, and notification content
  • :world_map: Google Maps integration - Optional static map images (requires API key)

:clipboard: Prerequisites

Required:

  • Home Assistant with mobile app installed
  • Blitzortung Lightning Detector integration configured
  • The following Blitzortung sensors:
    • Distance sensor (e.g., sensor.home_lightning_distance)
  • The following Helper Sensors (see install instructions for a template):
    • Latest Lightning Entity ID sensor(e.g., latest_lightning_strike_entity_id)
    • Area sensor (e.g., sensor.latest_lightning_strike_area)
    • Last Strike Distance helper (e.g., input_number.lightning_last_distance)

Optional:

:rocket: Installation

Method 1: Direct Import (Easiest)

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

"Buy Me A Coffee"

  1. Add Required Sensors (choose your method):

    :file_folder: If you have a separate sensors.yaml file:

    • Download sensors.yaml
    • Copy the contents and add them to your existing sensors.yaml file
    • Download input_number.yaml
    • Copy the contents and add it to your existing input_number.yaml file

    :gear: If you use configuration.yaml with existing yaml sensors:

    • Download sensors.yaml
    • Copy the contents and add them under your existing sensor: section in configuration.yaml
    • Download input_number.yaml
    • Copy the contents and add them under your existing input_number: section in configuration.yaml

    :new: If you’ve never added YAML sensors before:

    • Download configuration.yaml
    • Copy the contents and add them to the end of your existing configuration.yaml
  2. Restart Home Assistant to load the new sensors

  3. Configure the blueprint with your Blitzortung sensors and mobile device

Method 2: Manual Installation

  1. Download lightning_tracker.yaml
  2. Copy to /config/blueprints/automation/lightning_notification.yaml
  3. Proceed to follow steps 2 - 4 above.

Method 3: Beta Installation

!! ONLY USE THE BETA IF YOU’VE ALSO UPDATED TO MY INTEGRATION !!

I'm aware this is a beta build and I've updated

Check the beta branch for installation instructions

:gear: Configuration

Required Settings:

  • Lightning Distance Sensor - Your Blitzortung distance sensor
  • Lightning Area Sensor - Sensor showing strike location name (Provided in sensors.yaml)
  • Mobile Device - Select from dropdown of mobile app devices
  • Maximum Distance - Distance in km to trigger notifications (default: 7.5km)

Optional Settings:

  • Google Maps API Key - For static map images
  • Include Map Image - Toggle map images on/off
  • Cooldown Period - Minutes between notifications (default: 1.5 min)

:wrench: Blitzortung Integration Setup

If you haven’t set up Blitzortung yet:

  1. In Home Assistant: Settings > Devices & Services > Add Integration
  2. Search for “Blitzortung Lightning Detector”
  3. Configure with your location coordinates
  4. Wait for sensors to populate with data

:hammer_and_wrench: Troubleshooting

REST Sensor Not Working?

  • Check that the coordinate sensors have valid data (not 0 or unknown)
  • Verify internet connection for OpenStreetMap Nominatim API calls
  • The area sensor updates every hour (scan_interval: 3600) to avoid API rate limits
  • Change the User-Agent in the REST sensor to your name/project

Missing Sensors Error?

  • Most common issue! Make sure you’ve created the additional sensors in configuration.yaml
  • Restart Home Assistant after adding sensors
  • Check Developer Tools > States to verify sensors exist and have data

Sensors Have Different Names?

  • Your Blitzortung sensors might have different names than the examples
  • Check Developer Tools > States for entities starting with sensor.blitzortung_
  • Update the template sensors to match your actual entity names

No Map Images?

  • Verify your Google Maps API key is correct
  • Ensure “Maps Static API” is enabled in Google Cloud Console
  • Check that Include Map Image is enabled in blueprint config

Wrong Device Selected?

  • The blueprint auto-generates the notification service from your device selection
  • Make sure your mobile device has the Home Assistant app installed and configured

Sensors Not Found?

  • Ensure Blitzortung integration is working and sensors have states
  • Check sensor names match the pattern: sensor.*_lightning_*

:handshake: Contributing

Found a bug or want to add features?

  1. Fork the repository
  2. Create a feature branch
  3. Submit a pull request

Made with love for the Home Assistant community

3 Likes

Great blueprint - thanks for that.

It seems like I’m having an issue getting the right notify_device selected in the config screen.

I got it working, but it currently needs the following workaround:

I can select my mobile from the dropdown list and it seems like it’s picking the correct alpha-numerical deviceID (945719fe86674c8d9b8dffde8c131e59), but when it runs the automation there’s an incorrect ‘translation’ back from the deviceID to the notify service.

I know this sounds confusing, so here’s the setup:

  • I pick ‘AB’s Pixel 9a’ from the dropdown list.

  • I can see the correct DeviceID in the notify_device input: 945719fe86674c8d9b8dffde8c131e59

  • I hit the ‘Run actions’ but don’t get a notification on the device - the trace shows:
    Error: Action notify.mobile_app_abs_pixel not found

  • This is not surprising per se because the correct action would be notify.mobile_app_ab_s_pixel with an _ between the ‘b’ and the ‘s’.

  • I can add the correct action notify.mobile_app_ab_s_pixel into the ‘Custom Notify Service’ field but I still need to have the info for a ‘dummmy device’ entered in the first ‘Mobile Device’ dropdown because, if I leave it empty when selecting ‘Custom Notify Service’ instead of ‘Single Device’, it causes an error:
    Message malformed: Missing input notify_device

So, I have to have two devices being notified instead of just the one I’d like to see the info on.

Took me a little while to figure out, but now I’m waiting for the next set of lighning strikes - shouldn’t be too far off, we’re in the middle of monsoon after all.

Again: Thanks for creating this!

Thanks for sharing! One problem, it seems the links for the yaml files aren’t working. They seem to present like hyperlinks, but do nothing when clicked. Maybe a quirk of the forum software?

1 Like

@darias I had the same trouble, but I was able to locate the github repository which has the files. GitHub - zacharyd3/Blitz-LightningTracker: Home Assistant Blueprint for Lightning Strike Notifications with Maps