Because the now line is not correctly matching the columns. it’s now 08:35 and the now line indicates, that the price of the 09:00 column is active now, which is not correct.
Now using an offset of -30min seems to deliver the expected result, the now line is at the end of the 08:00 column and has not yet switched to the 09:00 column.
I am a new user of HA and the ApexCharts. I am using ApexCharts to monitor various power entities from the Solarman integration. We are subjected to regular power cuts (so-called load-shedding) in South Africa.
The Grid graph drops to 0 at the beginning of the cut but then builds up as if it is interpolated. The only samples for the grid are just before the power cut and then again just after power is restored. I’ve used 2 different entities but the behaviour is the same.
Edit: In effect, I’ll have to use either the grid frequency or grid status to force 0 values during the power cut, but how do I access those entities in the transform for the grid power?
sensor.solarman_external_ct_l1_power # blue
(The second y-axis for power only appears if I enable the Load graph.)
The history of the same entity as a Gauge
I also have the following 2 entities sensor.solarman_grid_frequency and sensor.solarman_grid_connected_status
I tried various Transform combinations to force the Grid value to 0 during the power cuts in an attempt to fix the Grid display but had no success.
Any help in this regard will be highly appreciated.
Creating an alternating background effect to highlight change of day
I needed a way to visually highlight the change of day so it would be easier to roughly estimate the time of day (night, evening etc.) in multiday graphs eg. weather forecast. First I thought vertical grid line, then annotations but could not make them work.
Then I though “hacking” it with the use of data generator. And this is the end result. If there is a native way I will gladly switch to it.
- entity: weather.openweathermap
name: ' '
yaxis_id: dayshading
type: area
color: white
opacity: 0.05
stroke_width: 0
show:
legend_value: false
in_header: false
data_generator: |
let res = [];
var startOfToday = new Date(Date.now())
startOfToday.setHours(0,0,0,0)
startOfToday.setDate(startOfToday.getDate() + -6)
var endOfToday = new Date(startOfToday)
endOfToday.setHours(23,59,59,0)
for (let i = 0; i < 12; i++) {
var start = new Date(startOfToday)
start.setDate(start.getDate() + i)
var end = new Date(endOfToday)
end.setDate(end.getDate() + i)
res.push([new Date(start), (i %2)]);
res.push([new Date(end), (i %2)]);
}
return res
Hi all, i’m using 4 months monthly bar chart to show 4 total increasing sensors. Problem is that a small part on the graph right side is missing (label is not shown). I was not able to find a way to show the missing part. Can someone help me?
Hi, I thought to have seen this topic before but could not find it. I have two charts with each 6 series and for some odd reason:
the y-axis scales oddly
one graph has different y-axis scaling then the other although the figures are the same (one if for current month january and the other for current year 2024…which equals to january)
I have not defined anything for the y-axis, so why is it not showing a y-axis till max 100 and why are they different?
Answering myself: in this case the issue is with HA, the created sensors may show the same value but HA initiated them with a much (!) higher value and different values per sensor. This seems to be an existing erroneous behavior from the side of HA
Thanks, but not quite what I’m looking for. I’m using the Entsoe integration and have a bar graph of the electricity prices for today ant tomorrow. In the integration there is another entity which shows you the current % of the maximum price. I would like to color the bars according to
current % entity > 20 green,
current % entity > 50 yellow
current % entity > 80 red
For example. Not sure if you can use another entity as the input for a threshold value.
Hi everybody,
I have a question regarding my chart: I use ApexCharts to display my daily power consumption from my heat pump - this works fine:
Now I would like to display the sum of e.g. the last week or last month or something like that, but if I triy for example to use just the last 3 days and sum them up I get crazy values:
Is it possible to have threshold colours for the y axis scale (not the graph line, but the actual scale)? I would like the positive bit of the scale to be red, and the negative bit of the scale green…
Is it possible to hide certain values of a series in the chart? For example: I am trying to build a chart that shows the value of a stock. I would like to hide the weekends from the chart as the market is off on those days.