I am now using the Tesla API to match charging to solar production.
Looks pretty good.
I have the following script setup to run every minute when the car is charging.
service: tesla_custom.api
data:
command: CHARGING_AMPS
parameters:
path_vars:
vehicle_id: '{{ state_attr(''binary_sensor.<car_name>_online_sensor'', ''id'') }}'
charging_amps: '{{ ((states(''sensor.solaredge_solar_power''))| float *1.4 )| int }}'