lovelace-plotly-graph-card icon indicating copy to clipboard operation
lovelace-plotly-graph-card copied to clipboard

Resample is not timezone aware

Open paradox460 opened this issue 11 months ago • 2 comments

Describe the bug If using an offset timezone, say, -0700, and running resample on daily binned values, the values will display with an offset of 7 hours before the bin should start.

Ex: a bin for March 5th would show as March 4 @ 17:00

paradox460 avatar Mar 05 '24 18:03 paradox460

For the record, this is about using home assistant in a non gmt-0 time zone (not using time offset)

dbuezas avatar Mar 05 '24 18:03 dbuezas

Plotly graph certainly looks nicer than Apexchart version, but one of the data series is not being interpreted correctly. Coloured bars are from source in UTC with "Z" notation, the grey bars that they overlay are from an adjusted source (+1:00). Plotly isn't respecting the timezone. Everything else in config looks the same.

- start_time: '2024-04-03T16:00:00+01:00'
  end_time: '2024-04-03T17:00:00+01:00'
  price_pence_per_kwh: 6.604500000000001
- start: '2024-04-03T15:00:00+00:00'
  end: '2024-04-03T15:30:00+00:00'
  value_inc_vat: 0.247485
- start: '2024-04-03T15:30:00+00:00'
  end: '2024-04-03T16:00:00+00:00'
  value_inc_vat: 0.26271

image image

deltamelter avatar Apr 03 '24 10:04 deltamelter