homeassistant-blitzortung icon indicating copy to clipboard operation
homeassistant-blitzortung copied to clipboard

Feature Request: Dynamic lat/lon

Open Zendio opened this issue 3 years ago • 8 comments

Hey there!

I love this integration, it's really great. I was wondering if you're taking requests. Instead of a fixed lat/lon, I'd like it dynamic so that I always know how far lightning is from me based on my phone.

Right now I'm using this template sensor: {{ distance(states.device_tracker.eric_s_iphone, (closest(states.device_tracker.eric_s_iphone, states.geo_location)))|round(2) }}

It works well but when there's lots of lightning, my Raspberry Pi4 struggles.

Would this be possible and worth your time?

Zendio avatar Jun 27 '21 16:06 Zendio

Heya! +1 on this request, but could do with just following the home location. We're using HA on a boat which changes location. Lightning detection and alerting is critical on a boat - we're prone to hits and those could disable us for months or repairs. When lightnings are close by we shut off many systems (power inverters, chargers, sensitive electronics). This could allow us to do this automatically to some degree (we'll still have some physical connections to disconnect).

We dynamically change the home location using service: homeassistant.set_location Would be great if Blitzortung would change its location accordingly.

Thank you for your great work!

tomerddd avatar Jun 01 '23 14:06 tomerddd

+1 Add the ability to specify Person rather than coordinates as the center point. This way it will be possible to inform Person about lightning if she is on vacation, business trip or just out of home.

andrewjswan avatar Jul 10 '23 14:07 andrewjswan

+1 for a specific person

mgiako avatar Jul 26 '23 13:07 mgiako

+1 great idea! Add

sajikur avatar Jul 26 '23 13:07 sajikur

great idea!

dekereluitherel avatar Mar 28 '24 20:03 dekereluitherel

Hello Zendio, how did you make it work with the location of your phone and the storms?

titof2375 avatar May 22 '24 15:05 titof2375

Hello Zendio, how did you make it work with the location of your phone and the storms?

By creating a template sensor, using the code: {% set phone = states.device_tracker.YOUR_PHONE %} {% set geo_location = states.geo_location is not none %} {% set closest_location = closest(phone, states.geo_location) if geo_location else None %} {% if closest_location %} {{ distance(phone, closest_location)|round(2) }} {% else %} No lightning data available. {% endif %}

Zendio avatar May 25 '24 17:05 Zendio

This would be great. Please do your best to add this.

dbfhvsfvdg avatar May 30 '24 16:05 dbfhvsfvdg