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