Right now, the max_staleness for non-future sensors defaults to PT0H ("immediate staleness after knowledge time", see data/services/sensors.py:get_status_specs).
The consequence is that we show red lights a bit too eagerly, I believe. Hovering over a red traffic light (even green ones) says "More than a moment old". This should be more informative.
I suggest changing the default to adding 2 times the resolution.
Look & Feel
You should start getting "More than a [event_resolution * 2] old" instead of "More than a moment old" for sensors without status_specs in attributes when hovering over traffic light.
How to test
Open status page for an asset with some sensor without status_specs in attributes. This sensor should also have some data in db. Hover over corresponding green / red lamp and verify that you get "More than a [event_resolution * 2] old" instead of "More than a moment old".
Further Improvements
-
Related Items
-
[x] I agree to contribute to the project under Apache 2 License.
[x] To the best of my knowledge, the proposed patch is not based on code under GPL or other license that is incompatible with FlexMeasures
Description
Right now, the max_staleness for non-future sensors defaults to PT0H ("immediate staleness after knowledge time", see data/services/sensors.py:get_status_specs).
The consequence is that we show red lights a bit too eagerly, I believe. Hovering over a red traffic light (even green ones) says "More than a moment old". This should be more informative.
I suggest changing the default to adding 2 times the resolution.
Look & Feel
You should start getting "More than a [event_resolution * 2] old" instead of "More than a moment old" for sensors without status_specs in attributes when hovering over traffic light.
How to test
Open status page for an asset with some sensor without status_specs in attributes. This sensor should also have some data in db. Hover over corresponding green / red lamp and verify that you get "More than a [event_resolution * 2] old" instead of "More than a moment old".
Further Improvements
-
Related Items
-