From 44a528467af763e53ff81cbc84a2874e1d649c59 Mon Sep 17 00:00:00 2001 From: klaute Date: Wed, 25 Mar 2020 08:15:04 +0100 Subject: [PATCH] Fixed json --- oko-weather/oko-weather-sync.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/oko-weather/oko-weather-sync.py b/oko-weather/oko-weather-sync.py index 43d939c..e3bf3ce 100644 --- a/oko-weather/oko-weather-sync.py +++ b/oko-weather/oko-weather-sync.py @@ -54,13 +54,13 @@ def send_data_to_openweather(temp, hum, wind, pres, date): url = "/data/3.0/stations?appid=" + openweather_api_key - data = '[{"station_id":"' + openweather_station_id + '",' + \ - '"dt":' + str(date) + '",' + \ + data = '{"station_id":"' + openweather_station_id + '",' + \ + '"dt":"' + str(date) + '",' + \ '"temperature":"' + str(temp) + '",' + \ '"wind_speed":"' + str(wind) + '",' + \ '"pressure":"' + str(pres) + '",' + \ '"humidity":"' + str(hum) + '"' + \ - '}]' + '}' header = { "Content-Type" : "application/json" }