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

Values wrong with grouping by hour to show max value #1020

Open
wizbowes opened this issue Oct 24, 2023 · 1 comment
Open

Values wrong with grouping by hour to show max value #1020

wizbowes opened this issue Oct 24, 2023 · 1 comment

Comments

@wizbowes
Copy link

I have a graph showing hourly rainfall. However sometimes the bars don't match the underlying data.

Here's the yaml:

type: custom:mini-graph-card
icon: mdi:weather-rainy
name: Hourly Rainfall
hours_to_show: 24
points_per_hour: 1
group_by: hour
aggregate_func: max
show:
  graph: bar
  fill: true
  icon: false
color_thresholds:
  - value: 12
    color: '#030ffc'
  - value: 7
    color: '#353ffc'
  - value: 5
    color: '#656dfc'
  - value: 3
    color: '#979dfc'
  - value: 1
    color: '#afb3fa'
  - value: 0
    color: '#ffffff'
entities:
  - entity: sensor.rainfall_hour
    state_adaptive_color: false

Here's the current output - as you can see the last hour with data is showing 1.5mm rain

image

However in the raw data you can see that it should be 0.5mm

image

Home Assistant 2023.10.3
Frontend 20231005.0 - latest
Mini-Graph: v0.11.0

@lowson
Copy link

lowson commented Dec 16, 2023

I also have issues with group_by: hour but using aggregate_func: diff

My source is a Helper Utility Meter that resets daily.

It seems like the usage only shows when there is 2 or more recording changes within an hour, it's not diffing the 0 -> 1 within any hour.

Here's the yaml:

type: custom:mini-graph-card
icon: mdi:gas-burner
entities:
  - sensor.gas_daily
name: Gas
line_color: Orange
group_by: hour
line_width: 8
font_size: 75
hours_to_show: 24
unit: m3
points_per_hour: 1
aggregate_func: diff
show:
  graph: bar

Delta also does the something no different

Screenshot from 2023-12-16 10-54-40

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants