Tesla Power Wall?

Depending which way you have your ct you can just set allow positive or allow negative on your powerwall input before you log to feed. You will need to set it up twice, once for charge and once for discharge with the allow reversed.

Ian