Skip to content

Commit

Permalink
Remove device[0] index for PB update
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonacox committed Jan 17, 2022
1 parent 27598c9 commit a5e5201
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pypowerwall/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
import sys
from . import tesla_pb2 # Protobuf definition for vitals

version_tuple = (0, 1, 4)
version_tuple = (0, 2, 0)
version = __version__ = '%d.%d.%d' % version_tuple
__author__ = 'jasonacox'

Expand Down Expand Up @@ -249,8 +249,8 @@ def vitals(self, jsonformat=False):
output = {}
while(x < num):
# Each device
parent = str(pb.devices[x].device[0].device.componentParentDin.value)
name = str(pb.devices[x].device[0].device.din.value)
parent = str(pb.devices[x].device.device.componentParentDin.value)
name = str(pb.devices[x].device.device.din.value)
if name not in output.keys():
output[name] = {}
output[name]['Parent'] = parent
Expand Down

0 comments on commit a5e5201

Please sign in to comment.