When you updated the get_status function in the jlrpy.py module recently for the change made by jag , it appears that change also managed to break the check_soc facility in the charge_offpeak.py file in the sample code library....
line 89: status = { d['key'] : d['value'] for d in v.get_status()['vehicleStatus'] }
now generates an error:
File "/home/pi/ipace/charge_offpeak.py", line 134, in
check_soc()
File "/home/pi/ipace/charge_offpeak.py", line 89, in check_soc
status = { d['key'] : d['value'] for d in v.get_status()['vehicleStatus'] }
File "/home/pi/ipace/charge_offpeak.py", line 89, in
status = { d['key'] : d['value'] for d in v.get_status()['vehicleStatus'] }
TypeError: string indices must be integers
If I replace line 227 (return result) with the following code :
Hi Ardevd,
When you updated the get_status function in the jlrpy.py module recently for the change made by jag , it appears that change also managed to break the check_soc facility in the charge_offpeak.py file in the sample code library....
line 89: status = { d['key'] : d['value'] for d in v.get_status()['vehicleStatus'] }
now generates an error: File "/home/pi/ipace/charge_offpeak.py", line 134, in
check_soc()
File "/home/pi/ipace/charge_offpeak.py", line 89, in check_soc
status = { d['key'] : d['value'] for d in v.get_status()['vehicleStatus'] }
File "/home/pi/ipace/charge_offpeak.py", line 89, in
status = { d['key'] : d['value'] for d in v.get_status()['vehicleStatus'] }
TypeError: string indices must be integers
If I replace line 227 (return result) with the following code :
<< The original sample code now works.