Configure return to grid/grid consumption and/or grid power?

The energy dashboard has options to configure “Grid Consumption” and “Return to Grid” energy entities, plus an option for “Grid power” which can be positive or negative. I don’t recall the last option being present when I first set this up, so if I already have the “Grid consumption” and “Return to grid” set up, should I also add the “Grid power” entity or will that double count?

Secondly is there any documentation on this - the linked documentation discusses how to measure power/energy but offers no clue on what to configure in the dashboard.

The grid power entity is only used for the new “Now” graphs. So no it won’t count double energy.

There are also power entities for solar and individual devices you can specify if you want “Now” graphs for hem too.

The energy dashboard was always poorly documented and has not been updated to include the new power options. You did a wonderful job with the ESPHome docs. Feel like taking on a new documentation project? :rofl:

Thanks, but that wasn’t me - I wrote the code, Robi did the docs. Saved me a ton of work. :smile:

So next question, I have battery energy in and out configured, but when I try to add an entity for battery power, it does not offer the entity that provides that, even though it appears to meet all the criteria:

Is there a FIX ISSUE listed for it in Developer tools → Statistics?

No. However I did go into configuration.yaml and manually added state_class: measurement to the entity there, then reloaded the entire yaml configuration, and that fixed it. It appears adding that in Developer Tools → States doesn’t work, even though it is then listed correctly there.

So two unexpected things - why is state_class: measurement not the default for a sensor (I mean, if it’s not a total of some sort, what else could it be?), and why is there a yaml editor in Developer Tools → States that appears to change the entity configuration but doesn’t?

Also, after editing the energy dashboard by adding a couple of power sensors , the layout of it changed even though there was no update to HA at the time. The default view has much less information than previously. I did find that the old view is now under an “Energy” tab but I can’t find a way to edit what appears in the default view, nor does the tab selection (Summary/Energy/Now) stick - each time the energy dashboard is reopened it reverts to Summary.

One nice new feature is the ability to mark a consumer as part of an upstream device - I previously had to configure a calculated sensor to achieve that.

Yeah that is not a permanent change. It is for testing things like numeric state triggers.

I guess it’s in case you don’t want to fill your recorder with long term stats.

It’s not an editor. It’s a non permanent test tool.

Yeah that appears to be hard coded. You can suggest a feature here: home-assistant · Discussions · GitHub