Fixed json

This commit is contained in:
klaute 2020-03-25 08:15:04 +01:00
parent 600e5a7fbe
commit 44a528467a

View file

@ -54,13 +54,13 @@ def send_data_to_openweather(temp, hum, wind, pres, date):
url = "/data/3.0/stations?appid=" + openweather_api_key url = "/data/3.0/stations?appid=" + openweather_api_key
data = '[{"station_id":"' + openweather_station_id + '",' + \ data = '{"station_id":"' + openweather_station_id + '",' + \
'"dt":' + str(date) + '",' + \ '"dt":"' + str(date) + '",' + \
'"temperature":"' + str(temp) + '",' + \ '"temperature":"' + str(temp) + '",' + \
'"wind_speed":"' + str(wind) + '",' + \ '"wind_speed":"' + str(wind) + '",' + \
'"pressure":"' + str(pres) + '",' + \ '"pressure":"' + str(pres) + '",' + \
'"humidity":"' + str(hum) + '"' + \ '"humidity":"' + str(hum) + '"' + \
'}]' '}'
header = { "Content-Type" : "application/json" } header = { "Content-Type" : "application/json" }