Tesla Solar charging script/automation

I’ve been browsing, searching, reading regarding charging the Tesla based on available solar power, but there are many different topics on this subject and I don’t get a good overview of what is working good. Therefore this post and I hope the community can help.

Like many others I want to charge the Tesla based on available solar energy controlled by Home Assistant. What is good integration or what is a good automation script for this.

My situation:

  • Home Assistant installed and up and running,
  • Tesla integration installed and working perfectly,
  • Goodwe integration for solar power monitoring, working perfectly,
  • Car charger is a bit old and is from New Motion, no Home Assistant integration.
  • P1 meter installed and working perfectly. HA is monitoring the power consumption/production.

What I would like to achieve:

  • Car is plugged in into the New Motion charger, when the solar is generating above X watts, the car is being charged.
  • Switch to charge from solar or from grid (in case I need the car the next day).

Questions, challenges:

  • When I inserted the plug from the New Motion, the car start charging immediately. How can this be controlled if I want to charge from solar?
  • If the Tesla is instructed to change the charging current regularly and/of maybe even enabled/disabled (if there is no solar power), Would this damage the car, the batteries? How can this be prevented?

Looking forward to feedback and suggestions? Thanks for the support.

Anybody who can point me to a good script/automation/blueprint to achieve the Tesla charging based on the solar power generation?

I have not done this but I believe its possible. A few thoughts. The Tesla integration provides a switch (switch.xxx_charger). I think that allows you to switch charging on/off. So you could trigger on power production if its greater than a defined value then turn charging on. And if power production goes low then turn charging off. There must be some intelligence though so that its not going on/off all the time. Potentially based on “min charge time”. You could have another switch so that you can manually switch charging on independently of power production.

Maybe this helps https://github.com/evcc-io/evcc

1 Like