Merge pull request #3911 from RKBoss6/iosWeatherUpdates

[iOS] Add feels-like value parsing for weather app support
master
Gordon Williams 2025-07-01 14:07:50 +01:00 committed by GitHub
commit 853e395083
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 5 deletions

View File

@ -18,3 +18,4 @@
0.17: Default to passing full UTF8 strings into messages app (which can now process them with an international font) 0.17: Default to passing full UTF8 strings into messages app (which can now process them with an international font)
0.18: Fix UTF8 conversion (check for `font` library, not `fonts`) 0.18: Fix UTF8 conversion (check for `font` library, not `fonts`)
0.19: Convert numeric weather values to int from BangleDumpWeather shortcut 0.19: Convert numeric weather values to int from BangleDumpWeather shortcut
0.20: Add feels-like temperature data field to weather parsing from BangleDumpWeather shortcut.

View File

@ -180,6 +180,7 @@ E.on('notify',msg=>{
let weatherEvent = { let weatherEvent = {
t: "weather", t: "weather",
temp: d.temp, temp: d.temp,
feels: d.feels,
hi: d.hi, hi: d.hi,
lo: d.lo, lo: d.lo,
hum: d.hum, hum: d.hum,
@ -192,7 +193,7 @@ E.on('notify',msg=>{
loc: d.loc loc: d.loc
} }
// Convert string fields to numbers for iOS weather shortcut // Convert string fields to numbers for iOS weather shortcut
const numFields = ['code', 'wdir', 'temp', 'hi', 'lo', 'hum', 'wind', 'uv', 'rain']; const numFields = ['code', 'wdir', 'temp','feels', 'hi', 'lo', 'hum', 'wind', 'uv', 'rain'];
numFields.forEach(field => { numFields.forEach(field => {
if (weatherEvent[field] != null) weatherEvent[field] = +weatherEvent[field]; if (weatherEvent[field] != null) weatherEvent[field] = +weatherEvent[field];
}); });

View File

@ -1,8 +1,8 @@
{ {
"id": "ios", "id": "ios",
"name": "iOS Integration", "name": "iOS Integration",
"version": "0.19", "version": "0.20",
"description": "Display notifications/music/etc from iOS devices", "description": "Display/pull notifications, music, weather, and agenda from iOS devices",
"icon": "app.png", "icon": "app.png",
"tags": "tool,system,ios,apple,messages,notifications", "tags": "tool,system,ios,apple,messages,notifications",
"dependencies": {"messages":"module"}, "dependencies": {"messages":"module"},