Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

Commit

Permalink
Removing bad weather function from ecobee
Browse files Browse the repository at this point in the history
  • Loading branch information
billykwooten committed Jul 16, 2017
1 parent bf3fae5 commit cb68c0c
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions ecobee/ecobee.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,21 +103,6 @@ def set_hvac_mode(index, hvac_mode):
refresh_tokens()


def get_weather(index):
with open('ecobee/data/ecobee_tokens.json') as data_file:
data = json.load(data_file)
accesstoken = data['access_token']
thermostats = get_thermostats()
url = 'https://api.ecobee.com/1/thermostat'
header = {'Content-Type': 'application/json;charset=UTF-8', 'Authorization': 'Bearer ' + accesstoken}
params = {'format': 'json'}
body = ('{"selection":{"selectionType":"thermostats","selectionMatch":'
'"' + thermostats[index] +
'"},"thermostat":{"weather":{"forecast":"}}}')
request = requests.post(url, headers=header, params=params, data=body)
print request.json()


def get_remote_sensors(index):
''' Return remote sensors based on index '''
thermostats = get_thermostats()
Expand Down

0 comments on commit cb68c0c

Please sign in to comment.