Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Today my Apexcharts-card is showing incorrect data... #777

Open
codemonkey2k5 opened this issue Sep 18, 2024 · 1 comment
Open

Today my Apexcharts-card is showing incorrect data... #777

codemonkey2k5 opened this issue Sep 18, 2024 · 1 comment
Labels
bug Something isn't working Stale

Comments

@codemonkey2k5
Copy link

Checklist

  • [ X] I updated the card to the latest version available
  • [ X] I cleared the cache of my browser
  • [ X] I verified that I'm really running the latest version in my browser console
  • [ X] I checked if there is another issue opened with the same problem

Describe the bug
I put two cards side by side a few weeks ago so that I could better decide how I wanted to use them. All connected to the same data but using a different configuration. Up until today I hadn't seen any issues but today one of them is showing incorrect data.

I've noticed that after midnight the card seems to copy the previous days data. With the exception of today, it always updates it self to the correct data after I wake up in the morning and my Sleep monitor checks in. Always thought that was odd. But it is something I can live with.

The specific error will probably be obvious but just in case... Today's light sleep is showing yesterdays data, not todays.
Yet the exact same card, just in a horizontal config shows the correct info. So it was not a device not reporting issue.

Version of the card
Version: 2.1.2

To Reproduce
This is the configuration I used:

type: custom:apexcharts-card
cache: true
graph_span: 7.00001d
span:
  end: day
header:
  show: true
  show_states: true
  colorize_states: true
show:
  loading: true
  last_updated: false
apex_config:
  tickAmount: 12
  tooltip:
    enabled: true
  grid:
    show: true
  legend:
    show: false
  chart:
    type: bar
    stacked: true
    height: 250
    offsetY: -10
    offsetX: 10
    width: 95%
  plotOptions:
    bar:
      borderRadius: 5
      dataLabels:
        position: center
  dataLabels:
    enabled: true
    offsetY: 0
    style:
      fontSize: 10px
      fontWeight: lighter
      colors:
        - '#1f1f1f'
  xaxis:
    show: false
    border: false
    forceNiceScale: true
    labels:
      show: true
      format: ddd.
      style:
        fontSize: 12px
        fontWeight: lighter
        colors: '#9B9B9B'
  yaxis:
    show: true
    border: false
    min: 0
    max: 12
    apex_config:
      tickAmount: 12
    forceNiceScale: true
    labels:
      show: true
      format: hh:mm
      style:
        fontSize: 10px
all_series_config:
  curve: smooth
  fill_raw: last
  opacity: 0.75
series:
  - entity: sensor.withings_light_sleep
    name: Light Sleep
    type: column
    group_by:
      func: max
      duration: 1day
    color: '#ffd3b6'
    stroke_width: 2
    show:
      datalabels: true
  - entity: sensor.withings_deep_sleep
    name: Deep Sleep
    type: column
    group_by:
      func: max
      duration: 1day
    color: '#a8e6cf'
    stroke_width: 2
    show:
      datalabels: true
  - entity: sensor.withings_rem_sleep
    name: REM Sleep
    type: column
    group_by:
      func: max
      duration: 1day
    color: '#ff8b94'
    stroke_width: 2
    show:
      datalabels: true
  - entity: sensor.withings_sleep_score
    name: Sleep Score
    type: line
    color: '#b6e2ff '
    stroke_width: 0
    group_by:
      func: avg
      duration: 1day
    show:
      datalabels: true
      extremas: false

Screenshots
I have included a couple screen shots. The one with the vertical bars is the one with the error. Everything, using the same entities is correct.

Expected behavior
This card is meant to show daily sleep information from my Withings integration.
This includes:
Light sleep, Deep sleep, REM sleep and my sleep score.
It should show 7 days of data.

Desktop (please complete the following information):

  • Browsers used for testing: Microsoft Edge, Safari and Chrome.
    Chrome is primary and version is: 129.0.6668.59 (Official Build) (64-bit)

Smartphone (please complete the following information):
N/A

Additional context
I am running HAOS on an i7 Nuk with 32GB ram.
I am relatively new to HA so there is a good chance I've done something wrong.

image

image

image

@codemonkey2k5 codemonkey2k5 added the bug Something isn't working label Sep 18, 2024
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Stale
Projects
None yet
Development

No branches or pull requests

1 participant