I use the Aqara PS-S04D motion detector for the cellar: on the widget the brightness is correctly indicated in « lx » and on the graph « lx » does not appear?
Hello @Chris75, thanks for your feedback.
I was able to reproduce the issue; it’s indeed a bug in Gladys, not a configuration problem on your end.
What’s happening: the widget and the graph don’t fetch the unit from the same place.
- The widget reads the unit directly from the sensor, so it’s always up to date → it correctly displays « lx ».
- The graph, on the other hand, records the unit in the dashboard configuration at the moment you add the sensor to the graph. It’s a snapshot taken at time T, which is never refreshed afterward.
So, if the « Cellar » sensor didn’t have a unit when you added it to the graph (device recreated since, integration updated in the meantime…), the graph remains without a unit forever, even if the sensor has since retrieved its « lx » unit. This is exactly what we see in your screenshot: « Pantry (lx) » has the unit, « Cellar » doesn’t.
I took the opportunity to fix a second bug at the same time: when you reorder the sensors in a graph by drag-and-drop, the units weren’t reordered with them, which could assign the wrong unit to the wrong curve.
The fix is currently being reviewed here: Use live device feature units in chart boxes by Pierre-Gilles · Pull Request #2716 · GladysAssistant/Gladys · GitHub
It makes the graph now read the unit directly from the sensor, like the widget. Once the update is installed, your graph will display correctly on its own, without you having to touch your box.
In the meantime, you have a simple workaround: edit your graph box, remove the « Cellar » sensor from the list, then add it back. The unit will be re-recorded in the process, and the « lx » will reappear in the legend.

