ironsheep / lovelace-lightning-detector-card

A Lightning Detection Display Card for Home Assistant Lovelace
MIT License
21 stars 2 forks source link

Support for smartweather sensors #5

Open niemyjski opened 3 years ago

niemyjski commented 3 years ago

Is your feature request related to a problem? Please describe. I use the https://github.com/briis/smartweatherudp component and I'd love for it to support the sensor.smartweather_lightning_count sensor.

Describe the solution you'd like A clear and concise description of what you want to happen. Detect the sensor type and read the proper attributes.

attribution: Weather data powered by a SmartWeather Weather Station
last_update: '2020-07-23 22:45:12'
station_location: Station Name
station_position: 'Lat: 45.00000, Lon: -88.0000'
last_detected: '2020-07-21 19:59:10'
lightning_last_3hr: 0
lightning_distance: 24.2 mi
friendly_name: Lightning Count
icon: 'mdi:weather-lightning'
ironsheep commented 3 years ago

Currently, the ring detail is gathered outside of Home Assistant by the daemon sending the sensor data via MQTT (https://github.com/ironsheep/lightning-detector-MQTT2HA-Daemon). It might be easier to create a copy of this same script which listens to the SmartWeather Weather Station data, creates the ring data and then forwards it to HA via MQTT... then this card could be attached... This make sense? It would mean replacing the front end of the script (talking i2c with AS3935) with a smartweather listener. What do you think?

niemyjski commented 3 years ago

It would be better to add support to the card than having to create an additional component / integration to create the rings. However maybe we could create a template sensor for this? Would you mind posting the exact model you are looking for Thanks -Blake Niemyjski

On Fri, Jul 24, 2020 at 9:39 PM Stephen Moraco notifications@github.com wrote:

Currently, the ring detail is gathered outside of Home Assistant by the daemon sending the sensor data via MQTT ( https://github.com/ironsheep/lightning-detector-MQTT2HA-Daemon). It might be easier to create a copy of this same script which listens to the SmartWeather Weather Station data, creates the ring data and then forwards it to HA via MQTT... then this card could be attached... This make sense? It would mean replacing the front end of the script (talking i2c with AS3935) with a smartweather listener. What do you think?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ironsheep/lovelace-lightning-detector-card/issues/5#issuecomment-663797095, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHZFI3JTUK2FSZS2GV4MHDR5JAWTANCNFSM4PGK4LMA .

ironsheep commented 3 years ago

I'm working on a theory of operation document for the sensor script. That should provide everything you need. I'll post here when the new document is posted to the repo. Then I could use your help to review it and ask questions about anything I left unclear. Sound ok?

ironsheep commented 3 years ago

re model i'm looking for: Here's the latest document in the repo - a theory of operation which shows the payloads and accumulation logic/reasoning behind them. See https://github.com/ironsheep/lightning-detector-MQTT2HA-Daemon/blob/master/THEOPS.md

niemyjski commented 3 years ago

Sounds great thank you

Sent from my iPhone

On Aug 1, 2020, at 12:53 AM, Stephen Moraco notifications@github.com wrote:

 I'm working on a theory of operation document for the sensor script. That should provide everything you need. I'll post here when the new document is posted to the repo. Then I could use your help to review it and ask questions about anything I left unclear. Sound ok?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

tekmaven commented 3 years ago

Thank you for posting this document @ironsheep!! Really a great explanation of your logic so we can port it to SmartWeather sensors!

ironsheep commented 3 years ago

Glad it can help. Please let me know as you get this working... I'd love to hear.

beccsjb commented 5 months ago

Great work on your card, it looks great!

Did anyone have any luck adapting this card to use 'generic' sensors? ie Just feed the card with entities for distance and strike count?

raccettura commented 1 month ago

Any reason to not support just passing entities? Be it mqtt based or other sensors (like rtl433)? Seems like that would add support for nearly infinite number of sensors without feeding out to mqtt only to be read right back in. I've got distance/count on my sensor, just not integrated via mqtt.