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!