The source
is just an attribute of each geolocation entity, so it doesn’t matter how the integration is set up.
We’re you able to get it working? I’m using yaml mode as well and find it very hard to work out what needs to be enabled to get this component to work
tbh, I dont know? Ive seen nothing yet, so would think not, but not knowing for sure if there havent been measured lightnings, I could say 100%…
its a bit of awkward integration like this, not knowing if it is working as expected.
Maybe we’ll have to think about adding a simple sensor for the geolocation integrations that indicates when the last (successful) update was and how many entities are currently managed by this integration?
This window is just too short - 60 seconds. By default this integration now uses a 1 hour window.
Here is a config example:
configuration.yaml:
homeassistant:
...
unit_system: metric
wwlln:
latitude: 1.3
longitude: 103.8
window: 3600
radius: 500
Lovelace UI:
cards:
- entities: []
geo_location_sources:
- wwlln
title: Lightning Strikes
type: map
default_zoom: 6
aspect_ratio: '2'
Resulting map (right now - 31 July 2019, 21:25 GMT+8):
Sample entity detail
that would really be very nice indeed. Right now, we just have to have faith without any kind of proof the config is correct, and, even more importantly, working
Ah my bad, thought the number to represent minutes. Will take it out, so it defaults to an hour.
could we have multiple cards centering around different lat/longs? use case: my family travels a lot, so Id like to have (right now) have the earthquakes and fires around central Java, next to my home region in separate cards. How would we configure wwlln:
for that?
btw, same goes for eg luftdaten. No idea how we could create multiple cards for that, other than via the integration page.
btw, what does the entities: []
mean? never seen that before?
Mine’s still not working.
My config
wwlln:
latitude: 40.9
longitude: -74.1
window: 3600
radius: 200
There’s a storm right over my house, lots of strikes on wwlln’s map and still nothing on my lovelace map.
My map is setup like yours except I also have the USGS geo sevice active on the same map. (That has showed quakes correctly over the past week, just no lightning.) And my map is 16:9. I actually made the map using the UI, not yaml in the raw config.
I believe the map automatically tries to zoom in/out to show all entities that it is supposed to display. I am not aware of any option where you would for example define map coordinates. If there are no entities to show that map will center around your home.
You can either define specific entities to display on the map, e.g. device trackers, or you can define a geolocation source which then automatically finds relevant entities to display. entities: []
just means that there are no specific entities defined.
As earlier mentioned in this thread, the currently released version of this integration defines a “window” of only 10 minutes which means that it could miss events.
Some fixes have been made in the meantime, but they haven’t been part of any minor releases, and you would need to wait for 0.97.
Very sorry - I just realised that the change from 10 minutes to 1 hour has not been released and is only part of the development version. I expect that version 0.97 will contain all fixes.
Sorry… I missed that part. Thanks!
ok, thanks. So we set the parameters for the component/integration in the config, and on the map card we set the entities. which makes more than one map possible, albeit with the same parameters .
Which is in fact a bit a pity, because it would be good to be able to set window and radius per map. don’t need the same granularity on each entity after all.
How does that figure out what to show when a long/lat is set in the wwlln: config, and an entity in the map, and these are totally different locations?
of course! it is plain yaml…
just like I always use condition: []
in my automations eg. just never saw it being used in the configs, and mine just dont have the key entity:
where I don’t need these. Hope thats alright?
In the geolocation world, each integration only supports a single value as “source”. That is, you could set up two separate wwlln integrations with different lat/long values and different radius, but on the map you can only define the source, i.e. any geolocation entity with that source will show up. If the two general locations are very far apart from each other, the map will zoom out to show all entities at once.
Originally the source attribute was built for triggering an automation, and then you would use conditions to further filter entities. But the map does not support such conditions.
Maybe the map needs more configuration options? For your use-case I could imagine two options: Fix the zoom factor of a map, i.e. turn off auto-zoom to fit all entities. Or, change the geolocation source parameter to something that is configurable.
Not a solution, but a little trick that I use: In addition to the geolocation source you can add a zone to the map (e.g. your home zone) and you can define the default zoom, so that the map always shows that zone in the center and a certain radius (the zoom factor relates to distance) if no geolocation entities are active at a time.
yes! that is exactly what I am looking for, but I dont know how to do that.
Ive done something like that with the earthquakes like this:
- platform: usgs_earthquakes_feed
# url: https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.geojson
feed_type: 'past_day_all_earthquakes'
radius: 300
minimum_magnitude: 2.0
latitude: -7.redacted
longitude: 110.redacted
- platform: usgs_earthquakes_feed
feed_type: 'past_day_all_earthquakes'
radius: 500
minimum_magnitude: 3.0
to have the top one show a specific lat/lon while the bottom one simply centers around my HA instance.
can’t figure out how to do so with wwlln
: though …
having all on one map is no solution since the locations are at opposite sides of the world, and the map would be far to wide and needed zooming always…
Well, in the UI you can add as many wwlln integrations as you want, and each can define its own lat/long and radius.
The wwlln integration does not let you define multiple entries in a YAML configuration file.
The usgs_earthquakes_feed is (still) implemented as a platform and that’s why you can have multiple entries in YAML.
thanks, I see, and will try to setup accordingly.
1 more thing please: can we have the regular Map in the left side menu bar, not show all these geo_location entities? Id like to have these on dedicated maps/cards in some dedicated views, and keep the ‘main’ map tidy, eg only with my device_trackers and zones.
Ive just found out that especially the (enormous amount of) earth quakes keep HA from responding swiftly, and had to turn down the radius a lot… having them only show on a Quake card would be better…if possible.
I see what you mean. My understanding is that that map just shows any entity with longitude/latitude.
Not really a solution, but a workaround: You could remove the main map and only use custom Lovelace maps. That would give you more control over what appears where.
When i limited my longitude and latitude from many to only 2 decimals it started to work
I’m going to give that a try right now and will report back soon. (There is another storm in my radius right now.)
Edit: It DOES work if you set your lat/long to 2 decimal places! Lightning strikes started reporting on the map immediately.
Martin… you’re a genius!
Will try when I get back to my system… but how on earth did you figure this out? Is there any clue in the docs/source to limit decimals at all?
btw, how did you set it up? i have wwlln: in my config like this:
##########################################################################################
# Geolocation
##########################################################################################
wwlln:
radius: 1000
window: 3600
so no lat/lon at all, suppose it using the default for my config.
also have an integration setup, and that has the default units it showed automatically…
not sure I I need these both?
for the sake of experiment have now setup an integration using only 2 decimals, and a wide km range…
Still seeing nothing, (which might be correct, since it is very nice weather over here)
update
deleted the wwlln:
entry and rely solely on the integration, to which I added a heavily struck region (again with only 2 decimals), to be sure lightning would show… Unfortunately the map remains empty.
I deleted the wwlln integration that had my config.yaml lat/long… and only kept the integration that had the 2 decimals. And that seemed to work.
Do you have a radius or window set in your config? (I’m just wondering, because I do… and that part seems to be causing some troubles.)
Right now I have a set radius of 50 (miles), and a window of 3600 (seconds)… but I currently am showing lightning strikes on my map that are 200-300 miles away and from 3-4 hours ago. So something there seems to be broken too. I’m going to pull all the extra config attributes and reboot and see what happens. Keep you posted!
UPDATE: I only kept the lat/long with 2 decimals in my config, and removed the radius and window settings. While I seem to have gotten rid of the strikes from hours ago… I have a question on the radius. I thought the default radius was 25 units set in config… so I was expecting to see a radius of 25 miles. I’m currently showing strikes from a minute or so ago… that are 75 - 115 miles from my location.