Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare for new ETO calculations #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions nodes/aeris.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import node_funcs
from nodes import aeris_daily
from nodes import uom
from nodes import et3
from nodes import weather_codes as wx

LOGGER = polyinterface.LOGGER
Expand Down Expand Up @@ -119,6 +120,9 @@ def longPoll(self):

def shortPoll(self):
self.query_conditions()

def mm2inch(self, mm):
return mm/25.4

# Query for the condition an forecast data
def get_weather_data(self, extra, lat=None, long=None):
Expand All @@ -129,12 +133,10 @@ def get_weather_data(self, extra, lat=None, long=None):
request += '&client_secret=' + self.params.get('ClientSecret')

if extra == 'forecasts':
request += '&filter=mdnt2mdnt'
request += '&precise'
request += '&filter=mdnt2mdnt,precise'
request += '&limit=12'

if extra == 'observations/summary':
request += '&fields=periods.summary.precip'
else:
request += '&filter=precise'

#FIXME: add unit support if available
#request += '&units=' + self.units
Expand Down