kalkih / mini-graph-card

Minimalistic graph card for Home Assistant Lovelace UI
MIT License
2.97k stars 232 forks source link

Unavailable sensor is not displayed correctly #811

Closed p0wertiger closed 1 year ago

p0wertiger commented 2 years ago

I am away from home and one of my sensors went offline. It is shown as "unavailable" in HA history. The mini-graphs that were using this data suddenly scale down to 0 instead of ignoring the missing sensor. If I set the lower limit by hand, the graphs look fine but that's not what I would expect. In fact, the graph doesn't really care if the data is unavailable, I would expect the sensor label to be crossed out or colored red or something like that. This might be related to #778 and #799 , all of which are about handling missing data.

ildar170975 commented 2 years ago

Check these issues: https://github.com/kalkih/mini-graph-card/issues/414 https://github.com/kalkih/mini-graph-card/issues/678 Is it what you need?

p0wertiger commented 2 years ago

Your issues show more of a feature request while I'm noticing a real impact on graph being displayed. This all boils down to redesigning how missing values are handled

ildar170975 commented 2 years ago

real impact on graph being displayed

Have you read these 2 issues I mentioned (issue, issue) with attention?

  1. Some graph has "unavailable" values in history.
  2. mini-graph-card has "zero values" for these "unavailable" values - or "data suddenly scale down to 0" as you said.
  3. history-graph has "gaps" for for these "unavailable" values.
  4. The issues I mentioned (issue, issue) propose displaying gaps like in the history-graph.
  5. What you proposed in your 1st post is "sensor label to be crossed out or colored red or something like that".

Where is that "real impact" which is present in your proposals which make your proposals more important than others? Imho you just proposed one of alternative ways for "displaying a value" - i.e. "sensor label to be crossed out or colored red". And this is all about a currently selected point on a graph or a last read-out value, there is nothing about displaying a graph itself.

I guess the final implementation should be about:

  1. How to show a graph with "unavailable" points - shall we show gaps for these intervals?
  2. How to show the latest read-out value in the "state" label - shall we show either an "unavailable" text (may be of red color, may be crossed out) or the last "non-unavailable" read-out value (probably of red color, may be crossed out)?
stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If this is still an active issue, please let us know!