Closed Robert-Riedl closed 1 year ago
This integration only fetches data for the current and the next day - and discards older data automatically. If you want to have more data from the past, you could either fetch more data or keep the already fetched data.
Fetching more data should be easy with the Awattar source:
https://github.com/mampfes/ha_epex_spot/blob/601de53eda01465afb9bfa25e6bd04da72c9f5ed/custom_components/epex_spot/EPEXSpot/Awattar/__init__.py#L71
If you modify the calculation of the start
point in time you should get more data.
Keeping more data is more effort. Not sure yet if I want to add this as a general feature.
@mampfes I don't think its necessary to modify the code of the integration though ? if i do
type: custom:apexcharts-card
header:
show: true
title: Aktueller Spot Strompreis drei tage
graph_span: 72h
hours_12: false
span:
start: day
offset: '-2d'
now:
show: true
label: Now
yaxis:
- min: 0
series:
- entity: sensor.epex_spot_price_ct_per_kwh
name: Aktueller Strompreis ct/kWh
type: column
extend_to: end
unit: ct/kWh
then I get some data from the past, since HA stores 10 days of data per default.
Its just a matter of getting the java script correct to display past, present and future data (with * 1.03 * 1.2
to get the true price) with data_generator
But I can't seem to figure it out
There is an example configuration for ApexCharts in the FAQ which shows previous, current and future data in one chart. And I'm working on a configurable net price sensor so that you don't have to adjusted the values in the data generator any more.
I'm aware of the history function, but I'd like to have a graph in apex charts, like the one you have on the README, for the past two days until tomorrow (if available).
I do this whith
offset: '-2d'
but that still doesn't show yesterday or the day before.I've figured out it has to do with the
data_generator
portioni'm using this one for the awattar prices
If I remove this block, It does show me data from the past - but only the past.
Any idea how to fix this ?