jasonacox / pypowerwall

Python API for Tesla Powerwall and Solar Power Data
MIT License
134 stars 24 forks source link

ignore sites that are not complete set up #72

Closed dcgibbons closed 7 months ago

dcgibbons commented 7 months ago

While Tesla is trying to figure out how to properly set up my two-gateway and three-powerwall system, they created a blank Site on my account with no devices attach. In this scenario pypowerwall will crash trying to display information about sites during the site selection menu creation.

This patch just skips those if that fails. I suspect you might want another way of fixing it, but sharing this for discussion. It does work in the case I'm seeing right now (I have 2 sites at the moment, including this bogus one).

Photo of Tesla app for context attached.

IMG_6870

jasonacox commented 7 months ago

Thanks @dcgibbons ! 🙏 This will be included in v0.7.8.

jasonacox commented 7 months ago

https://pypi.org/project/pypowerwall/0.7.8/