Display resetting entity with 'diff' or 'delta' grouping #636
Unanswered
justcoding-dev
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have an entity that counts the energy imported from the grid over the day. It increases steadily and resets to zero at midnight. Since I want to display the hourly import, I have made a graph like this:
Problem is, when the counter resets at midnight, the 'diff' function returns a large negative value, because the first bin value seems to be the last days accumulated value (the attached image shows the delta function, where the value is large and positive).
Is there a ways to calculate the diff value as
diff = last > first ? last - first : last
for each bin?
Beta Was this translation helpful? Give feedback.
All reactions