Skip to content

Commit

Permalink
Added rate_limit var to base class to fix #31
Browse files Browse the repository at this point in the history
  • Loading branch information
kbickar committed Jun 24, 2019
1 parent eee9891 commit 045e670
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sense_energy/sense_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
WS_URL = "wss://clientrt.sense.com/monitors/%s/realtimefeed?access_token=%s"
API_TIMEOUT = 5
WSS_TIMEOUT = 5
RATE_LIMIT = 30
RATE_LIMIT = 60

# for the last hour, day, week, month, or year
valid_scales = ['HOUR', 'DAY', 'WEEK', 'MONTH', 'YEAR']
Expand All @@ -23,6 +23,7 @@ def __init__(self, username=None, password=None,
# Timeout instance variables
self.api_timeout = api_timeout
self.wss_timeout = wss_timeout
self.rate_limit = RATE_LIMIT

self._realtime = {}
self._devices = []
Expand Down

0 comments on commit 045e670

Please sign in to comment.