The graphs indicate the penultimate value

Hello everyone!

First post and signing up for this one, thank you very much for the huge work on Gladys — I transitioned from HA (Home Assistant) → Gladys and went from a few bugs to everything working perfectly, a pleasure.

However, on my dashboard, for all the graphs it’s not the last value that’s displayed but the penultimate one — is this normal? I couldn’t find other topics about this, I suppose it’s a bug. However my DB shows in the t_features the correct value in the last_value column.

Example: A sensor reports 4, 5, 6, 7, 8

I can find the rows for 4, 5, 6, 7, 8 in the DB in t_features_state
I find 8 as the value for the last_value column.

Yet on the chart display I have 7 (with the upward arrow).

I can provide screenshots if needed :slight_smile:

Have a great evening everyone!
:heart: BZH

1 Like

Hello and welcome!
Others will confirm (or not :innocent:), but I believe this is normal behavior insofar as the graphs covering several days use aggregated data.
And as I recall, the most recent data are displayed only in the hour-by-hour view…

1 Like

That matches the last_agregate in the DB, right :grin:!

I find it a shame from a UX standpoint that the displayed value isn’t the latest (or a checkbox always display last value). For example, for daily automations, we stay on the previous day permanently even though the data does exist.
But easy to criticize :sweat_smile:!

Thanks for these clarifications :handshake:

2 Likes

Hi @BZH and welcome!! A power user, that’s cool!

In any case, that’s a very good question for @pierre-gilles :wink:

Hi @BZH and welcome to Gladys !

Glad to hear that everything works perfectly (or almost!), that’s the goal with Gladys: a product that’s simple and stable to use :slight_smile:

Indeed, it’s a limitation of the current implementation: since we calculate « aggregated » data, all graphs except « last hour » show at most the most recent data up to the date of the last aggregation. There is an aggregation every hour.

I had tried to concatenate the aggregated data with the live data, but it doesn’t work at all — you can see the difference on the graph ^^

Nevertheless, it’s a known issue and it will probably change because we’re likely to adopt a new, quite revolutionary technology for storing and querying time-series data (DuckDB, it just hit 1.0 a few days ago.. :wink: ), which will allow us to query « live » without any calculations

1 Like