liangleslie / nea_sg_weather

Home Assistant integration for NEA Weather forecasts
MIT License
27 stars 8 forks source link

Latitude and Longitude for 2hr area forecasts stored as strings rather than floats #28

Closed kelpielim closed 3 months ago

kelpielim commented 6 months ago

As per title of issue - this prevents us from using distance() or closest() functions in HA to compute distance from the forecasting station. By adding a float() to lines 157 and 158 of nea.py I was able to convert them into numerical values, which seems to be more useful for templating. However, not sure if this is the most efficient way to do this =)

the rainfall sensor does not have this issue - the latitude and longitude seems to be reflected correctly as floats.

for consideration