forked from vxmppb/vxmppb
Fixing weather. Seems like an odd an incorrect way to fix, but alas...it works.
This commit is contained in:
parent
9b41de2e51
commit
b48e039783
10
index.js
10
index.js
|
@ -399,11 +399,11 @@ try {
|
||||||
let wmc = weather_city_name + " Weather: Tempature: " + w.main.temp + " degrees. Conditions: " + w.weather[0].main + ". Pressure: " +
|
let wmc = weather_city_name + " Weather: Tempature: " + w.main.temp + " degrees. Conditions: " + w.weather[0].main + ". Pressure: " +
|
||||||
w.main.pressure + ". Wind Direction: " + getDirection(w.wind.deg) + ". Wind Speed: " + w.wind.speed + " miles per hour \r\n";
|
w.main.pressure + ". Wind Direction: " + getDirection(w.wind.deg) + ". Wind Speed: " + w.wind.speed + " miles per hour \r\n";
|
||||||
// send weather to mqtt
|
// send weather to mqtt
|
||||||
client.publish('weather/temp', 'w.main.temp');
|
client.publish('weather/temp', '' + w.main.temp + '');
|
||||||
client.publish('weather/conditions', 'w.weather[0].main');
|
client.publish('weather/conditions', '' + w.weather[0].main + '');
|
||||||
client.publish('weather/pressure', 'w.main.pressure');
|
client.publish('weather/pressure', '' + w.main.pressure + '');
|
||||||
client.publish('weather/wind/direction', 'getDirection(w.wind.deg)');
|
client.publish('weather/wind/direction', '' + getDirection(w.wind.deg) + '');
|
||||||
client.publish('weather/wind/speed', 'w.wind.speed');
|
client.publish('weather/wind/speed', '' + w.wind.speed + '');
|
||||||
// send weather to xmpp admin
|
// send weather to xmpp admin
|
||||||
xmpp.send(from, wm);
|
xmpp.send(from, wm);
|
||||||
// call admin with latest weather report
|
// call admin with latest weather report
|
||||||
|
|
Reference in New Issue
Block a user