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

Inconistent docs/attributes for electricity currrent/previous accumulative cost #1127

Open
2 tasks done
sargant opened this issue Dec 16, 2024 · 2 comments
Open
2 tasks done
Assignees
Labels
bug Something isn't working

Comments

@sargant
Copy link

sargant commented Dec 16, 2024

Describe the bug

The documentation and attributes for the electricity current & previous accumulative cost sensors are inconsistent for the "total without standing charge" attribute.

The documentation states that the attribute name is total_without_standing_charge, but the actual attribute name in the code is total_cost_without_standing_charge.

The equivalent attributes for gas entities are consistently total_without_standing_charge.

Reproduction steps

View the attribute data for the current/previous electricity current accumulative costs sensors

Expected behaviour

Either:

  1. Update the docs for the electricity sensors to change the attribute name to total_cost_without_standing_charge; or
  2. Update the attribute code to be total_without_standing_charge

In my opinion, option 2 is preferable as it would make it consistent with the equivalent gas sensors, but would be a breaking change.

A third option would be to have both new and existing attributes and deprecate the current one. Not sure if deprecating attributes is a thing?

Tariff Code

N/A

Integration Version

13.3.0

Home Assistant Version

Core 2024.12.3; Supervisor 2024.12.0; Operating System 14.0; Frontend 20241127.8

Fresh Install?

Not specified

Home Assistant Logs

n/a

Confirmation

  • I confirm that I cannot find my solution within the documentation
  • I confirm that I cannot find my solution within the FAQ
@sargant
Copy link
Author

sargant commented Dec 17, 2024

Also to note - the cost override entity for electricity also defines it as total_without_standing_charge - same as all gas entities and the documentation, and different from the rest of the electricity ones.

I think renaming the attribute might be the best approach for consistency then - PR above

@BottlecapDave
Copy link
Owner

Hello. Thanks for raising this and sorry for the late response. While I hate inconsistency, for the immediate future I'll update the docs. I'll then review changing the attribute names for a future release which has a bigger unavoidable breaking change, as I try and bundle up breaking changes to keep them to a minimum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants