Closed thejeffreystone closed 4 years ago
Had to clean this up a bit, but this is good now. Wrote a better system for integrating these sensor with MQTT. Running that on a Raspberry Pi I had laying around after a recent migration.
Since it is not critical I would rather it not suck resources from Home Assistant. Although I am going to see if I can turn that into an "official" "add-on" because I am really digging the local weather sensor for lightning for just $20 and to integrate cheap Acurite sensors.
Because the lightning sensor doesn't have a reliable binary indicator, I am using the strike count which is reliable. I just store the current count to a MQTT topic every 30 mins and then compare the current count to the "history" for my trigger. I think I may need to change this to a != condition instead of a > because the strike counter resets at 129 or so but we will see.
You can find the automation at https://github.com/thejeffreystone/home-assistant-configuration/blob/master/config/packages/weather.yaml#L346
And the sensors at https://github.com/thejeffreystone/home-assistant-configuration/blob/master/config/packages/weather.yaml#L54
I already leverage some 433mhz weather sensors outside. So I bought https://amzn.to/3aJo8Ry and will see if I can get it integrated.
I tried Blitzortung.org but i was getting some weird reports of strikes in the middle of a cloudless day when other times it was super accurate. If this hardware version works that is one less cloud dependency.