How to use solar assistant MQTT integration to stop EV from draining battery

Finally got my home assistant up and running. MQTT from solar-assistant and HACS Tesla integrations successful. Have some basic automations built- i.e stop my EV charging when grid goes down.

I want to build an automation that will stop using battery when the EV is charging. I essentialy need-

If Tesla is charging
then do
set battery to no discharge?

I just cannot figure out how to read the various options. “change grid charge to next option” “change grid charge to last option”
What are the options it is refering to?

Start battery or stop battery discharge capacity?

Solved. figured it out.

Created an automation.

If tesla charging charging


deye/sunsynk/sol-ark capacity point 1 (through 6) set value to 100.

I leave the grid charge unchecked.

Gives me what I want- no use of battery. Uses solar if excess available.

second automation- once charging is done- reset all the capacity points to what I had before.