Skip to content

Commit

Permalink
Catch missing scope
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeBishop committed May 8, 2024
1 parent 62a2cc5 commit 78d11ff
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/TWCManager/EMS/TeslaPowerwall2.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,8 @@ def getStormWatch(self):
bodyjson = r.json()
lastData = bodyjson["response"]
except:
if r.status_code is 403:
logger.warn("Error fetching Powerwall cloud data; does your API token have energy_device_data scope?")
pass

self.lastFetch[key] = (now, lastData)
Expand Down

0 comments on commit 78d11ff

Please sign in to comment.