Help fixing incorrect distance please

I have an Ecowitt Lightning Detector on Hubitat using a community integration. In both the Ecowitt app (and account) as well as Hubitat, I have distance set to use imperial measurements (feet, miles, etc…) When I set this up on my dashboard, it pulled it in KM (this shows the approximate distance of the last lightning strike). I don’t know for sure this is a Sharptools thing, but it’s the only place I have seen it. It is in feet in the Native dashboard and previously another dashboard. In the tile below, the distance is in the lower left corner. The tile is a supertile.

Update,here is the tile from hubivue, showing miles

Can you share a screenshot of the events and states for that device from the Hubitat device UI?

The unit information comes from the data reported by the Hubitat device. If you want to share a link to the community driver, I’d be happy to take a look.

I replied over in the related thread in Hubitat with a tweak that could be made to the driver to fix things. It looks like the value/units for the lightning distance is being reported wrong in the driver.

Ah, cool. I was at work earlier, so I couldn’t check my settings from there. The guy the wrote the drivers is Australian so it may be he didn’t think about imperial.

For reference, here is the tile for the same device from my previous dashboard

TLDR: SharpTools is correctly displaying what the driver is reporting. And the driver has a bug where it’s not converting the lightning distance from km to mi per your configured preferences.

It looks like the other dashboard was referencing the same numeric value from the driver, but attaching the “wrong” units to it.

In other words, the 14 is actually in km, but the other dashboard was displaying the units in (Mi) rather than the actual units attached to the event (km). I have no idea where they were getting those units though as the device is clearly reporting the value and units in km.

Per the Hubitat thread, I assumed the first screenshot you posted was from the source app and it shows the displayed value as 9 Mi. And the bug with the Hubitat driver is that it receives the value from the source as kilometers and has to convert it to miles (which it was failing to do).

So if you take what I expect is the actual value of 9 Miles and convert that to Kilometers, you get the raw ~14 km which is what the device driver is reporting.

Either of the fixes suggesting in the related Hubitat Device Driver thread should work, so let’s see what the device author comes back with. :slight_smile:

1 Like

Thank you for bird-dogging that! I never would have expected that! I just went ahead and posted it there to cover my bases. 9 miles would be correct, I ignore those at 9 miles, as that is how far we are from Fort Worth Alliance airport with heavy FedEx and Amazon traffic, which triggers a false report.

I never would have guessed the other app was getting it wrong. It’s almost morning down under, we’ll see what the developer does with it. He’s usually pretty good about things like this.

1 Like

Just an update, they did get this fixed this morning. Not that it is critical, but if I hadn’t switched over to Sharptools, I don’t think I ever would have noticed that bug!

1 Like