Skip to content

Commit

Permalink
Stub /api/troubleshooting/problems
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonacox committed Mar 19, 2024
1 parent 7b1fc45 commit 88c4ce3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions proxy/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
import ssl
from transform import get_static, inject_js

BUILD = "t43"
BUILD = "t44"
ALLOWLIST = [
'/api/status', '/api/site_info/site_name', '/api/meters/site',
'/api/meters/solar', '/api/sitemaster', '/api/powerwalls',
Expand Down Expand Up @@ -418,7 +418,9 @@ def do_GET(self):
message = message + '\n<p>Page refresh: %s</p>\n</body>\n</html>' % (
str(datetime.datetime.fromtimestamp(time.time())))
elif self.path == '/api/troubleshooting/problems':
message = pw.poll('/api/troubleshooting/problems') or '{"problems": []}'
# Simulate old API call and respond with empty list
message = '{"problems": []}'
# message = pw.poll('/api/troubleshooting/problems') or '{"problems": []}'
elif self.path in ALLOWLIST:
# Allowed API Calls - Proxy to Powerwall
message = pw.poll(self.path)
Expand Down

0 comments on commit 88c4ce3

Please sign in to comment.