Compare commits

..

No commits in common. "4ee05476fd53828cfc1b9415ed0fd09a5ddd3070" and "10101ba6188cecb6b47d692554b831802a1c1d1a" have entirely different histories.

1 changed files with 7 additions and 15 deletions

View File

@ -10,11 +10,6 @@ import rrdtool
from weather_au import api
from dateutil import tz
from pyowm import OWM
owm = OWM('API KEY GOES HERE')
mgr = owm.weather_manager()
# Grab current temps from sensors around the house
#outside = rrdtool.fetch("/media/media/mqtt/ESP_b5952/temp/c.rrd", "AVERAGE")
#rows = outside[2][::-1]
@ -22,17 +17,14 @@ mgr = owm.weather_manager()
# if data[0] is not None:
# outside_temp = data[0]
# break
outside_temp = 0
# Grab outside temp from OpenWeatherMap
observation = mgr.one_call(lat=42.9696, lon=147.2004, exclude='minutely,hourly,daily', units='metric')
outside_temp = int(observation.current.temperature()['temp'])
#bedroom = rrdtool.fetch("/media/media/mqtt/ESP_b3fe20/temp.rrd", "AVERAGE")
#rows = bedroom[2][::-1]
#for data in rows:
# if data[0] is not None:
# bedroom_temp = int(data[0])
# break
bedroom = rrdtool.fetch("/media/media/mqtt/ESP_b3fe20/temp.rrd", "AVERAGE")
rows = bedroom[2][::-1]
for data in rows:
if data[0] is not None:
bedroom_temp = int(data[0])
break
bedroom_temp = 0
lounge = rrdtool.fetch("/media/media/mqtt/ESP_4c7682/temp.rrd", "AVERAGE")