Hi, I have combined my daily electricity usage / production with the Solcast prediction and solar intensity from my Garni weatherstation in an Apex chart. It’s really nice as it shows clearly what I import and what I use from the sun, relative to the predicted and actual sun intensity. So it basically tells me how well I’m using the sun’s energy.
I’d like however to add the time stamp from Solcast which moment of the day my production will be highest. So for example a little flag when the production is maximum. I’m really struggling how to get this into my apex chart, any ideas?
I’ve posted some screens below. So in short I want to add the specific timestamp to the graph.
type: custom:apexcharts-card
header:
show: true
standard_format: true
show_states: true
colorize_states: true
apex_config:
chart:
height: 250px
tooltip:
enabled: true
shared: true
followCursor: true
legend:
show: false
stroke:
show: true
curve: smooth
colors:
- orange
- blue
- '#66CDAA'
- red
- red
width: 1
graph_span: 22 HOURS
now:
show: true
label: Now
span:
start: day
series:
- entity: sensor.solcast_pv_forecast_forecast_today
name: Solar Forecast (D1)
extend_to: false
color: green
type: area
yaxis_id: kWh
show:
in_header: false
data_generator: |
return entity.attributes.detailedForecast.map((entry) => {
// pv_estimate per periode delen door 2 als interval 30 min → kWh per 15 min
return [new Date(entry.period_start), entry.pv_estimate / 2];
});
- entity: sensor.zonneproductie_vandaag
name: Werkelijke productie
extend_to: now
yaxis_id: kWh
group_by:
duration: 30m
func: diff
show:
in_header: false
- entity: sensor.envoy_122424009387_energy_consumption_today
name: Consumptie
type: area
color: red
stroke_width: 1
extend_to: now
yaxis_id: kWh
group_by:
duration: 15m
func: diff
show:
in_header: false
- entity: sensor.energie_verbruik_vandaag
name: Import
type: area
color: yellow
stroke_width: 1
extend_to: now
yaxis_id: kWh
group_by:
duration: 15m
func: diff
show:
in_header: false
- entity: sensor.solar_radiation_stat
name: Zoninstraling
type: line
curve: monotoneCubic
opacity: 8
extend_to: now
color: red
stroke_width: 3
yaxis_id: solar
group_by:
duration: 15m
func: avg
- entity: sensor.solcast_pv_forecast_forecast_today
yaxis_id: header_only
name: Forecast
color: orange
show:
legend_value: true
in_header: true
in_chart: false
- entity: sensor.zonneproductie_vandaag
yaxis_id: header_only
name: Realized
color: Blue
show:
legend_value: true
in_header: true
in_chart: false
- entity: sensor.solcast_pv_forecast_forecast_remaining_today
yaxis_id: header_only
name: Remaining
color: green
show:
legend_value: true
in_header: true
in_chart: false
- entity: sensor.solcast_pv_forecast_forecast_tomorrow
yaxis_id: header_only
name: Tomorrow
color: grey
show:
legend_value: true
in_header: true
in_chart: false
yaxis:
- id: kWh
show: true
min: 0
apex_config:
tickAmount: 5
- id: solar
show: true
opposite: true
min: 0
apex_config:
tickAmount: 6

