MindFreeze / ha-sankey-chart

A Home Assistant lovelace card to display a sankey chart. For example for power consumption
MIT License
378 stars 20 forks source link

Use "missing source" with 'remaining_child_state' as dynamic update throttle #196

Closed david-rapan closed 4 months ago

david-rapan commented 4 months ago

Is your feature request related to a problem? Please describe. I don't think so.

Describe the solution you'd like Sometimes, when using 'remaining_child_state' which evaluates bigger than source (f.e. when child update frequency is higher than that of the sources) provided the chart shows in the column "empty space" which could be interpreted as missing source. So my question or propose for a feature is: Could this temporary state be used as a update throttle? Simply delay the update of the chart until is this state "solved".

Screenshot of described state sankey

Describe alternatives you've considered Playing with the throttle configuration but it does not solve the "issue" completely.

Additional context Could be configurable by simple bool item withing configuration of single entity in sections. With some default max wait time for the state to "solve" so it prevents chart freeze by some kind of a misconfiguration or anything like that.

MindFreeze commented 4 months ago

Thanks for the feedback. The solution for this is actually #37 . Instead of throttling we can figure out what the parent should be. I have a draft already but it is not quite ready yet