FlexMeasures / flexmeasures

The intelligent & developer-friendly EMS to support real-time energy flexibility apps, rapidly and scalable.
https://flexmeasures.io
Apache License 2.0
143 stars 36 forks source link

Use 2 times sensor resolution instead of instant staleness as default #1108

Closed nrozanov closed 3 months ago

nrozanov commented 3 months ago

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

-