history-explorer-card
history-explorer-card copied to clipboard
defaultTimeRange: allow to use any values
Consider the code:
type: custom:history-explorer-card
cardName: abcdef
graphs:
- type: timeline
entities:
- entity: sun.sun
defaultTimeRange: 20h
Seems that currently the value of defaultTimeRange
is kind of "filtered".
For instance, instead of 20h
another value (24h
) is used.
Managed to fix this locally by forced calling setTimeRangeMinutes
in setTimeRangeFromString
.
https://github.com/SpangleLabs/history-explorer-card/blob/f916a426227bed0926459045b5a667db44864751/src/history-explorer-card.js#L782
This allowed me to use even float values; this may be useful (for instance) to display a graph "starting from 00:00 till NOW".