From b48e0397830a4cac3d8e3a957e8ce2c069d2c7c1 Mon Sep 17 00:00:00 2001 From: stephen Date: Sat, 23 Apr 2022 23:27:14 -0400 Subject: [PATCH] Fixing weather. Seems like an odd an incorrect way to fix, but alas...it works. --- index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index 7a56c1a..862ccfe 100755 --- a/index.js +++ b/index.js @@ -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