Optimizing use of unused Solar Power to charge a Tesla

You mean this: GitHub - jmcollin78/solar_optimizer: The Solar Optimizer integration for Home Assistant starts and stops your equipments depending on the Solar net production ?

I will just have to wait until some charger manufacturer deems it profitable to make something, that is working out of the box, and i only need to feed it my one surplus solar sensor, and it will do the rest.

You can build your own smart charger with SmartEVSE. SmartEVSE has a build in Solar mode. With this Solar mode your charger will only charge your car when solar is otherwise send back to the grid. It’s also a load balancer. It charge your car only with the current that is not needed for your house.

No programming needed. You need only a few hardware components (a contactor, a charge cable or socket and a metering device).

See Smart EVSE v3 controller for the SmartEVSE hardware.
And for the open source code GitHub - SmartEVSE/SmartEVSE-3: Smart Electric Vehicle Charging Station (EVSE)

Got Tesla Powerwall battery and solar at home. Recently switch to Amber Electic (Australia) for wholesale price. I can see during summer and Ausgrid Solar Fit in price is negative specially between 10-3pm. Try to get lowest possible export power during that time. Although Amber app does a bit. But it seem not good enough. My home Powerwall get fully charged within about 3 to 3.5 hours. I want set Tesla to export all excuss solar power to grid before 10am or even 10:30am except rain days. Installed Tesla powerwall and Tesla custom integration and config properly. I can see switch mode of Tesla Powerwall power export mode. But it only gives . While Tesla invertor should have default (1, exccess power charge battery first, 2, Solar send to Grid, and 3, Solar & battery send to grid). How to match them against power export mode (Solar or Everything two selection) in Tesla custom inegration?

Here is the script I did. But how to resume Tesla control back to charge Battery after 10am? Or even the script doesn’t do what I want to.

alias: Send Solar to Grid
description: ""
triggers:
  - trigger: state
    entity_id:
      - weather.home
      - weather.forecast_home
    to: sunny
conditions:
  - condition: time
    before: "10:00:00"
    weekday:
      - sun
      - mon
      - tue
      - wed
      - thu
      - fri
      - sat
    after: "07:00:00"
actions:
  - device_id: dc2a5dd5011a4691033c1ffcc324fb51
    domain: select
    entity_id: 37dd3f9af1b1776fb5c75eee5d90e244