group_by: date not working as expected
See original GitHub issueI am using following definition
- type: custom:mini-graph-card
entities:
- entity: sensor.socket_dishwasher_energy_today
name: Dishwasher
aggregate_func: max
group_by: date
hours_to_show: 168
show:
graph: bar
So I expect that for each day maximum value calculated and single bar for this day will be present on the graph. Instead, I see the following: What am I doing wrong?
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
pandas groupby datetime.date object is not consistent
We can see pandas groupby is too smart to change datetime.date object to Timestamp object. And it mess up indexing, we can not...
Read more >Date group by not working as expected - Dashboards
Date group by not working as expected when date range is from 1-nov the group by feature working correctly but when the date...
Read more >Grouping dates in reports not working as expected
We have started using the grouping function within several reports and grouping on a date field but we are coming across tasks with...
Read more >Group by Date not working - Qlik Community - 59839
Hi, I am trying to group a table that has hourly entries such that it rolls in up into daily entries; I have...
Read more >7 Common GROUP BY Errors - LearnSQL.com
1. Forgetting GROUP BY with Aggregate Functions · 2. Confusing WHERE and HAVING · 3. Listing a Column Inside SELECT but Not in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I don’t have time to look in the code now but i suspect where the problem might be located…
There is this place where we set the result array length. It is little bit odd anyway. And I think that what happens here is that there is not enough data to cover 7 days, we put the available data on the beginning of the array and then extend it to 7 items. The result is that first bars show correct values and the rest just repeat the last value. This is corner case which I haven’t tested. To be honest I don’t know then how come it works for line graphs 😃 as the logic is the same. If you have time before weekend you can try to fix it if not I’ll do it on Fri/Sat
No, the second one from InfluxDB but the data should be same And the line graph looks right