Closed G6EJD closed 6 years ago
Actually it ain't quite as simple. As we explain at https://docs.thingpulse.com/guides/espaper-plus-kit/#configuration-customization and at https://github.com/ThingPulse/espaper-weatherstation/blob/master/settings.h#L71 it's either or depending on where you live. Not sure what the best way to handle this is.
Well Iām sure US residents will know their State and use that then the rest of the workd will know their Country so it comes down to have a more descriptive prompt Maybe just āCountry/Stateā then it becomes more obvious. Iām surprised WU doesnāt accept US or USA for a Country code instead of a state. I need to try it out.
The API requires Country code and State Code. http://api.wunderground.com/api/key/conditions/q/USA/CA/San_Francisco.json
And if State is blank it return details of the location with no weather data.
So probably needs a new extra field
So probably needs a new extra field
No, take a look at the comments in the settings file I linked to above.
212 page += getFormField("wundergroundcity", "Wunderground City", "40", WUNDERGROUND_CITY, ""); 213 page += getFormField("wundergroundstate", "Wunderground State", "40", WUNDERGROUND_COUNTRY, "");
So why not make it:
212 page += getFormField("wundergroundcity", "Wunderground City", "40", WUNDERGROUND_CITY, ""); 213 page += getFormField("wundergroundstate", "Wunderground Country/State", "40", WUNDERGROUND_COUNTRY, "");
?
The challenge can be summarized in one question: how do you convey that US users should enter the station's state (code) and others should enter the country (code)?
The obvious answer is likely along the lines of what you proposed. However, if you only display "Wunderground Country/State" there are two important pieces missing:
So maybe "Wunderground Country Code or State Code (US)" would be clearer. Guess I need to run a few tests to see how that'll look.
That looks like a good solution to me. Iāve been using Wunderground for a while, but the first time I loaded the Wx Station software to try it out I was confused by the āStateā input request, that forced me to go back to the source code to see why that was being requested and then saw it was āCountryā. Most users outside of the US would be confused too is my opinion.
In configportal.h it uses the term 'State' when it should be 'Country'
213 page += getFormField("wundergroundstate", "Wunderground State", "40", WUNDERGROUND_COUNTRY, "");
Change to š 213 page += getFormField("wundergroundstate", "Wunderground Country", "40", WUNDERGROUND_COUNTRY, "");