Hello.
Does ApexCharts support sensors of state_class: total_increasing?
I mean, these, their values can drop to zero at any time, then increase again.
TBH I doubt, since neither the diff nor the delta aggregators’ descriptions mention the ability to handle resets. But maybe?
The only way I found is using hourly sensors and aligning the graph with the hour/day beginning. It makes it possible to use a delta, diff or max aggregator.
You may ask why not read the value without aggregation?
If you have quarter-hourly and hourly sensors, then the hourly history records consist of these quarter-hourly. For example:
It works thanks to the fact that utility sensors start every time period with a record of 0.0 value.
The requirement is, however, to align the graph with the sensor interval start.
To me it seems there is no method to display data from original sensor directly (ths being independent on hour-beginning aligment). But maybe you can help with that.
I see from the code you have posted (hint), you are using a text color of black on a black background. Not very helpful. Please follow the rules for posting in this community.
I would like to perform an action when the current value (yellow bar under “Nu”) is below the average which is represented by the red line.
Is it possible to set a helper or a switch if that is the case?
If not, is it possible to put the average value in a HA entity (numerical), so I can use it in an automation?
I made my first card with Apex Chart but the x-axis seems to lose the 24h when I change to another dashboard or leave the screen. It seems to happen immediately. When I then come back, click the edit button of the dashboard and save, the x-axis changes back to normal again.
I have a few issues that I cannot get around and I thought someone might be able to guide me further to a fix for it.
After playing around with it for a few weeks and lots of testing have come up with 3 good cards, but on some, I’m supposed to be able to use a Threshold to change the colour of the lines to warn me.
No matter what code I put in or change its not doing this adn thought it needed to be done from the file editor.
But not sure how a Dexcom G6 Theme can be overwritten to allow this in the code of the Apexcharts card.
It’s got a little over my head now!
Here is the graph I made, which is a Glucose Dual Sensor
The other one is a Horizontal stack card configuration so I will not post that here!
Hello
Is it is possible to render an annotation at x value based on a sensor entity?
So far, the syntax below throws an error that hass object is not defined
2 little questions ):
A: Is it possible to make this chart use the full width of the screen ?
B: put the number of the actual live PRICE in it (also without mouseover?) ?
A: looks like you are in sections view. Your card is contained within a section. Click the edit pencil top right when hovering over the section. From there select how many sections wide it should be.
Ok, thanks for the try…but I think, its much over my experience in this yaml stuff … so I think i have to live with it, as it is. But again, thanks for help
@higgy_de You are right, from your screenshot you seem to have your YAML keys in the wrong position. We can help if you are able to paste the whole YAML for your graph here.
Also it appears on apexchart when I remove group_by from the series. But it works coincidently. For instance removal the group by from “incjected” series makes render all its entries recorded within an hour instead of cumulated value.
You’re using statistics. I came across this just half an hour ago:
A small drawback of using statistics is that the chart doesn’t show data for the current period (i.e., the current hour). It appears once the period has ended.
This might be slightly improved by using a 5-minute interval (see below). However, I’m not sure whether that would require more granular helper sensors, or if it would help even when only an hourly sensor is available.
By the way, your settings are different and don’t work for me. My guess is that they work for you because your sensors don’t store sub-period data. By the guess, if you change to settings above, it will not change your results.
What I mean is a case where an hourly sensor also contains quarter-hourly data. To be honest, I’m not sure why Home Assistant introduces this kind of data redundancy, or if it is documented.
long term statistics are only recorded every 15mins more recent should be the sensor data that is in the recorder. On my hourly graph the duration: (buckets) are 1hr. You could try group by a shorter duration.
statistics:
type: change
period: 5minute
align: end
transform: 'return x < 0 ? 0 : x;'
group_by:
duration: 1h
func: sum
start_with_last: true