1
0
mirror of https://github.com/home-assistant/frontend.git synced 2026-04-02 00:27:49 +01:00

Fix sensor card graph time axis not progressing when value is unchanged (#29976)

This commit is contained in:
Petar Petrov
2026-03-05 15:13:05 +01:00
committed by Bram Kragten
parent 1859d35f7b
commit b286b07cfd

View File

@@ -193,13 +193,19 @@ export class HuiGraphHeaderFooter
? Math.max(width / 5, this._config.hours_to_show!)
: this._config.hours_to_show!
);
const now = Date.now();
const useMean = this._config.detail !== 2;
const { points } = coordinatesMinimalResponseCompressedState(
entityHistory,
width,
width / 5,
maxDetails,
{ minY: this._config.limits?.min, maxY: this._config.limits?.max },
{
minX: now - this._config.hours_to_show! * HOUR,
maxX: now,
minY: this._config.limits?.min,
maxY: this._config.limits?.max,
},
useMean
);
this._coordinates = points;