I have an utility helper set as 1 day, which resets at midnight. Its daily max value is the daily consumption of the electricity.
I would like to display a histogram-based chart with Apex Chart extension. I managed to get the data visible on the chart, but it seems that sometimes it takes several seconds to display them.
That gives me an impression that there are plently of data to be loaded from backend which are then frontend processed.
Ultimate question is, should this be optimized to have a new entity that has 1 value per day only?
My YAML code looks like this, and it properly displays what I want, just sometimes takes a bit of time.
- Get data for past 7 days
- Create columns, gruped, with max function with duration of 1 day
type: custom:apexcharts-card
graph_span: 7d
header:
show: true
title: Daily energy consumption
show_states: true
colorize_states: true
apex_config:
chart:
height: 250px
series:
- entity: sensor.utility_meter_1d
type: column
group_by:
func: max
duration: 1d
color: "#ABCDEF"
opacity: 0.6