Ticket Created
over 4 years ago

WERETECH-10576, CA-95707

Toybox.Weather.CurrentConditions.observationLocationName returning null as string

Hi,

2 users have reported to me that the location showed in my watchface is null, in my code I make a null check so if the value of  Toybox.Weather.CurrentConditions.observationLocationName is null I finish  the function and nothing is printed, but they say that null is printed so it makes me think that observationLocationName is returning a 'null' as string, is it possible?

Thanks

  • It's the text itself that contains null Jim, I've even seen occasions where the observationLocationName contains both null and the country name, so it's definitely a bug, most likely somewhere in the transition from weather station to the connect iq api.

    If the weather station is not aware of the location name it will not be able to provide a textual location but it shouldn't return "null" as a string. If the location is unknown it should return a proper null 

  • If you check they API doc, anything in currentConsidtions can be null and you need to do null checks.  I've seen temperature be null, for example.  Also see this specific thread about location name:

    forums.garmin.com/.../garmin-weather-service-location-names