jesserockz/ha-leafspy

Other parameters

WojtaszekMarek opened this issue · 1 comments

Hello
Where are other parameters like i.e SOH, SOC number of L1/L2 charges, QC and etc, start and end trip date and time? Number of kilometers?

SOC is exposed as battery_level
SOH is exposed as amp_hours

The others are not sent to the server and I don't think you can change that.

Linked is a list of the params sent via the HTTP request and the attributes they map to:

args = {
'dev_id': dev_id,
'device_name': message['user'],
'latitude': float(message['Lat']),
'longitude': float(message['Long']),
'battery_level': float(message['SOC']),
'attributes': {
'amp_hours': float(message['AHr']),
'trip': int(message['Trip']),
'odometer': int(message['Odo']),
'battery_temperature': float(message['BatTemp']),
'outside_temperature': float(message['Amb']),
'plug_state': PLUG_STATES[int(message['PlugState'])],
'charge_mode': CHARGE_MODES[int(message['ChrgMode'])],
'charge_power': int(message['ChrgPwr']),
'vin': message['VIN'],
'power_switch': message['PwrSw'] == '1',
'device_battery': int(message['DevBat']),
'rpm': int(message['RPM']),
'gids': int(message['Gids']),
'elevation': float(message['Elv']),
'sequence': int(message['Seq'])
}
}