generated from custom-cards/boilerplate-card
-
-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Plotted statisitc values (5minute and hourly) are shifted on the x-axis for state-statistics.
The value listed for example at 23:10 uses the entry collected at 23:14:43.
I would have expected plotly to show the value at 23:15.
I think that is due to using the start_ts-column in statistics_short_term instead of the created_ts column.
Naming is a bit confusing and I dont see much in the offical docu about it (https://data.home-assistant.io/docs/statistics/). I am not sure why you would dump start and end of the period into the db if its always 5 min?
Screenshots
yaml
type: custom:plotly-graph
title: Verschiedene EnergieQuellen
hours_to_show: 4h
autorange_after_scroll: false
refresh_interval: auto
ha_theme: true
grid_options:
columns: 48
rows: 8
entities:
- entity: sensor.total_energy
name: normal db
- entity: sensor.total_energy
name: statistics db - state / hour
statistic: state
period: hour
line: true
- entity: sensor.total_energy
name: statistics db - state / 5 min
statistic: state
period: 5minute
line: true
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working