How to combine an energy consuming device with total energy consumed?

We have a Rainforest Device that monitors our total grid energy, and it is integrated with Home Assistant.

We also have a Tesla Charger, that is integrated with Home Assistant. They are both visible in the Energy dashboards:

Unfortunately, when I brought the Tesla Charger into the dashboards, Home Assistant is counting the Tesla power usage PLUS the total energy usage.

When building energy objects, how do I add them to the dashboard, but have them mix properly, so the graph shows total energy consumed, plus the breakout. That is, you subtract the other devices like the Tesla charger from the total, so that the graph is correct?

Use a template sensor to do that, or just use the breakout at the bottom of the Energy dashboard to identify individual loads.

Will templates let you do stacked colours? I do this all the time in Splunk, and would like a similar appearance in Home Assistant.