Hi,
I have a custom:apexcharts-card chart that is not displaying correctly. The issue appears to be that the start of the month is offset by 3 days, the results of the electricity billing cycle which starts on the 4th of each month. I have included the coding for the graph and for the utility meters that generate the results, plus images of the results. The issue is:
The issue is the difference in the values displayed and collected:
Monthly Grid Import Energy General:
- History: 178.10kWh
- Graph: 0.06 kWh
Monthly Grid Import Energy EV Saver: - History: 356.01kWh
- Graph: 0.06 kWh
Chart
type: custom:apexcharts-card
header:
show: true
title: Energy last 4 months
show_states: false
colorize_states: true
graph_span: 4month
section_mode: false
update_interval: 1d
span:
end: month
offset: +3d
apex_config:
chart:
height: 300
series:
- entity: sensor.monthly_grid_import_energy_general
name: General
type: column
statistics:
type: state
group_by:
func: last
duration: 1month
color: "#4269D0"
float_precision: 2
- entity: sensor.monthly_grid_import_energy_ev_saver
name: EV Saver
type: column
statistics:
type: state
group_by:
func: last
duration: 1month
color: "#F4BD4A"
float_precision: 2
- entity: sensor.monthly_solar_energy
name: Solar
type: column
statistics:
type: state
group_by:
func: last
duration: 1month
color: "#FF725C"
float_precision: 2
- entity: sensor.monthly_solar_to_grid_energy
name: Export
type: column
statistics:
type: state
group_by:
func: last
duration: 1month
color: "#6CC5B0"
float_precision: 2
Utility Meters
monthly_grid_import_energy:
name: Monthly Grid Import Energy
unique_id: monthly_grid_import_energy
source: sensor.grid_import_energy
cron: 0 0 4 * *
delta_values: false
net_consumption: false
periodically_resetting: false
always_available: true
tariffs: [General, EV Saver]
monthly_solar_energy:
name: Monthly Solar Energy
unique_id: monthly_solar_energy
source: sensor.solar_energy
cron: 0 0 4 * *
delta_values: false
net_consumption: false
periodically_resetting: false
always_available: true
monthly_solar_to_grid_energy:
name: Monthly Solar to Grid Energy
unique_id: monthly_solar_to_grid_energy
source: sensor.solar_to_grid_energy
cron: 0 0 4 * *
delta_values: false
net_consumption: false
periodically_resetting: false
always_available: true
I hope the solution is something that I have overlooked in the chart settings. Any help greatly appreciated.
Regards,
Craig

