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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add state class total increasing to Tasmota energy today sensor #77140
Add state class total increasing to Tasmota energy today sensor #77140
Conversation
Hey there @emontnemery, mind taking a look at this pull request as it has been labeled with an integration ( |
@ollo69 Thanks for the PR! Why is it better to use the energy today sensor for statistics than the energy total sensor? |
From my point of view it is more clear to understand from where the counter start providing values for energy consuming and provide more flexibility in adding / removing counter to the energy dashboard. |
I think it's rather confusing to allow selecting either the today or the total sensor for statistics, and the result for the user will be exactly the same. We recommend that an integration only makes one sensor which provides a certain type of data, for example energy consumption, available for statistics for that reason. |
Ok, understand your point. In this case you don't think that at least |
The problem with |
I'm only using Sonoff Pow, so I don't know about possible reading decrease. But at the end doesn't seems so a bad idea having also the |
Any thoughts about this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is great, but we don't yet have a way to group sensors.
Ideally there should be flags on the today and total energy sensors, to make it clear they're different views of the same data.
Proposed change
I think that
energy today
sensor should have associated the state classTotal Increasing
. This sensor grows every days and is reset at midnight, representing the daily used energy. Adding the state class will allow to use this sensor in the energy dashboard, better than use the sensorenergy total
.Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: