Rename sensor state class TOTAL_INCREASING
#761
Closed
emontnemery
started this conversation in
Polls
Replies: 3 comments
-
Note: I'm not super happy with the single choice format of the poll, but it seems that's the only allowed option. Also, only 8 choices are allowed. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Context for the options:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
The results are pretty clear, for now, we'll stick with what we have. Going to close this proposal for now. ../Frenck |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Rename sensor state class
TOTAL_INCREASING
Background:
The sensor state class "total_increasing" should be used for sensors representing an amount which is periodically reset to 0 according to some cycle, e.g. an amount of consumed gas starting from 0 the 1st of every month.
Home Assistant's statistics does not need to know about the cycle, e.g. monthly or daily; it will interpret a decreasing value as the beginning of a new cycle and calculate a grand total of the consumption for all cycles which can only increase.
The name of the state class is poorly chosen and has caused a lot of confusion, because it reflects how Home Assistant core converts the value when calculating statistics, not what the sensor value represents - a sensor which represents a total and which will only increase should probably use state class
TOTAL
, not state classTOTAL_INCREASING
.Hence, we should try to find a name which better reflects the properties of the source: A total which periodically resets according to some unspecified cycle.
This PR home-assistant/core#69902 suggests to rename
TOTAL_INCREASING
toTOTAL_AUTO_CYCLE
. Several other proposals were raised in that PR, let's vote on them here 👍16 votes ·
Beta Was this translation helpful? Give feedback.
All reactions