In addition to the historical stats shown on the Energy dashboard, I wanted a way to visualize the real-time usage of monitored devices. This is useful when coming up with auto-off automations, or understanding how devices behave. I also wanted a “remainder” value, showing the un-monitored consumption, to help decide what new devices or circuits to add monitoring to.
I managed to do this entirely using the apexcharts-card, without any additional computed values. The total home power usage (in my case provided by the Tesla integration) is added as a hidden series, with a formatter function to subtract the sum of all other devices’ usage from it. Hovering over a segment shows the device name and usage in the middle. Here’s what it looks like, and the YAML:
I also tried without the names. I tried it with the names because of the apex charts how-to for this feature “It only works if all the series have a unique name”