New V1.0.30 release is out ! This is a somewhat experimental release, so I hope it won’t break too many things
Support for long term statistics
When enabled, the card will try to pull in long term statistics for an entity, if the limit of the history data is reached. The integration is entirely seamless. You keep scrolling and zooming in or out of your data, as usual. The statistics and history data will be combined on the fly at all time ranges. This obviously only works for entities that have long term statistics available. Graphs for all other entities will just become blank as soon as you reach the history data limit, as it was before.
Example:
In the screenshot above, the blue graph is the outdoor temperature, the red graph is the temperature of a workshop / barn. The outdoor temperature has statistics available, the barn temperature does not. So you see the red line stopping where the history database retention period ends (Oct 11th). The outdoor temperature continues way past this point, as the card will turn to long term statistics. Note that the card will always prefer history data over long term statistics data if available, because it’s more precise.
This is still an experimental feature. It may fail and may have some rendering and refresh glitches. Feedback is welcome !
To enable this feature, add the following to the card YAML:
type: custom:history-explorer-card
statistics:
enabled: true
mode: mean
The (optional) mode parameter controls how the statistics data is processed before being integrated into the history stream. mean
= use the average value, min
= minimum value, max
= max value. This does not apply to total_increasing values like energy sensors, which are calculated differently. This option is ignored for them.
Sticky toolbars
If you have a lot of graphs visible, it’s really annoying to scroll up or down in order to reach the toolbar, for example to change zoom levels or time range. This version introduces sticky toolbars. When enabled, this option will make your top, bottom or both toolbars sticky, so they keep floating on top (or bottom) of your graphs when you scroll.
Caveats: there are some rendering glitches with this mode when you are in the card configuration popup or when you are in Lovelace edit mode. These will disappear as soon as you exist the edit mode. For mobile usage, don’t make the bottom toolbar sticky if it contains a entity search / selector field, because the entity dropdown list will be clipped.
To enable:
type: custom:history-explorer-card
uiLayout:
sticky: top # can be top, bottom or both