Hi, I need help with the map card (yes I read the doc but it’s succinct)
The following code will display a card centered on my home when there are no lightning strikes and center on the lightning strikes when there are some. How can I force my home as the center?
Somehow, I had missed fit_zones, which is a step forward.
It’s still not exactly what I wanted because it will always fit my home and all lightning strikes (i.e. ignore zoom-levels higher than 7 in my current example). What I’d really want is to see my home and a radius of 50 km, even if there are lightning strikes 80 km away.
There is a focus variable that does exactly what I want but it applies to entities, not geo_location_sources as far as I understand:
I think this is a good idea and I’ve written a PR to add a focus option for geo_location_sources. You can follow the pull for status updates on when it might be available.
And to be clear, there is no other way to achieve this? It would be nice to be able to define the latitude and longitude (if you want to center the map on an area for which no zone is defined)
If you are not interested in the lightning more than 50km away, then you can filter the blitzortung geo zones to the ones you want. It has a default radius of 100km, but it can be set to 50 from the configuration.
I kinda explained why that doesn’t work in my second post: I’ve got two locations (with two Blitzortung services) and there might be thunder at both. In that case, the cards is zoomed out.
Plus you might want to show the LS nearby but still track them 100 km away (and pan the map).
I would say - the “focus” option is more needed for a ZONE entity.
For instance, a user may want to show a zone in a center.
And there is my issue on GitHub about this functionality - and it seems to be ignored.