Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Dynamic lat/lon #27

Open
Zendio opened this issue Jun 27, 2021 · 8 comments
Open

Feature Request: Dynamic lat/lon #27

Zendio opened this issue Jun 27, 2021 · 8 comments

Comments

@Zendio
Copy link

Zendio commented Jun 27, 2021

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?

@tomerddd
Copy link

tomerddd commented Jun 1, 2023

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!

@andrewjswan
Copy link
Contributor

andrewjswan commented Jul 10, 2023

+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.

@mgiako
Copy link

mgiako commented Jul 26, 2023

+1 for a specific person

@sajikur
Copy link

sajikur commented Jul 26, 2023

+1 great idea! Add

@dekereluitherel
Copy link

great idea!

@titof2375
Copy link

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

@Zendio
Copy link
Author

Zendio commented May 25, 2024

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 %}

@dbfhvsfvdg
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants