ApexCharts card - A highly customizable graph card

I don’t think it does :slight_smile:
group_by 1min over 60min is creating 60 buckets worth of 1min of state history (if there’s nothing in the history for a specific bucket, because there is no home assistant state change, by default it will fill the empty buckets with the last known value). The groups are starting to be created from the end of the chart (minus 1min for each bucket), the end of the chart in your case being exactly now (at the millisecond precision). So it will sum 83 and 4, giving you 87, then everything after is just getting 1 value of 4 (because of fill: last) or 0 (if fill: zero).

You can’t, there’s not way to create data out of missing data :man_shrugging:

Yeah… understand that you cannot do anything if HA doesn’t provide data.
Strange is, that subsequent sensor values of the same value are intercepted by the HA, but somehow history provides the first one only.
This trying to imagine if it couldn’t be a problem while measuring other things. Like power which doesn’t change over time, but is still provided.

So for me, the only way is to count missing pings to infinity

Are you sure that last_updated or last_changed in your sensor is upating for consecutive states with the same value?
You might want to look at: https://developers.home-assistant.io/docs/api/rest/ -> /api/history/period/<timestamp>

If you can check that with significant_changes_only=0 it reports those consecutive states with the same value, and with significant_changes_only=1 it only provides the first one, then I can maybe do something for you. :slight_smile:

Yes. I’m sure. Developer Tools shows the timestamp changing while value remains the same.

Ok, I suppose I can add that feature then. :slight_smile:
Mind opening a feature request?

I’ll do that.
Yet checking the API you asked for.

If manage to do it, please paste a slice of the json with several consecutive states with the same value in the feature request. It will help :slight_smile:

Is there any way to add a mdi icon in the header? (Tried searching the thread and github without success.)

No, at least not yet :slight_smile:

Unfortunately, this api call doesn’t provide information about subsequent sensor changes if its state (value) is not changing. It sticks to the first known value regardless of significant_changes_only setting :frowning:

Did you make it significant_changes_only=0 and significant_changes_only=1? Just adding or removing the parameter is not enough if I remember correclty

Yeah… I was changing values… in my case no difference in the result.
BTW last_changed and last_updated attributes remains the same (hoped that last_updated is changing at least)

Then unfortunately, there’s not much I can do :frowning:

I know.
Big thanks for your instant support anyway

@maxym, how do you get the columns to overlap?

That is by default when you have too much columns to display vs the space there is to display them.

1 Like

Did nothing. Suppose they start overlapping if there is no much space

1 Like

So I’m willing to introduce the color_threshold feature but at the same time it breaks some default stuff (there are bugs in the ApexCharts library). I’m thinking about still releasing it but as an experimental feature…

enabling the experimental flag would render apex_config.fill completely unusable (and if you use it, it will break)

What do you think?

- type: custom:apexcharts-card
  graph_span: 20min
  experimental:
    color_threshold: true # that's new
  series:
    - entity: sensor.random_0_1000
      type: area # or line or column
      stroke_width: 2 # that's new
      color_threshold: # that's new
        - value: 0
          color: blue
        - value: 250
          color: green
        - value: 500
          color: yellow
        - value: 500
          color: orange
        - value: 750
          color: orange
        - value: 750
          color: red
        - value: 1000
          color: red

imageimageimage

2 Likes

Did you notice that the first three colours blended but the rest have hard transitions?

Yeah, that’s part of the test :slight_smile: If you look at the config, those are repeated twice with just different values and it generates this “hard” stop effect.

1 Like