Adding Individual Device that shows consumption in bursts (i.e., resets to zero at random times)

I have a Tesla Wall Connector and the Total Energy Entity is broken/buggy.

The “Session Energy” is correct but it only increases kWh per session. After charging, it sits there for an undetermined amount of time and at some point goes to zero.

This shows an example with two charging cycles yesterday:

I added this entity as an “Individual Device” and at first glance it seems to work.

But I am not sure if this is coincidence or whether there are any side effects that may cause problems. Because one could also interpret the two steps to zero as energy produced … which is certainly not something I’d want.

Is it OK to use such an entity for an “Individual Device”?

As long as the state_class is total_increasing, this is perfect and exactly how an entity with that state class is expected to behave. Energy will track it correctly. :+1: