We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9988f6c commit ef1834aCopy full SHA for ef1834a
src/cache/Cache.ts
@@ -77,7 +77,8 @@ async function fetchSingleRange(
77
// | '--- discarded as it is fictitious
78
// '--- point at the edge, kept
79
80
- const start = new Date(startT - 1);
+ const l = Math.max(0, 5000 - (endT - startT)); // The HA API doesn't add the fake boundary if the interval requested is too small
81
+ const start = new Date(startT - 1 - l);
82
endT = Math.min(endT, Date.now());
83
const end = new Date(endT);
84
let history: CachedEntity[];
0 commit comments