1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-01 14:32:54 +01:00

Bangle.js: Add more weather data sent to watch

Specifically UV Index, the day max and min temp, probability of rain.
Inspired by PR #3095

Bangle.js:Send UV Index with one decimal point
This commit is contained in:
Ganblejs 2023-06-05 22:55:20 +02:00
parent 1730064f11
commit 20de001e49

View File

@ -1316,7 +1316,11 @@ public class BangleJSDeviceSupport extends AbstractBTLEDeviceSupport {
JSONObject o = new JSONObject(); JSONObject o = new JSONObject();
o.put("t", "weather"); o.put("t", "weather");
o.put("temp", weatherSpec.currentTemp); o.put("temp", weatherSpec.currentTemp);
o.put("hi", weatherSpec.todayMaxTemp);
o.put("lo", weatherSpec.todayMinTemp );
o.put("hum", weatherSpec.currentHumidity); o.put("hum", weatherSpec.currentHumidity);
o.put("rain", weatherSpec.precipProbability);
o.put("uv", Math.round(weatherSpec.uvIndex*10)/10);
o.put("code", weatherSpec.currentConditionCode); o.put("code", weatherSpec.currentConditionCode);
o.put("txt", weatherSpec.currentCondition); o.put("txt", weatherSpec.currentCondition);
o.put("wind", weatherSpec.windSpeed); o.put("wind", weatherSpec.windSpeed);