thank you! much better now, here is my graph
Summary
type: custom:apexcharts-card
apex_config:
chart:
height: 350px
all_series_config:
unit: ' Wh'
header:
title: Solar forecast
show: true
standard_format: true
show_states: true
colorize_states: true
graph_span: 2d
span:
start: day
offset: '-0h'
now:
show: false
label: Now
yaxis:
- id: kwh
min: 0
apex_config:
tickAmount: 4
- id: header_only
show: false
series:
- entity: sensor.pv_power
name: Actual Power
type: area
float_precision: 1
color: '#ff9800'
opacity: 0.5
stroke_width: 2
yaxis_id: kwh
unit: W
extend_to: now
show:
legend_value: true
in_header: false
group_by:
func: median
duration: 5m
- entity: sensor.energy_production_today
yaxis_id: kwh
type: area
name: Forecast Power
color: grey
opacity: 0.3
data_generator: |
return Object.entries(entity.attributes.wh_period).map(
([key, value]) => [new Date(key).getTime(), value]
);
show:
legend_value: false
in_header: false
stroke_width: 2
float_precision: 2
extend_to: false
group_by:
func: median
duration: 1m
- entity: sensor.energy_production_tomorrow
yaxis_id: kwh
type: area
name: Tomorrow
color: light_grey
data_generator: |
return Object.entries(entity.attributes.wh_period).map(
([key, value]) => [new Date(key).getTime(), value]
);
show:
legend_value: false
in_header: false
stroke_width: 3
float_precision: 2
extend_to: false
- entity: sensor.solar_goodwe
yaxis_id: header_only
name: PV Today
color: orange
show:
legend_value: true
in_header: true
in_chart: false
- entity: sensor.energy_production_today
yaxis_id: header_only
name: Forcast Today
color: orange
show:
legend_value: true
in_header: true
in_chart: false
- entity: sensor.energy_production_today_remaining
yaxis_id: header_only
name: Remaining Today
color: orange
show:
legend_value: true
in_header: true
in_chart: false
- entity: sensor.energy_production_tomorrow
yaxis_id: header_only
name: Forecast Tomorrow
color: grey
show:
legend_value: true
in_header: true
in_chart: false