Chttpd generalisation, external data expunge
This commit is contained in:
@@ -141,8 +141,8 @@ class WeatherInfo(object):
|
||||
wind_gust = influx_weather_client.query(wind_gust_q)
|
||||
hum_ext = influx_weather_client.query(hum_ext_q)
|
||||
hum_int = influx_weather_client.query(hum_int_q)
|
||||
press = influx_weather_client.query(press_q)
|
||||
presr = influx_weather_client.query(presr_q)
|
||||
#press = influx_weather_client.query(press_q)
|
||||
#presr = influx_weather_client.query(presr_q)
|
||||
t_ext = influx_weather_client.query(t_ext_q)
|
||||
t_int = influx_weather_client.query(t_int_q)
|
||||
|
||||
@@ -150,10 +150,10 @@ class WeatherInfo(object):
|
||||
result_windspeed = [speed for speed in wind_speed][0][0]
|
||||
result_winddir = [direction for direction in wind_direction][0][0]
|
||||
result_windgust = [gust for gust in wind_gust][0][0]
|
||||
result_hum_int = [y for y in hum_int][0][0]
|
||||
result_t_int = [c for c in t_int][0][0]
|
||||
result_press = [z for z in press][0][0]
|
||||
result_presr = [a for a in presr][0][0]
|
||||
#result_hum_int = [y for y in hum_int][0][0]
|
||||
#result_t_int = [c for c in t_int][0][0]
|
||||
#result_press = [z for z in press][0][0]
|
||||
#result_presr = [a for a in presr][0][0]
|
||||
result_t_ext = [b for b in t_ext][0][0]
|
||||
result_hum_ext = [x for x in hum_ext][0][0]
|
||||
|
||||
@@ -168,11 +168,11 @@ class WeatherInfo(object):
|
||||
result.update({"direction": round(result_winddir['value'], 1)})
|
||||
result.update({"windgust": round(result_windgust['value'], 1)})
|
||||
result.update({"humidity_ext": round(result_hum_ext['humidity'], 1)})
|
||||
result.update({"humidity_int": round(result_hum_int['humidity'], 1)})
|
||||
result.update({"pressure": round(result_press['pressure'], 1)})
|
||||
result.update({"pressure_raw": round(result_presr['pressure'], 1)})
|
||||
#result.update({"humidity_int": round(result_hum_int['humidity'], 1)})
|
||||
#result.update({"pressure": round(result_press['pressure'], 1)})
|
||||
#result.update({"pressure_raw": round(result_presr['pressure'], 1)})
|
||||
result.update({"temp_ext": round(result_t_ext['temperature'], 1)})
|
||||
result.update({"temp_int": round(result_t_int['temperature'], 1)})
|
||||
#result.update({"temp_int": round(result_t_int['temperature'], 1)})
|
||||
return result
|
||||
|
||||
def body(self):
|
||||
@@ -197,9 +197,9 @@ class WeatherInfo(object):
|
||||
out_temp_icon=fs_out_temperature_icon,
|
||||
out_temp=current_weather['temp_ext'],
|
||||
in_temp_icon=fs_in_temperature_icon,
|
||||
in_temp=current_weather['temp_int'],
|
||||
pressure_icon=fs_pressure_icon,
|
||||
pressure=current_weather['pressure'],
|
||||
raw_pressure=current_weather['pressure_raw']
|
||||
#in_temp=current_weather['temp_int'],
|
||||
pressure_icon=fs_pressure_icon
|
||||
#pressure=current_weather['pressure'],
|
||||
#raw_pressure=current_weather['pressure_raw']
|
||||
)
|
||||
return admin_html
|
||||
|
||||
Reference in New Issue
Block a user