Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow customizing display name for energy device #20033

Merged
merged 2 commits into from
Apr 12, 2024

Conversation

karwosts
Copy link
Contributor

@karwosts karwosts commented Mar 9, 2024

Proposed change

Allow for storing a custom display name with individual device consumptions for energy dashboard. This allows users for a cleaner and less cluttered dashboard, as entity names for energy devices often have terms like "Energy", "Consumption", "Daily", "Weekly", "Total", etc which are not relevant for the energy dashboard, but may still be wanted as part of the entity name when looking at it out of the context of energy dashboard.

Also space is at a premium for smaller/mobile devices, and the visual display can be improved with shorter names to minimize space consumption of the legend.

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:

@karwosts karwosts added the Backend Change Required Requires a Backend Core Code Change label Mar 9, 2024
@home-assistant home-assistant bot added cla-signed WTH Issues & PRs generated from the "Month of What the Heck?" labels Mar 9, 2024
@karwosts
Copy link
Contributor Author

karwosts commented Mar 9, 2024

Backend: home-assistant/core#112834 (approved)

@piitaya
Copy link
Member

piitaya commented Mar 12, 2024

Can't we only use the device name instead of adding a new name option?
However, the name can be useful for entity that are not in a device.

@karwosts
Copy link
Contributor Author

Can't we only use the device name instead of adding a new name option? However, the name can be useful for entity that are not in a device.

I'm not confident that would work for every use case, given that the entity to device mapping is not user modifiable. For example someone could have a single smart electric panel device that has 20 entities for various consumptions.

@evlo
Copy link

evlo commented Mar 18, 2024

Can't we only use the device name instead of adding a new name option? However, the name can be useful for entity that are not in a device.

I'm not confident that would work for every use case, given that the entity to device mapping is not user modifiable. For example someone could have a single smart electric panel device that has 20 entities for various consumptions.

Pro4pm shows 4 different consumptions and is one device in HA and it is very popular device in EU

another popular with 16 different consumptions for one device is emporia

Or maybe I misunderstood - mapping consumption measured by one device entity to another HA device would be nice option (if measured device exist in HA), but seems to be to be more system wide thing if that is to be implemented.

@bramkragten bramkragten merged commit 0118a5b into home-assistant:dev Apr 12, 2024
13 checks passed
@karwosts karwosts deleted the energy-device-names branch April 12, 2024 19:20
@BenJewell
Copy link

Is their a reason this feature was only implemented for device level energy monitors? I was hoping to use it for energy "Sources" monitors. Seems a little odd to have it for one and not the other.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend Change Required Requires a Backend Core Code Change cla-signed WTH Issues & PRs generated from the "Month of What the Heck?"
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants