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

Tool script set_mode.py error #41

Open
jasonacox opened this issue May 28, 2023 · 1 comment
Open

Tool script set_mode.py error #41

jasonacox opened this issue May 28, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@jasonacox
Copy link
Owner

jasonacox commented May 28, 2023

Raised by user:

The script set_mode.py has been working but in the past few days it has failed. Here is the me what I see.

Traceback (most recent call last):
File "C:\Users\dgpet\Documents\Projects\Python\Powerwall\set-mode.py", line 299, in
mode = data["operation"]
KeyError: 'operation'

I have dumped the ‘data’ though I don’t have a copy of successful one to compare too.. Anything I can do to help?

Confirmed that the data payload no longer contains 'operation' key.

@jasonacox jasonacox added the bug Something isn't working label May 28, 2023
jasonacox added a commit that referenced this issue May 28, 2023
@jasonacox
Copy link
Owner Author

jasonacox commented May 28, 2023

The API or the way the teslapy mapps the Tesla API response has changed. The operational mode for the Powerwall used to be visible in the get_battery_data() which this script used but is no longer visible there. It does show up at the site configuration payload at api('SITE_CONFIG'). I adjusted the script to use that as the source for the operational mode (see commit change).

You can pull the latest changes from set-mode.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant