Blitzortung, showing thunder on map

I am using the Blitzortung integration:

And I was looking for a way to show the thunder on a map. So I found this:

This information combined I have an automation:

- alias: 'Onweer Gps'
  trigger:
    platform: state
    entity_id: sensor.onweer_lightning_distance
  action:
    service: device_tracker.see
    data_template:
      dev_id: onweer_map
      gps:
        - "{{ state_attr('sensor.onweer_lightning_distance','lat') }}"
        - "{{ state_attr('sensor.onweer_lightning_distance','lon') }}"

Onweer is Dutch for thunder… And I use this Lovelace card:

- type: map
  entities:
    - device_tracker.onweer_map
  default_zoom: 6

And there you have it. Probably someone out there has a nicer solution. If so, please let me know.

2 Likes

Neat. You should format your code or it’s not much use though.

I just use their maps in iFrame cards;

Formatting was a good idea. Your weather maps as well. I’m working on it right now. Thanks.

1 Like

Thanks for this, I have done it too. I’ve also added a proximity entity to see the direction of travel (towards or away from home)

If only it would result in more but having a pretty static map … while the automation shows that it was triggered.

Has this been updated? trying to figure how to add a useful card.

Hi! thank you for this code!
This solution shows me only the last strike and i wanna see the last 24 or 12 or anything else hours on the map. Do you have any idea?

For those still interested. By default, all Blitzortung strikes are shown on the large map view in Home Assistant. But you could also create a map card in one of your custom views.

Configure your card like this:

type: map
entities:
  - entity: zone.home
geo_location_sources:
  - blitzortung
dark_mode: false
default_zoom: 9
aspect_ratio: '1:1'
auto_fit: true

The default zoom works for me, since I configured the integration with a 30km range.
If you don’t see any strikes, check the ā€˜source’ by looking at the attributes of one of the sensor.geo_ entities.

1 Like

aware this is an older post, but you seem to be the only one doing what I was looking for :wink:

Ive been playing with those interactive cards, but havent found a way to make them zoom in on my region correctly. could you please show how you did that?

this would be my preferred region: Blitzortung.org - Live Lightning Map to get in an iframe, so I tried:

      - type: custom:hui-element
        card_type: iframe
        aspect_ratio: 100%
        url: 'https://map.blitzortung.org/#6.45/51.948/5.98'

however, the iframe zooms in much deeper than I would have hoped.

even more frustrating, is it keeps asking me for cookies…

can we prevent that somehow?

This is the link I use in an iframe that disables the cookie warning and some other UI elements.
https://map.blitzortung.org/index.php?interactive=0&NavigationControl=0&FullScreenControl=0&Cookies=0&InfoDiv=0&MenuButtonDiv=1&ScaleControl=1&LinksCheckboxChecked=1&LinksRangeValue=10&MapStyle=0&MapStyleRangeValue=0&Advertisment=0/#6.45/46/15
The 6.45 number at the end of the link is the zoom level.

1 Like

that would be awesome, but that exact line still shows me

what is the rest of your card config? I have it in a fold-entity-row, but imagine that wouldn’t cause the cookie warning to trickle trough …

This is the whole card code:

type: iframe
url: >-
  https://map.blitzortung.org/index.php?interactive=0&NavigationControl=0&FullScreenControl=0&Cookies=0&InfoDiv=0&MenuButtonDiv=1&ScaleControl=1&LinksCheckboxChecked=1&LinksRangeValue=10&MapStyle=0&MapStyleRangeValue=0&Advertisment=0/#6.5/46/15
aspect_ratio: 100%
title: BLITZORTUNG

As I understand it, the Cookies=0 should disable the cookie warning.

Did you figure out why the map has a dark overlay?

Thanks, this thread popping up on the front page made me aware of this beautiful option to add Blitzortung to HA.

haha heck no it does not work; check this card editor with your 100% code:

I struggled with getting rid of the cookie dialog in iframe as well and was never successful, so went a route that uses external web scrape to accept the cookies and then capture an image of the map. Kind of hillbilly tech, however it has been working without issues for months. Perhaps this code will give you some ideas. Good hunting!

Hey everyone,

I recently published version 1.3.1 of my custom Lovelace card for visualizing Blitzortung lightning data in Home Assistant. I wanted to share it here because it now includes built‑in support for mapping lightning strikes, which fits nicely with this thread’s focus :rocket:


:zap: What it does

This Lovelace card combines key lightning data from the Blitzortung integration into one clear dashboard. It supports:

  • Strike count
  • Distance to the nearest strike
  • Direction via real‑time compass
  • A fading radar chart of recent strike directions
  • A history chart of strike activity over time
  • An optional interactive map view displaying recent strikes relative to your zone.home (requires geo_location.lightning_strike_* entities)

Map View Features

  • Toggleable via show_map: true
  • Plots strikes over the same timeframe as the radar chart
  • Auto‑zoom initially to include all strikes; supports manual pan/zoom with a recenter button
  • Animated markers indicate new strikes
  • Respects your card theme with map_theme_mode (light/dark/auto)

Installation (via HACS)

  1. Open HACS → Frontend → Explore & Add Repositories
  2. Search for ā€œBlitzortung Lightning Cardā€ and install it
  3. Add the card to your Lovelace dashboard using the visual editor
  4. Enable geo_location entities in the Blitzortung integration options for map support

Example YAML Configuration

type: custom:blitzortung-lightning-card
title: ⚔ Lightning Nearby
distance: sensor.blitzortung_lightning_distance
counter: sensor.blitzortung_lightning_counter
azimuth: sensor.blitzortung_lightning_azimuth
radar_max_distance: 100
radar_period: 30m
show_map: true
map_theme_mode: auto
show_history_chart: true
history_chart_period: 1h

Why it matters in this thread

This thread is all about displaying lightning on a map — the map view is now a built‑in feature of this card, making it easy to see recent strikes at a glance, track their locations, and interact with them directly in your dashboard.

Always happy to hear feedback or feature ideas — let me know how it works with your setup!

Happy automating :zap:

3 Likes

I really like this card however it shows the distance in ā€œkmā€ is there any way to have it display in miles?

Went down the rabbit hole the last two days, found it this Blue print on the Reddit, it sends a notification to the HA mobile App with a Map of lightning strikes. created by @zacharyd3

I use this with the Lovelace card from @timmaurice

1 Like

sweet!

can you explain the top 2 ā€˜radar’ like images?
Asking because I just use an auto-entities to show the strikes on the map if nearer than 25 km, so I wouldn’t need your CCard for that.
The 2 radar images seem rather cool though, Id love to check what you did there

You referring to these images?

They do reset after a couple of hours, to only show the 3 entities acting like a auto-entity card almost