Skip to content

Puffer Card v1.2.2

Choose a tag to compare

@github-actions github-actions released this 01 Jul 13:34
· 6 commits to main since this release

Fixed

  • Blank chart area and page reload required to recover. Three root causes:
    1. The refresh logic ran inside updated(), which Lit calls after every
      reactive property change. Setting _histLoading = true triggered a
      re-render, which triggered updated() again while hass kept updating
      in the background, causing cascading fetch calls.
    2. There was no concurrency guard: two _fetchHistory() calls running in
      parallel would write to _history and _histLoading out of order,
      producing inconsistent state visible as repeated flickering followed by
      a blank chart.
    3. Any network/API error inside _fetchHistory() left _histLoading
      permanently set to true, showing only the loading placeholder.
      The fetch cycle is now driven by setInterval started in
      connectedCallback and cleared in disconnectedCallback. A _fetching
      flag prevents concurrent calls, and a try/finally block ensures
      _histLoading is always reset even on error.