Unable to stop display of trips in normal Print command
Closed this issue · 2 comments
With the recent change, there's no information on how to prevent the display of the trips when running the "print" command. If modifying and changing volvooncall.py and setting the journal=True to journal=False (as per the latest commit), the journal display is gone from the "print" command, however, setting it False now causes the normal "trips" command to break.
Thanks, fixed here: 8202262
Thanks! Looks like it affected the dashboard display, though.
COMPUTER:~$ voc dashboard
UNKNOWN Position: (XXX, XXX)
UNKNOWN Door lock: Locked
UNKNOWN Heater: Off
UNKNOWN Odometer: 1219 mil
UNKNOWN Trip meter 1: 76 mil
UNKNOWN Trip meter 2: 1 mil
UNKNOWN Fuel amount: 7 L
UNKNOWN Fuel level: 14 %
UNKNOWN Fuel consumption: 0.53 L/mil
UNKNOWN Range: 4.8 mil
UNKNOWN Battery range: 1.5 mil
UNKNOWN Battery level: 66 %
UNKNOWN Time to fully charged: 60 minutes
UNKNOWN Battery charging: Charging
UNKNOWN Engine: Off
Traceback (most recent call last):
File "/usr/local/bin/voc", line 235, in
main()
File "/usr/local/bin/voc", line 226, in main
print(f'{instrument}: {instrument.str_state}')
File "/usr/local/lib/python3.6/dist-packages/dashboard.py", line 83, in str_state
return f'{self.state} {self.unit}'
File "/usr/local/lib/python3.6/dist-packages/dashboard.py", line 178, in state
if self.trip:
File "/usr/local/lib/python3.6/dist-packages/dashboard.py", line 149, in trip
if self.vehicle.trips:
File "/usr/local/lib/python3.6/dist-packages/volvooncall.py", line 319, in trips
return self.attrs['trips']
KeyError: 'trips'
COMPUTER:~$