trying to get this working:
Im trying to get price now and for the next day to show up.
type: custom:apexcharts-card
header: null
title: Kraftpris, i dag og i morgen
show: true
graph_span: 2d
span: null
start: day
apex_config: null
dataLabels: null
enabled: false
stroke: null
width: 2
yaxis: null
min: 0
decimals: 3
tick_amount: 4
now:
show: true
label: Nå
series:
- entity: sensor.strompriser
name: Energipris
type: line
curve: stepline
color: green
float_precision: 3
extend_to_end: false
show: null
legend_value: false
data_generator: |
let today = entity.attributes.raw_today.map((entry) => {
return [new Date(entry.start), (entry.value)];
});
let tomorrow = entity.attributes.raw_tomorrow.map((entry) => {
return [new Date(entry.start), (entry.value)];
});
if(tomorrow[0])
{
return today.concat(tomorrow);
}
return today;
```