Add feels like weather support
parent
7ace5bd00d
commit
a118f8f6fd
|
|
@ -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];
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue