Awesome!

Yeah, I was just merging your changes into my local code when I ran into 
the geocode issue in the location. To keep compatibility with the previous 
version, I think the geocode= part should be in the line that assembles the 
url, not in the location variable itself. 
ie change:
u = '%s%s&format=json&units=e&language=en-US&apiKey=%s' % (url, location, 
api_key) \
to
u = '%sgeocode=%s&format=json&units=e&language=en-US&apiKey=%s' % (url, 
location, api_key) \

That way no one needs to change their configuration to use the new code.


On Sunday, June 23, 2019 at 11:33:01 AM UTC-5, St. B. wrote:
>
> I forgot to mention that : 
>   - I reused the key and location preference keys.
>
> The location key should be like : 
>    location = "geocode=45.7,5.9"
>
> Or something alike to indicate the location of requested forecasts. The 
> new WU API support other formats, but I did not bother looking into these.
>
>
> On Sunday, June 23, 2019 at 5:26:52 PM UTC+2, St. B. wrote:
>>
>> Ok, 
>>
>> There you go :) 
>>
>> There might be some other WU forecast information that can be used, I 
>> tried to get what I saw relevant in my use and the and also the sample 
>> forecast webpages.
>>
>> With SVN you'll easily see what I changed and what I added :)
>>
>>
>> Hope it helps.
>>
>> Regards,
>>
>>
>> On Sunday, June 23, 2019 at 4:25:51 PM UTC+2, mwall wrote:
>>>
>>> On Sunday, June 23, 2019 at 10:19:23 AM UTC-4, St. B. wrote:
>>>>
>>>> I can email the update forecast.py file if you want, until Matthew 
>>>> shows up with the appropriate code.
>>>>
>>>
>>> do you mind posting it in this thread?  then i can merge it into the 
>>> forecast codebase and get a new release out.
>>>
>>> many of the older extensions i wrote (including weewx-forecast) are 
>>> living in a subversion repository.  these will be moved over to gitlab 
>>> repositories sometime in the next month or two.
>>>
>>> m
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-development/17c3d588-fa5a-452b-9a63-0987ff5efd8f%40googlegroups.com.

Reply via email to