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

lightning-detector-card support #9

Closed
Norien opened this issue Jul 22, 2020 · 13 comments
Closed

lightning-detector-card support #9

Norien opened this issue Jul 22, 2020 · 13 comments

Comments

@Norien
Copy link

Norien commented Jul 22, 2020

I'm struggling to find a meaningful way to display this in my dashboard. I did come across this in hacs and it looks perfect. Is there any way to get this working together?

https://github.com/ironsheep/lovelace-lightning-detector-card

Thanks for all you do!!

@mrk-its
Copy link
Owner

mrk-its commented Aug 1, 2020

This widget looks great, but it is able to only show distance. Blitzortung provides lat/lon coordinates of lightning, it would be great to show it on map, like: https://map.blitzortung.org/#3.76/48.41/15.98
I already did some successful experiments with custom map widget (lovelace card), stay tuned!

@sgofferj
Copy link

sgofferj commented Aug 2, 2020

And there I was just about to open a feature request to display lightnings on the HA map... 😄
The now defunct WWLLN integration displayed the lightnings on the HA map which was kinda nice...
There is a canvas-gauge-card for HA with which one could make a relatively nice indicator for the azimuth. That's on my list.
@mrk-its Could we have a "detected" entity, which goes from "" to something like "detected" and back to "" whenever a strike within the interest zone was detected

@mrk-its
Copy link
Owner

mrk-its commented Aug 2, 2020

@sgofferj I'll check how WWLLN was integrated with HA map, thanks!
Regarding this "detected" entity - you can easily achieve such things with template sensor, like:

sensor:
  - platform: template
    sensors:
      is_storm_detected:
        value_template: '{{ states("sensor.blitzortung_lightning_distance") != "unknown" }}'```

@sgofferj
Copy link

sgofferj commented Aug 3, 2020

Successfully made a canvas-gauge-card for the strike direction:

Screenshot_20200804_005621

card_height: 220
entity: sensor.blitzortung_lightning_azimuth
font_size: 1em
gauge:
  borderInnerWidth: 0
  borderMiddleWidth: 0
  borderOuterWidth: 0
  borderShadowWidth: 0
  borders: false
  height: 220
  highlights: []
  majorTicks:
    - 'N'
    - E
    - S
    - W
    - ''
  maxValue: 360
  minValue: 0
  minorTicks: 2
  startAngle: 180
  strokeTicks: true
  ticksAngle: 360
  type: radial-gauge
  valueBox: false
  width: 220
shadow_height: 12%
type: 'custom:canvas-gauge-card'

@mrk-its That works of course. I was more thinking of an entity that triggers for every single lightning to make a sound or flash a light 😃 But that probably also can be done with some template trickery.

@stboch
Copy link

stboch commented Aug 3, 2020

@mrk-its https://github.com/home-assistant/core/tree/5bef1c223d57b8f28d824d0d3c9fd11617c14d91/homeassistant/components/wwlln Here is the link to the historical branch where wwlln was, the code your looking for is geo_location.py this will add the geo event into the map, it will also allow geolocation events to be triggered. I used to have this for an automation if lightning was detected within 20km it would trigger an alert to turn on sensitive devices.

@mrk-its
Copy link
Owner

mrk-its commented Aug 4, 2020

@stboch thanks, I've just pushed version with geo_location platform support (ported from wwlln) on dev branch (it would be great if you can test it).

@stboch
Copy link

stboch commented Aug 5, 2020

@mrk-its Tested it out, works great... just FYI might want to add a warning to idle timeout if set to 0 it might make the system very unstable over time.

@mrk-its
Copy link
Owner

mrk-its commented Aug 5, 2020

@stboch I've introduced separate configuration parameter to configure max number of latest geo_location events to keep in memory (defaults to 100). And there is a warning if set above 500. I'll test it a bit and I'm going to merge it soon to master.

@stboch
Copy link

stboch commented Aug 5, 2020

also noticed tick! is set to info level and not filtered by the distance. so kinda filling up the logs.

@mrk-its
Copy link
Owner

mrk-its commented Aug 5, 2020 via email

@andilge
Copy link

andilge commented Aug 11, 2020

Hi all,

I've just integrated blitzortung with compass card from HACS and it was easy as nothing.
compass card

The only drawback i see is that the azimuth sometimes brings back negative degree values
2020-08-11_16-47
which is messing up the calculation for the abbreviations.

Is it possible to only deliver values within 0 to 359.999?

Open issue on compass card is in
tomvanswam/compass-card#10

@mrk-its
Copy link
Owner

mrk-its commented Aug 13, 2020

@andilge I see it has been fixed on 'compass-card' side, great!

@mrk-its
Copy link
Owner

mrk-its commented Aug 13, 2020

Closing, as we have now some great method of visualizing this data.
@Norien if you still want support on lovelace-lightning-detector-card please fill issue on their side (it seems to be better place for that)

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

5 participants