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

Remove "meter" from entity names of rainforest_raven sensors #141487

Merged
merged 10 commits into from
Mar 28, 2025

Conversation

NoRi2909
Copy link
Contributor

@NoRi2909 NoRi2909 commented Mar 26, 2025

Proposed change

In rainforest_raven the four sensors

  • power_demand
  • total_energy_delivered
  • total_energy_received
  • signal_strength

currently add "meter" in their friendly names.

This does not provide any useful information and is rather irritating instead – it sounds like these are the power demands or consumption of the meter itself. But they are the measured values.

This commit removes "meter" from the names making them simpler and more precise, too.

For consistency the naming of meter_price is changed to energy_price.

In addition the sentence-casing of "MAC addresses" is fixed.

Type of change

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

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:
  • Link to developer documentation pull request:
  • Link to frontend pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.

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

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.

To help with the load of incoming pull requests:

The three sensors
- power_demand
- total_energy_delivered
- total_energy_received

currently add "meter" in their friendly names.

This does not provide any useful information and is rather irritating instead – it sounds like these are the power demands or consumption of the meter itself. But they are the measured values.

This commit removes "meter" from the names making them simpler and more precise, too.

In addition the sentence-casing of "MAC addresses" is fixed.
@home-assistant
Copy link

Hey there @cottsay, mind taking a look at this pull request as it has been labeled with an integration (rainforest_raven) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of rainforest_raven can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign rainforest_raven Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

@NoRi2909 NoRi2909 marked this pull request as ready for review March 26, 2025 16:15
Copy link
Contributor

@abmantis abmantis left a comment

Choose a reason for hiding this comment

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

What about "Meter price"?

@NoRi2909
Copy link
Contributor Author

"Meter price" has the key meter_price so that one matches – contrary to the others addressed here.

So we would have to come up with a replacement for both.

@cottsay
Copy link
Contributor

cottsay commented Mar 26, 2025

For context, some of the "meter" nomenclature stems from the idea that a RAVEn device like the EMU-2 can be connected to multiple meters simultaneously, so the measurement doesn't stem from the device itself, but rather each meter it's connected to. Maybe the name doesn't effectively communicate that, but I wanted to mention it.

@NoRi2909
Copy link
Contributor Author

@cottsay I understand your reasoning for the current naming. But as Home Assistant automatically prefixes each entity name with the device name when creating the ID the (chosen) name of each meter will be part of that anyhow.

But you see no problem in making the suggested change for consistency within Home Assistant?

@cottsay
Copy link
Contributor

cottsay commented Mar 26, 2025

But you see no problem in making the suggested change for consistency within Home Assistant?

I have no specific objections, no.

@abmantis
Copy link
Contributor

"Meter price" has the key meter_price so that one matches – contrary to the others addressed here.

So we would have to come up with a replacement for both.

I am not sure I understand the reasoning. On the PR description you mention:

This does not provide any useful information and is rather irritating instead – it sounds like these are the power demands or consumption of the meter itself. But they are the measured values.

So, is "Meter Price" the price of the meter? I think that independently of the translation key, the string should make sense and be consistent with the other strings, even if the key has "meter" in the name.

@NoRi2909
Copy link
Contributor Author

@abmantis I'm not against your suggestion, let's fix this as well.

I was just saying that, contrary to the strings I already addressed, this one contains "meter" in its key name. too.

So how about changing meter_price to energy_price plus "Energy price" as its friendly name?

@NoRi2909
Copy link
Contributor Author

@cottsay I assume that the mac key ("Meter MAC addresses") is also not the MAC address(es) of the meter but rather that of the Rainbow RAVEn device? And is plural correct here?

@cottsay
Copy link
Contributor

cottsay commented Mar 27, 2025

The meter, RAVEn device, and upstream coordinator all have unique mac addresses.

That's intentionally plural, as the RAVEn device can be connected to multiple meters with unique MACs. There's an argument that the key itself should be plural, but I'm not sure if there are implications to changing that now. When we request data from the RAVEn device, we need to be specific about what meter we're talking about, and the MAC address is how we differentiate them.

@NoRi2909
Copy link
Contributor Author

OK, then the name "Meter MAC addresses" makes complete sense and we should keep it that way.

So the remaining question is if we should change meter_price to energy_price plus "Energy price" as its friendly name.

I think that @abmantis has a point that "Meter price" sounds like the price of the meter and not the total for received minus delivered energy.

@NoRi2909
Copy link
Contributor Author

Applied all changes as discussed.

@NoRi2909 NoRi2909 requested a review from abmantis March 28, 2025 10:12
@NoRi2909 NoRi2909 changed the title Fix misleading friendly names of rainforest_raven sensors Remove "meter" from entity names of rainforest_raven sensors Mar 28, 2025
@abmantis abmantis merged commit af29159 into home-assistant:dev Mar 28, 2025
34 checks passed
@NoRi2909 NoRi2909 deleted the patch-78 branch March 28, 2025 12:00
@github-actions github-actions bot locked and limited conversation to collaborators Mar 29, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants