Introduce the concept of primary and secondary weathers:
* Primary weather keeps the same behavior as previously across all weather providers, so it's non-breaking. This location is not necessarily the current location, just the primary weather location set by the user.
* The GenericWeatherReceiver now has a new extra WeatherSecondaryJson, that receives a json list with secondary weather locations.
It's guaranteed that the primary weather always exists, so the list of WeatherSpecs provided to devices is never empty. Update all support classes accordingly.
Updates WeatherSpec to v3 to add fields for UV index and precipitation probability
Co-authored-by: Enrico Brambilla <enricobilla@noreply.codeberg.org>
Co-committed-by: Enrico Brambilla <enricobilla@noreply.codeberg.org>
fixup! huamni: send windspeed in beaufort
BipS: send windspeed as km/h
huami: Always send sunrise and sunset
There is no need to look at send_sunrise_sunset, this is peble spesific
because it could be annoying on that platform (an extra line in the
timeline). On huami devices, the watchface desides what to show.
Signed-off-by: Robbert Gurdeep Singh <git@beardhatcode.be>
Mi5: set supportsSunriseSunsetWindHumidity to true
Signed-off-by: Robbert Gurdeep Singh <git@beardhatcode.be>
huamni: send windspeed in beaufort
Signed-off-by: Robbert Gurdeep Singh <git@beardhatcode.be>
Co-authored-by: Robbert Gurdeep Singh <git@beardhatcode.be>
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/2247
Co-Authored-By: beardhatcode <beardhatcode@noreply.codeberg.org>
Co-Committed-By: beardhatcode <beardhatcode@noreply.codeberg.org>
Wind information are stored and put in the reconstructed OWM response.
A long standing bug (having the "name" field inside "main" instead of at
the root level of the json) has been fixed
Lineage OS receiver and if possible weather notification app receiver will
be added in further commits.
See #482
No longer save an instance of ParcelableWeather2, rely on our WeatherSpec instead which now has all forecast data and save reconstructed owm weather json in Weather