jrester / tesla_powerwall

Python API for Tesla Powerwall
MIT License
73 stars 25 forks source link

offgrid #43

Closed mihailvovk closed 1 year ago

mihailvovk commented 1 year ago

Hey, I'm trying to go ongrid/offgrid and it is giving me error:

GridStatus.ISLANDED Traceback (most recent call last): File "/root/tesla_powerwall/examples/example.py", line 70, in print(power_wall.set_island_mode(IslandMode.OFFGRID)) NameError: name 'IslandMode' is not defined root@debian:~/tesla_powerwall#

calling with print(power_wall.set_island_mode(IslandMode.OFFGRID))

git cloned the latest one and installed with build/install

jrester commented 1 year ago

Hey @mihailvovk, you probably forgot to append the IslandMode to the import in the second line of example.py. You could try changing that line to from tesla_powerwall import Powerwall, Meter, IslandMode. Hope that helps