I am using the Blitzortung integration:
And I was looking for a way to show the thunder on a map. So I found this:
Hello guys,
Iāve made custom integration sensor for the KIA e-Niro BEV, How can I create a custom device tracker with the GPS coordinates from the kia e-Niro sensor? I couldnāt find any examples online or in the forum. Iāve tried a dynamic zone but didnāt work either.
ā¦
platform: template
sensors:
kia_position_lat:
friendly_name: āPosition lattitudeā
value_template: ā{{ states.sensor.kia_sensors.attributes[āCanbusLastā][āpositionā][āLattitudeā] }}ā
unit_of_measurement: āā
platform:ā¦
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
tom_l
July 27, 2020, 3:01pm
2
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.
karesz
(Karesz)
January 18, 2023, 9:05am
7
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?
metbril
(Robert š³š±šŖšŗ)
March 24, 2023, 1:22pm
8
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
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?
fd8a
September 14, 2023, 2:43pm
10
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 ā¦
fd8a
September 15, 2023, 7:32am
12
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:
dproffer
(David Proffer)
September 16, 2023, 10:29pm
15
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!