Skip to content

Conversation

@MindFreeze
Copy link
Member

@MindFreeze MindFreeze commented Oct 6, 2025

Proposed change

Add power inputs next to all the energy inputs in energy dashboard. No power graphs yet. Lets add the config options first

Core PR home-assistant/core#153809

image

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

Copy link
Member

@piitaya piitaya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will it be a new view or new card or toggle on the card?

@MindFreeze
Copy link
Member Author

New view eventually

@MindFreeze MindFreeze marked this pull request as ready for review October 6, 2025 09:55
@MindFreeze MindFreeze added the Noteworthy Marks a PR as noteworthy and should be in the release notes (in case it normally would not appear) label Oct 6, 2025
Co-authored-by: Norbert Rittel <[email protected]>
@MindFreeze MindFreeze marked this pull request as draft October 10, 2025 13:23
@MindFreeze
Copy link
Member Author

After some testing and discussion, I've changed it to a single bidirectional power sensor

@MindFreeze MindFreeze marked this pull request as ready for review October 13, 2025 06:33
bramkragten
bramkragten previously approved these changes Oct 13, 2025
@MindFreeze
Copy link
Member Author

MindFreeze commented Oct 14, 2025

First PR to use this data: #27501
Submitted against this branch, so we can merge them together.

Copy link
Contributor

@NoRi2909 NoRi2909 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we're at the grid metering point here, negative values aren't necessarily equal to (solar) production when a battery system is involved.

So this should be called "feed-in" instead.

@davidrapan
Copy link
Contributor

davidrapan commented Oct 14, 2025

You assume that production == solar production, but that doesn’t have to be the case. Our electricity distributor calls it production regardless of source (at the grid metering point).

Mixing terms, such as consumption - "feed-in" would only cause confusion IMO, usable "pairs" should be something like:

  • Grid energy consumption - Grid energy production
  • Grid energy - Grid energy feed-in
  • Grid energy - Grid energy returned
  • ...

@MindFreeze MindFreeze marked this pull request as draft October 14, 2025 09:45
@NoRi2909
Copy link
Contributor

As an electrical engineer myself I prefer to only use production where you actually produce energy, that is in your PV panels. Otherwise this is all totally confusing and misleading.

Even without a battery-system the simple equation is:

Grid supply or feed-in = consumption – PV production

Where consumption is positive and feed-in is negative.

If you add a battery system it becomes:

Grid supply or feed-in = consumption + battery charging – PV production

If you discharge the battery this term becomes negative.

In German we generally use these terms as

  • Netzbezug (grid supply)
  • Netzeinspeisung (grid feed-in)
  • Verbrauch (consumption)
  • Erzeugung (production)

With that mixed use in English translating all this correctly is quite a hassle.

@MindFreeze
Copy link
Member Author

Not a fan of "feed-in". Maybe "export", idk

@MindFreeze
Copy link
Member Author

Moved grid power @piitaya
localhost_8123_config_energy_historyBack=1

@MindFreeze MindFreeze marked this pull request as ready for review October 14, 2025 12:17
@NoRi2909
Copy link
Contributor

NoRi2909 commented Oct 14, 2025

Feed-in is common in English for the tariff: https://en.wikipedia.org/wiki/Feed-in_tariff

You can use Grid import / export , that would be a good choice, too.

This way the house consumption is also decoupled as I outlined in the equations above.

Grid import or export = consumption + battery charging – PV production

@davidrapan
Copy link
Contributor

As an electrical engineer myself, I actually use import/export in my custom integration. But you see, it's a matter of personal preference, as none of the proposed nomenclatures are factually incorrect.

@MindFreeze
Copy link
Member Author

The goal is to make this also understandable to non engineers. With that in mind how about the latest update - "Positive values indicate using electricity from the grid, negative values indicate exporting electricity" ?
I think it's correct enough without requiring the user to understand industry specific terms.

@NoRi2909
Copy link
Contributor

With time-variable tariffs, it becomes more and more interesting to completely decouple your house consumption from the grid import in the winter by charging your house battery during off-peak hours.

This is one area where Home Assistant will play a big role in the future, replacing very pricey Home Energy Management Systems (HEMS).

So we should try to use the most accurate terms here which should also be followed by the integrations.

@NoRi2909
Copy link
Contributor

@MindFreeze That sounds OK, I would add "to the grid" at the end:

"Positive values indicate using electricity from the grid, negative values indicate exporting electricity to the grid."

@davidrapan
Copy link
Contributor

davidrapan commented Oct 14, 2025

With time-variable tariffs, it becomes more and more interesting to completely decouple your house consumption from the grid import in the winter by charging your house battery during off-peak hours.

Totally agree, this is main purpose of my production instance of HA + my custom integration for managing charging during hours with cheapest electricity throughout the day.

But this is OT. 😉 And changes LG. 👍

So we should try to use the most accurate terms here which should also be followed by the integrations.

Then I'm for any of these:

  • import/export terms
  • from/to the grid
  • Grid energy/energy returned (like we did some time ago in the Shelly integration, if you remember @NoRi2909)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed hacktoberfest Noteworthy Marks a PR as noteworthy and should be in the release notes (in case it normally would not appear) wait for backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants