Fixing weather. Seems like an odd an incorrect way to fix, but alas...it works.

This commit is contained in:
Stephen Vanderwarker 2022-04-23 23:27:14 -04:00
parent 9b41de2e51
commit b48e039783
1 changed files with 5 additions and 5 deletions

View File

@ -399,11 +399,11 @@ try {
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";
// send weather to mqtt
client.publish('weather/temp', 'w.main.temp');
client.publish('weather/conditions', 'w.weather[0].main');
client.publish('weather/pressure', 'w.main.pressure');
client.publish('weather/wind/direction', 'getDirection(w.wind.deg)');
client.publish('weather/wind/speed', 'w.wind.speed');
client.publish('weather/temp', '' + w.main.temp + '');
client.publish('weather/conditions', '' + w.weather[0].main + '');
client.publish('weather/pressure', '' + w.main.pressure + '');
client.publish('weather/wind/direction', '' + getDirection(w.wind.deg) + '');
client.publish('weather/wind/speed', '' + w.wind.speed + '');
// send weather to xmpp admin
xmpp.send(from, wm);
// call admin with latest weather report